View Single Post
  #22   Spotlight this post!  
Unread 28-02-2012, 22:57
Bendito's Avatar
Bendito Bendito is offline
Registered User
AKA: Benjamin LaRoche
FTC #7837 (The Thunder Colts)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Dorr, MI
Posts: 13
Bendito is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
The UDP listener should have errors trapped and a timeout set to a fairly low number (I use 1000ms) - I use trapped errors as a source of determining if I actually should unbundle the packet and use it

-The UDP listener should exist in its own thread (While loop) throttled by nothing other than itself - There should be no waits. The UDP listener will block for new packets, and if you are behind in receiving packets then it's a bad thing.
Thank you, I fixed this, and created a much more simplified communication system. It actually works flawlessly now (even through repeated power ups/downs between robot and driverstation) I have some screenshots of it included.

Quote:
When you say crash - exactly what happens? If you can reproduce a crash with a simplified program, please contact National Instruments via our FRC forum. We can have application engineers look into it.
The crash that occurs was happening whenever I was trying to debug the robot through running the robot program while still in labview with probes set up. It seems that when the driverstation tries to connect with the robot, it boots off labview's connection with the cRIO. A "Connection with the cRIO was lost" would appear, and there would be no way to put more code on without closing the driverstation. This was causing me to think it was crashing, and causing a lot of hair pulling in the debugging process, but was eventually figured out.
Attached Thumbnails
Click image for larger version

Name:	UDPReceiveRun.vi Block Diagram _2012-02-28_22-50-50.png
Views:	122
Size:	13.9 KB
ID:	12157  Click image for larger version

Name:	[Dashboard Main.vi] Block Diagram on 2012 Dashboard ProjectVisionPro.png
Views:	198
Size:	28.6 KB
ID:	12158  
Reply With Quote