View Single Post
  #14   Spotlight this post!  
Unread 24-01-2012, 01:29
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Sending data to cRIO

Quote:
Originally Posted by Lalaland1125 View Post
UDP is fundamentally unreliable, you don't know the order or if a package will get to its destination.
For a real-time application such as robot control, the lack of a guaranteed delivery is usually a worthwhile tradeoff against the potentially long delivery day of a TCP packet. The kind of data we're talking about is basically "current status" information. If you lose a packet or two, it shouldn't be that big a deal; you'll get updated when the next one comes in.

Using TCP adds error detection and retransmission, but it has to use buffering in order to do it. If the CPU gets busy and can't react quickly, you can end up with significant lag in getting the data where it needs to go.

If you care more about getting every last bit of data, TCP is obviously the way to go. If you care more about getting data with minimum delay, choose UDP.