View Single Post
  #6   Spotlight this post!  
Unread 10-02-2012, 16:48
plnyyanks's Avatar
plnyyanks plnyyanks is online now
Data wins arguments.
AKA: Phil Lopreiato
FRC #1124 (The ÜberBots), FRC #2900 (The Mighty Penguins)
Team Role: College Student
 
Join Date: Apr 2010
Rookie Year: 2010
Location: NYC/Washington, DC
Posts: 1,113
plnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond reputeplnyyanks has a reputation beyond repute
Re: Sending Data from Dashboard to Robot?

Actually, you can flatten the double output from the slider to a string, and when you unflatten it, wire a double constant to the unflatten VI (to tell LV what datatype out you want).

I would probably put the UDP listener in Periodic Tasks.vi, so it won't slow down your other code. You're also going to want to wire a timeout to UDP read (make it small: ~50 ms) so that your code won't hang there. You can open/close your references inside Periodic Tasks (but outside of a while loop) and put your listener code inside a while loop.
Attached Thumbnails
Click image for larger version

Name:	udp read.png
Views:	66
Size:	15.0 KB
ID:	11837  
__________________
Phil Lopreiato - "It's a hardware problem"
Team 1124 (2010 - 2013), Team 1418 (2014), Team 2900 (2016)
FRC Notebook The Blue Alliance for Android
Reply With Quote