Go to Post My students like to win, so I'll stick to enabling that. - sdcantrell56 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 02-03-2012, 18:51
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

So we tried doing this same thing with out dashboard and robot. Specifically sending three enum values from the dashboard to the robot. We got this working when we were running live on the robot through labview on a development computer. We would get one of the "The loop containing the RobotDrive code is running to slowly" error every once in a while but the code would function almost perfectly.
Once we deployed the code to the robot ("set as startup" after building), however, we started to get "Watchdog not fed" errors that would stop the code. Once we pulled the UDP receive stuff from the code on the robot, everything started working right. We decided to use the digitial inputs on the driverstation instead, but I would like to figure out what we did wrong in the old code. Does anyone have any ideas why this would have happened?
Reply With Quote
  #32   Spotlight this post!  
Unread 03-03-2012, 08:16
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

I glanced through the forum posts, but couldn't find how you are doing the UDP. Where was it running? Make sure you build and Run as Startup so that you are running the new code. The behavior shouldn't change between the debug-run and the build-run.

If you don't figure it out, post the code or pictures of it.

Greg McKaskle
Reply With Quote
  #33   Spotlight this post!  
Unread 05-03-2012, 16:01
Pirate programe's Avatar
Pirate programe Pirate programe is offline
Registered User
FRC #0354
 
Join Date: Jan 2012
Location: Queens,NY
Posts: 53
Pirate programe is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Has anyone managed to solve the problem of the UDP transmission interfering with the normal Driver Station communication?
Reply With Quote
  #34   Spotlight this post!  
Unread 05-03-2012, 16:53
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: Transmitting data to the cRIO from the Driver's station via TCP/UDP

What problem?
Reply With Quote
  #35   Spotlight this post!  
Unread 05-03-2012, 17:01
Pirate programe's Avatar
Pirate programe Pirate programe is offline
Registered User
FRC #0354
 
Join Date: Jan 2012
Location: Queens,NY
Posts: 53
Pirate programe is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

See, every time we've tried to send information to the robot using UDP, it's hindered the regular communication: The robot will stall during Teleop and Autonomous, the communications light on the Driver station will turn on and off, and occasionally, we'll lose the connection entirely.
Reply With Quote
  #36   Spotlight this post!  
Unread 05-03-2012, 17:50
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:
Originally Posted by Pirate programe View Post
See, every time we've tried to send information to the robot using UDP, it's hindered the regular communication: The robot will stall during Teleop and Autonomous, the communications light on the Driver station will turn on and off, and occasionally, we'll lose the connection entirely.
Are you sending data too fast? The way I got it working, I had a loop wait timer in the transmission loop, along with no wait timer on the recieving loop, (but having a good timeout value on the recieving loop.) I posted some screenshots of working UDP sending and recieving for the robot a few posts back.

Send
Receive

Last edited by Bendito : 05-03-2012 at 17:54.
Reply With Quote
  #37   Spotlight this post!  
Unread 11-03-2012, 14:07
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by Greg McKaskle View Post
I glanced through the forum posts, but couldn't find how you are doing the UDP. Where was it running? Make sure you build and Run as Startup so that you are running the new code. The behavior shouldn't change between the debug-run and the build-run.

If you don't figure it out, post the code or pictures of it.

Greg McKaskle
Thanks for taking the time to respond. I have added pictures because I am not really sure what we are doing wrong. The robot receive code is in the periodic tasks vi and the dashboard send is in the dashboard main vi.
Right now the image processing is in the same loop as the udp send, but we did separate it from this loop to check if that was slowing down the code, but there was no difference in effect.

Again, the problem is that when we "run as startup" we get enough watchdog errors to make the robot essentially undrivable.


Edit: forgot to note the "larger" sized photo is the send and the smaller is the recieve
Attached Thumbnails
Click image for larger version

Name:	dashboard send.JPG
Views:	43
Size:	47.7 KB
ID:	12277  Click image for larger version

Name:	robot receive.JPG
Views:	45
Size:	43.4 KB
ID:	12278  

Last edited by PSHRobotics : 11-03-2012 at 16:53.
Reply With Quote
  #38   Spotlight this post!  
Unread 11-03-2012, 14:13
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

You're missing a Wait in the second block diagram.
That will suck all the life out of your CPU.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #39   Spotlight this post!  
Unread 11-03-2012, 16:38
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: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by Mark McLeod View Post
You're missing a Wait in the second block diagram.
That will suck all the life out of your CPU.
I haven't memorized the UDP function icons, so I might be reading it backwards, but I think that second diagram is the receive processing. As such, it will only run when a new UDP packet is received (or until the UDP receive timeout occurs, which is 25 seconds by default). It doesn't need a Wait inside the loop, and adding one can actually cause some undesired effects if packets arrive faster than the loop time.
Reply With Quote
  #40   Spotlight this post!  
Unread 11-03-2012, 16:54
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Well we did have a wait in there (30 ms), but while using the debug-run we started to get watchdog errors which had us loose control for a few moments about every 10 seconds. Those errors were more or less random and we had times where they would not happen for about a minute and then they would continuously happen. After taking out that wait we stopped seeing that problem and actually thought we had everything fixed - until we did a "run as startup".
Reply With Quote
  #41   Spotlight this post!  
Unread 13-03-2012, 17:00
Alex698's Avatar
Alex698 Alex698 is offline
Sparky
FRC #2449 (Out of Orbit Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Arizona
Posts: 114
Alex698 is a jewel in the roughAlex698 is a jewel in the roughAlex698 is a jewel in the rough
Send a message via AIM to Alex698
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by PSHRobotics View Post
Well we did have a wait in there (30 ms), but while using the debug-run we started to get watchdog errors which had us loose control for a few moments about every 10 seconds. Those errors were more or less random and we had times where they would not happen for about a minute and then they would continuously happen. After taking out that wait we stopped seeing that problem and actually thought we had everything fixed - until we did a "run as startup".
I was having the exact same problem and it was driving me nuts, however I think I have resolved the issue. I stopped having driver station interference problems when I used a String-to-IP function fed into the open UDP VI into the net address input. It should match your team IP: 10.te.am.02. Also you should set the UDP Write VI net address to your team IP.
__________________
Eat, Sleep, Build Robots
Reply With Quote
  #42   Spotlight this post!  
Unread 13-03-2012, 18:17
PSHRobotics PSHRobotics is offline
Registered User
FRC #1182
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Missouri
Posts: 38
PSHRobotics is an unknown quantity at this point
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by Alex698 View Post
I was having the exact same problem and it was driving me nuts, however I think I have resolved the issue. I stopped having driver station interference problems when I used a String-to-IP function fed into the open UDP VI into the net address input. It should match your team IP: 10.te.am.02. Also you should set the UDP Write VI net address to your team IP.
That is a good catch, and if we get a chance we will try that, thanks!
My only concern about that is that we were able to send data using our code to the robot so the actual communication was not having problems, and because the open is outside of all loops I don't see how it could have caused the communication indeterminacy/watchdog errors when the communication was working.

We did have the UDP Write VI using our team IP (which we got using the global variable for Robot IP).
Reply With Quote
  #43   Spotlight this post!  
Unread 15-03-2012, 18:00
rwood359 rwood359 is offline
Registered User
AKA: Randy
FRC #0359 (Hawaiian Kids)
Team Role: Mentor
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Waialua, HI
Posts: 212
rwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to allrwood359 is a name known to all
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by Bendito View Post
Are you sending data too fast? The way I got it working, I had a loop wait timer in the transmission loop, along with no wait timer on the recieving loop, (but having a good timeout value on the recieving loop.) I posted some screenshots of working UDP sending and recieving for the robot a few posts back.
Thanks for posting these routines. We have used them with slight mods and have our image processing working pretty well.

We are running a modified version of the supplied Rectangle routine. Right now it is running as an independent program. We have the Drivers Station, Dashboard, and our image processing running. Is there a reason or rule that requires that the image processing be integrated into Dashboard? Will FMS know or care that it is a standalone program?
__________________
Reply With Quote
  #44   Spotlight this post!  
Unread 15-03-2012, 18:15
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

Quote:
Originally Posted by rwood359 View Post
Thanks for posting these routines. We have used them with slight mods and have our image processing working pretty well.

We are running a modified version of the supplied Rectangle routine. Right now it is running as an independent program. We have the Drivers Station, Dashboard, and our image processing running. Is there a reason or rule that requires that the image processing be integrated into Dashboard? Will FMS know or care that it is a standalone program?
UDP traffic is UDP traffic. As long as it's on the right port none of the networking hardware will know what program it came from. I also don't see any rules that prevent you from running whatever software you want on your DS PC as long as it is in addition to and not instead of the DS software (though I would personally recommend against Minesweeper, Solitaire or Pinball)
Reply With Quote
  #45   Spotlight this post!  
Unread 15-03-2012, 22:53
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,810
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Transmitting data to the cRIO from the Driver's station via TCP/UDP

The only required program is the Driver Station app.
The Dashboard is entirely optional as well as any other programs, such as the Kinect Server. I've run wordpad so I could take notes.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
Reply


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:48.

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