Go to Post The life-status of an equine animal has never affected the degree of corporal punishment administered on this BBS. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-04-2011, 11:00 AM
Hugh Meyer's Avatar
Hugh Meyer Hugh Meyer is offline
Registered User
FRC #1741 (Red Alert Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Greenwood Indiana
Posts: 158
Hugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud ofHugh Meyer has much to be proud of
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

John,

I may be misunderstanding your comment # 3. Please clarify if my comments don't make sense.

*****
3) We run the CRIO connection directly to the radio and connect the radio directly to the 2CAN rather than passing all CRIO traffic through the 2CAN.
*****

I thought the 2CAN was to be connected to the CRIO on port # 2. Since port # 2 is on a different network the traffic is isolated from the robot communication traffic on the wireless. That is how ours is wired and we just completed 2 regional events without any control issues. We had other issues, just not control ones...

It seems adding that additional load through the radio switch and robot communication network could indeed cause problems.

-Hugh
Reply With Quote
  #2   Spotlight this post!  
Unread 04-04-2011, 12:06 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by Hugh Meyer View Post
John,

I may be misunderstanding your comment # 3. Please clarify if my comments don't make sense.

*****
3) We run the CRIO connection directly to the radio and connect the radio directly to the 2CAN rather than passing all CRIO traffic through the 2CAN.
*****

I thought the 2CAN was to be connected to the CRIO on port # 2. Since port # 2 is on a different network the traffic is isolated from the robot communication traffic on the wireless. That is how ours is wired and we just completed 2 regional events without any control issues. We had other issues, just not control ones...

It seems adding that additional load through the radio switch and robot communication network could indeed cause problems.

-Hugh
Routing CAN traffic through the radio could certainly cause problems. The radio's ports have a limited amount of buffer space before the 802.3x congestion control messages start flying around on the net. I'm not sure what the 2CAN would do if it suddenly started getting a lot of source quench message traffic. Certainly, packets would start getting lost and that would be bad on a half-duplex style network like CAN (at least in the way it's implemented for FIRST). So, it's probably better to wire the 2CAN to port 1 on the cRIO and wire the radio on the other port of the 2CAN.

My $.02,

Mike
Reply With Quote
  #3   Spotlight this post!  
Unread 04-04-2011, 01:17 PM
John Heden John Heden is offline
Registered User
FRC #1073
 
Join Date: Jan 2011
Location: Hollis, NH
Posts: 29
John Heden is an unknown quantity at this point
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by taichichuan View Post
Routing CAN traffic through the radio could certainly cause problems. The radio's ports have a limited amount of buffer space before the 802.3x congestion control messages start flying around on the net. I'm not sure what the 2CAN would do if it suddenly started getting a lot of source quench message traffic. Certainly, packets would start getting lost and that would be bad on a half-duplex style network like CAN (at least in the way it's implemented for FIRST). So, it's probably better to wire the 2CAN to port 1 on the cRIO and wire the radio on the other port of the 2CAN.

My $.02,

Mike
Mike,

Thanks for your thoughts. We initially had the 2CAN device on the CRIO port 1 connector which is where we first started to see our problems. The buffer capacity of the 2CAN vs. the radio was unclear but our intuition gave the radio the advantage here. I believe our next step will be to simply move to port 2 of the CRIO and see whether that helps things.

Thanks,

John
Reply With Quote
  #4   Spotlight this post!  
Unread 04-04-2011, 02:41 PM
nuttle nuttle is offline
Registered User
AKA: Allen Nuttle
FRC #4080
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: United States
Posts: 104
nuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud ofnuttle has much to be proud of
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Do you know if your 2CAN has had the firmware updated to version 2.5 or not? We have a regional this coming week/end and will try out v29 on the cRIO. We've been using serial, but it is easy enough to switch back and forth that we might try the 2CAN again, at least for practice matches. We have not yet had a chance to try either of these updates.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-04-2011, 08:16 PM
John Heden John Heden is offline
Registered User
FRC #1073
 
Join Date: Jan 2011
Location: Hollis, NH
Posts: 29
John Heden is an unknown quantity at this point
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by nuttle View Post
Do you know if your 2CAN has had the firmware updated to version 2.5 or not? We have a regional this coming week/end and will try out v29 on the cRIO. We've been using serial, but it is easy enough to switch back and forth that we might try the 2CAN again, at least for practice matches. We have not yet had a chance to try either of these updates.
Yes! We updated to V29 and had V2.5. We started to try a switch to serial but ran into some difficulties trying to craft a proper RS232 to Black JAG cable during the competition as well as finding a RS232 to USB converter. There were a number of folks at Hartford who were suspicious of the 2CAN and suggested that a RS232 conversion might solve our intermittent problem. We remain optimistic that a robust 2CAN solution is possible.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-04-2011, 03:03 PM
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by taichichuan View Post
Routing CAN traffic through the radio could certainly cause problems. The radio's ports have a limited amount of buffer space before the 802.3x congestion control messages start flying around on the net. I'm not sure what the 2CAN would do if it suddenly started getting a lot of source quench message traffic. Certainly, packets would start getting lost and that would be bad on a half-duplex style network like CAN (at least in the way it's implemented for FIRST). So, it's probably better to wire the 2CAN to port 1 on the cRIO and wire the radio on the other port of the 2CAN.

My $.02,

Mike
R50A states "The DAP-1522 radio is connected to the cRIO-FRC Ethernet port 1 (either directly or via a CAT5 Ethernet pigtail)." We took this to mean that under no circumstance can an active device (2CAN) sit between the DAP-1522 and the cRIO. That leaves two choices, connect the 2CAN to the DAP-1522 or connect the 2CAN to Ethernet port 2 on the cRIO.

My teams robot (programmed with Java using IterativeRobot) has gone through one event with our 2CAN plugged into our DAP-1522 and have had no CAN related trouble. We were running cRIO v28 (v29 wasn't out at the time) and 2CAN firmware v2.5 with the SVN rev 66 plugin on the cRIO. We have 6 black jaguars on the CAN bus with no sensor inputs or limit switches.

Perhaps we were very fortunate during our regional but we have not had any serious CAN issues (knock on wood) since build. All of our trouble then could be traced back to poorly made cables when we did have problems.

I am hoping our luck caries us through championship.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Reply With Quote
  #7   Spotlight this post!  
Unread 04-04-2011, 06:12 PM
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

We continue to be plagued with timeouts on the CAN bus. And yes, I've checked the termination, and it all looks good. We are running V29 and I don't have the numbers for the plugin or the 2CAN firmware.

One thing that I have seen which is causing no end of issues is that if you get a timeout on the messages, the API is return no indication of the failure. So, for example, if the GetForwardLimitOK() function is called, and times out, you get back false. There is no way to know that that has happened and if you are making decisions based on these results... We have an encoder on our lift mechanism. To zero the encoder, we drive to the bottom limit switch, and when we get there, we set the encoder to 0. This works fine until we lose the message due to timeout. From that point on the lift is offset by where ever the timeout occurred. There really needs to be a way within the API to detect that the transaction timed out.

Of course, the best answer would be that we don't have any timeouts.

Another observation related to timeouts is that we have an on board compressor and if during initial startup the pressure sensor indicates that the compressor should run and starts the compressor immediately, we get a number of timeout messages.

All in all, I'm really regretting the decision to use the CAN bus. And for the most part all of the features that I really wanted to use, that were provided by the CAN bus, proved to be unusable.
Reply With Quote
  #8   Spotlight this post!  
Unread 04-11-2011, 02:18 AM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by mjcoss View Post
One thing that I have seen which is causing no end of issues is that if you get a timeout on the messages, the API is return no indication of the failure. So, for example, if the GetForwardLimitOK() function is called, and times out, you get back false. There is no way to know that that has happened and if you are making decisions based on these results... We have an encoder on our lift mechanism. To zero the encoder, we drive to the bottom limit switch, and when we get there, we set the encoder to 0. This works fine until we lose the message due to timeout. From that point on the lift is offset by where ever the timeout occurred. There really needs to be a way within the API to detect that the transaction timed out.
Yes... that's a definite shortcoming of the C++ API. Both the LabVIEW and Java CANJaguar APIs have a mechanism for the user's program to know that there has been an error. I intended to remedy that this season, but didn't have the time. It will be fixed next year.

Quote:
Originally Posted by mjcoss View Post
All in all, I'm really regretting the decision to use the CAN bus. And for the most part all of the features that I really wanted to use, that were provided by the CAN bus, proved to be unusable.
I'm sorry to hear that you aren't happy with the CAN implementation. What features did you want to use that you aren't using? What made them unusable for you?
Reply With Quote
  #9   Spotlight this post!  
Unread 04-11-2011, 02:46 PM
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Here's what we were planning:

1) We are using a two speed transmission from AndyMark. It has uses 2 motors, and has a single optical encoder built into the the gearbox (on the output shaft). I had originally intended to use speed & position control on the drive subsystem. Position control for autonomous, and speed control during teleop. We first tried just using a y splitter to feed both Jaguars, and then tried a master/slave arrangement. While we got it to work, it seemed unstable. I'm sure that with more time, we might have been able to get it to work reliably but there really wasn't enough time.

2) Our lifter mechanism had the same problem. We had intended to use position control to put the arm at preset heights. Again, we had two banebot motors driving a custom gearbox with an encoder of the output shaft. The position controls would work for some positions, but would oscillate and not find the set point at others. I tried tuning it several times and couldn't get something that was 100% stable. Again we tried a Y split, and a master/slave configuration. We ended up moving the encoder to the CRIO and ran the PID loop on the CRIO. This gave me better control on the loop, and was immediately stable.

3) We have limit switches directly connected to the Jaguars, for the lifter mechanism, and the claw. The bottom one on the lift mechanism was used to home the encoder. We drop to the bottom limit switch and set the encoder count to 0. This works fine unless we timeout on the get limit message. If that message times out, the API returns at limit, and we stop. The premature stop of the motor made zero be in the wrong place, throwing all subsequent offset off by upwards of 6 inches. Apparently, in Java you can catch the exception, but I didn't see anything in the C++ code to allow the caller to know that the results of the call was bogus. I've modified my version of the limit switch calls to return an error status so that I can decide what to do if an error occurs.

Now add into the mix that, under some unknown set of circumstances, we get a flood of CAN bus timeout messages making the robot completely unusable. Given all that, one has to wonder if using the CAN bus is a good idea. In addition, we get some number of intermittent timeouts, which while not fatal causes weird behavior because the code can't determine that a timeout has occurred since the caller is returned a valid return value even if the call times out.

I have updated the firmware to the latest versions. I've tried two different bus terminators. And new cables.

One item that we've seen that has lead me to point a finger at the 2CAN is that on our robot we have an onboard compressor. We have noticed that if during autonomous if the air pressure in the system is low and the compressor needs to run immediately, we get the flood of CAN bus messages. It is as if the run all 4 CIM motors, plus rehome the lifter, plus drop the arm, plus run the compressor is a trigger for the failure My theory is that the voltage drop is causing a failure in the 2CAN. Of course, it could be something completely unrelated.

We are going to St. Louis and I'm seriously debating whether we should rewire the bot to use PWM cables.
Reply With Quote
  #10   Spotlight this post!  
Unread 04-12-2011, 06:22 PM
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by mjcoss View Post
Here's what we were planning:

One item that we've seen that has lead me to point a finger at the 2CAN is that on our robot we have an onboard compressor. We have noticed that if during autonomous if the air pressure in the system is low and the compressor needs to run immediately, we get the flood of CAN bus messages. It is as if the run all 4 CIM motors, plus rehome the lifter, plus drop the arm, plus run the compressor is a trigger for the failure My theory is that the voltage drop is causing a failure in the 2CAN. Of course, it could be something completely unrelated.

We are going to St. Louis and I'm seriously debating whether we should rewire the bot to use PWM cables.
Its my understanding that the 2CAN wont drop out till about 6 volts. Regardless are you wiring it to the termination blocks or to the 12 regulated supply or the 24 volt regulated supply?

We had ours wired on the 24v line parallel to the solenoid bumper. We had dropouts fairly often but when it happened we saw the PHY lights go out on the connector. We switched the 2CAN to port 2 and had another dropout some time later. We then swapped out our radios (we had issues) and never had a dropout since. We also developed a pre-match procedure where one of the drivers logged into the 2can and checked to see that all the jags were online. Once we started and only one jag showed up. Quick power cycle and all of them were back online.

I'm going to write a quick java applet that will display the 2CAN status information without the need to open a browser (aka have it pop up with the driver station on load)
Reply With Quote
  #11   Spotlight this post!  
Unread 04-13-2011, 12:19 PM
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Off hand I don't know for certain how the 2CAN is connected (I'm more of a software guy), but I believe that it powered via the termination blocks. Should it be moved?

Just as an aside, how are people connecting the 2CAN? We have the CRIO connected to the DLINK via the CRIO's port 1 and the 2CAN via the CRIO's port 2. The second connector on the 2CAN is unused. We had though of adding a camera to the robot and I was planning on plugging the camera into the unused port of the 2CAN.

However, when I first wired it up, I had the 2CAN connected to port 1 of the CRIO and the DLINK was connected to the second port of the 2CAN, but it seemed to me that in this configuration, the 2CAN was going to have a lot more work to do that was unnecessary, as it would have to bridge all the traffic to and from the CRIO and driver station.
Reply With Quote
  #12   Spotlight this post!  
Unread 04-15-2011, 06:49 PM
drakesword drakesword is offline
Registered User
AKA: Bryant
FRC #0346 (Robohawks)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: USA
Posts: 200
drakesword is on a distinguished road
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Preliminary release for the app is available. Go to this post
Reply With Quote
  #13   Spotlight this post!  
Unread 04-15-2011, 11:31 PM
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Our robot has 8 Jags (4 black, 4 grey) running off of 2CAN, and we do a fair amount of runtime data logging on the cRIO for post-match analysis. We see occasional timeouts (approx every 20sec or so) but catch them so it has never really caused a control problem.

Interestingly, even when seeing timeouts we have never seen any CAN errors reported on the 2CAN webdash - assuming that the webdash is working correctly, that leads us to suspect that the occasional timeouts not caused by any wiring/comms issues with the CAN bus itself, but rather something else going on in the software stack within the cRIO.

Once nationals are over we're planning to test a variety of scenarios (running Jags off the 2CAN both with and without the cRIO, requesting tons of status info from the Jags continuously, etc) to try to collect very specific data on what scenarios provoke the timeouts. It's a great learning exercise for the students, and hopefully the data will help narrow down exactly what's going on. Can't promise exactly when we'll dig into this but we plan to post the "scenario design" we come up with and seek input from the community here.

- Ron
Team #2607 controls mentor
__________________

FIRST Mid-Atlantic Volunteer
FRC Team #2607 Mentor
Reply With Quote
  #14   Spotlight this post!  
Unread 04-21-2011, 09:55 AM
mjcoss mjcoss is offline
Registered User
FRC #0303
 
Join Date: Jan 2009
Location: Bridgewater,NJ
Posts: 70
mjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the roughmjcoss is a jewel in the rough
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

So I finally got a chance to run some tests on our second bot that was made in parallel with our competition bot. It is not exactly the same but we were seeing similar CAN bus timeouts.

I replace the bus termination with a new one using a 120 ohm resistor (our old ones were 100 ohm), and we move the 2CAN power supply to the 24volt regulated power off the power distribution block (I think that what the electrical guy said0. Over a 10 minute session, cycling thru teleop, autonomous, and disabled states, we saw only 2 timeout messages.

Unfortunately, I can't recreate the one "known" failure case that we have seen on our competition bot. That is, if in autonomous, we need to run the compressor at the start of autonomous mode, we get a complete CAN bus failure. The problem is that our second bot was partial disassembled, and so not all of the components are running/attached.

But it seems like a good sign, although why it would loose even one is a bit of a mystery. Maybe if we increase the wait time a small step to see if the message was just delayed or was really lost.
Reply With Quote
  #15   Spotlight this post!  
Unread 04-21-2011, 10:23 AM
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: Unexplained intermittent CAN / 2CAN Jaguar problems at GSR

Quote:
Originally Posted by mjcoss View Post
we move the 2CAN power supply to the 24volt regulated power off the power distribution block
Just a heads up, this is not a competition legal setup per R38A.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:54 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi