Go to Post Hey Kid! Get off my lawn!!! - Joe Johnson [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 16-02-2014, 09:51
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
Can the CAN bus be overloaded with too many transactions ?

Greetings,

We are using 5 Jaguars (black) with a 2CAN for motor control and for acquiring detailed data (motor current, bus voltage, encoders, temp, etc.) using 3 different threads with an aggregate rate of just over 1000 transactions/sec. While this generally works rather well, we are seeing an occasional CAN timeout message making it to the console screen. We have had some debate as to whether it is possible to overwhelm the CAN bus with too much traffic and that that we need to significantly reduce our polling frequency to avoid this occasional CANJaguar timeout.

I would like to solicit any opinion folks have regarding the use of the CAN bus with the 2CAN and whether it really is possible to have too much CAN traffic which can result in CAN timeouts.

It does seem like the Jaguars themselves and their ability to respond to each request with the Ethernet/CAN bus should be the limiting factor and it should not be possible to cause bus actual difficulty with lots of traffic. A series of transactions to each individual Jaguar can happen in rapid succession (sequential in code) and would represent a rather high (but brief) traffic burst.

I just spent some time looking at the WPILib CANJaguar implementation and was rather surprised to see the semaphore implementation is at the individual Jaguar level and not shared at the higher bus level. I tried to go down a level further to see how this might be handled at the lower levels but could not find the source for FRC_NetworkCommunication_JaguarCANDriver_receiveMe ssage.

I am curious as to whether any of the lower level implementations (perhaps in the 2CAN itself) attempts to ensure only one JANJaguar transaction is out on the CAN bus at a time ?

I am wondering whether our multiple thread implementation attempting to use the CANJaguar implementation with a per CANJaguar individual semaphores might be exposing system vulnerability when our threads just happen to occasionally to attempt to simultaneously transact and simultaneously request info from different Jags ?

I’m going to try to protect the these calls with a single shared semaphore (vs. one per Jaguar)and see if that resolves this occasional glitch.

Any thoughts or opinions on this would be greatly appreciated.

Thanks,
John
 


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 22:01.

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