Thread: Code Review!!
View Single Post
  #10   Spotlight this post!  
Unread 07-03-2011, 15:22
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: Code Review!!

When using CAN, threading will improve your bus utilization by approximately 3x if using the Black Jag Bridge. Potentially more if using the 2CAN. The reason is there is more bus bandwidth than that consumed talking to a single Jag. That means that you can have messages in flight to up to about 3 jags at a time, thus reducing the overall time needed to update all of your CAN Jags. Only by using multiple threads can you actually send more than one message at a time.

Remember that you can only ever have one message TO THE SAME JAG at a time. All parallel messages must be to different Jags. If you send more than one message to the same Jag at the same time, the messages will simply be serialized by the library (i.e. things will still work, you just won't see a performance improvement).

-Joe
Reply With Quote