Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Stuck in Teleop Init (http://www.chiefdelphi.com/forums/showthread.php?t=82896)

EricWilliams 17-02-2010 12:46

Stuck in Teleop Init
 
This is a request for help based on quick and preliminary observations. Has anyone come across a robot becoming stuck in the "Init" state while in Teleop mode? It seems we are not advancing into the "Default" derived robot state. On the dashboard no error messages are displayed, the elapsed time continues increasing, and the joystick indicator lights show data is being read from the joystick. However, when running the code, the value of the derived robot state remains at init, and none of the default code executes. What drives this change?

Note: due to problems with the Watchdog, we temporarily removed it from the code.

EHaskins 17-02-2010 14:14

Re: Stuck in Teleop Init
 
What environment are you using? LabView, Java, or C++?

Have you change anything since it worked?

Gyros can take some time to initialize if you let the robot sit for ~1 minute does it work? Also some of the eariler camera APIs could hang if the camera isn't connected.

Are there any messages displayed in your programming tool?

Please post the code in RobotInit() and TeleopInit().

Alan Anderson 17-02-2010 21:51

Re: Stuck in Teleop Init
 
I wish I could remember exactly what was going on when this happened to us a couple of days ago. I can tell you that I discovered one vi stuck in a loop. If you run Robot Main interactively, you can look at the "run" button of each SubVI it calls. Some of them will be in the black "running" state. Some of them might be white with a black line or dot, and hovering the mouse pointer over it tells you that vi is "waiting to run". That might give you a clue about where to focus your attention.

Greg McKaskle 18-02-2010 06:30

Re: Stuck in Teleop Init
 
The code that drives the change is the Get Mode which is called in Robot Main. Be sure you are probing the correct wire. Also, it may be useful to put breakpoints in the different teleop sections to see where you are getting.

Greg McKaskle

EricWilliams 18-02-2010 09:58

Re: Stuck in Teleop Init
 
It seems now that we are getting to Teleop Execute. Now all of the RefNum Get calls we have are returning errors. They've all been set correctly in Begin.vi, so I'm not sure what's going on.

Ziaholic 18-02-2010 13:38

Re: Stuck in Teleop Init
 
That sounds like you might've run the Teleop VI instead of the RobotMain.

Whenever you run/deploy the code, you should always do it from the RobotMain. If you simply press the Teleop RUN button, then it doesn't load the other VI's (like the Begin.VI).

Just a guess ...

EricWilliams 18-02-2010 15:28

Re: Stuck in Teleop Init
 
Quote:

Originally Posted by Ziaholic (Post 923032)
That sounds like you might've run the Teleop VI instead of the RobotMain.

Whenever you run/deploy the code, you should always do it from the RobotMain. If you simply press the Teleop RUN button, then it doesn't load the other VI's (like the Begin.VI).

Just a guess ...

And a very good guess, but this is definitely not the case here. I always make sure that I am running robot main, and have followed the execution through Begin.vi and into Teleop.vi.

P.S. - this is a very good thing to do, because there are things we didn't touch that used the default RefNum names (e.g. Disabled.vi uses "Left and Right Motors" for drive) and will only give a one time error. Stepping through eliminated a lot of these problems.


All times are GMT -5. The time now is 11:00.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi