Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Code suddenly not working (http://www.chiefdelphi.com/forums/showthread.php?t=125557)

Laxkief9098 31-01-2014 17:51

Code suddenly not working
 
We are a second year team and pretty familiar with labview. We made a new robot project and added our our drive code. It worked. Then we added 3 other Sub Vi's in the tele-op Vi. These VI's execute an encoder, a gyro (drive straight), and a shooting sequence. We deployed the updated code and the drive system stopped working. Between the two deployments we changed the motor controllers (we have changed them in the programming as well). The Robot code Boolean on the driver station keeps cutting out and then the CRio discontinues communication, however the robot is still on and connected. We have run a default program and it works. Any ideas???/ please help!!!

Mark McLeod 31-01-2014 18:02

Re: Code suddenly not working
 
The phrase "shooting sequence" combined with "...added 3 other Sub Vi's in the tele-op Vi." might indicate that your sequence doesn't immediately return to Teleop, but holds on and doesn't let anything else continue.
Teleop may be grinding to a halt.

Look at or tell us if what you implemented includes delays and/or loops.

If you'd like us to really identify the problem we'll need to see your vi's.

Alan Anderson 31-01-2014 23:17

Re: Code suddenly not working
 
Things that sound like "shooting sequence" typically belong in the Periodic Tasks vi. If it either includes either explicit delays or waits for robot actions to occur based on sensor input, it's not likely to work as part of Teleop.

Teleop gets called each time a new data packet is sent from the Driver Station with joystick/gamepad/Cypress input values. It needs to do its job and end quickly. If it hasn't finished running before the next Driver Station communication occurs, it'll disrupt the vital communication tasks, and the robot will probably report a "loop running slow" error.

Greg McKaskle 01-02-2014 08:19

Re: Code suddenly not working
 
The project contains a folder called Support Code and in it is a VI, Elapsed Times.

If you place this in teleop and interactively run your project, you can then open the panel of the Elapsed Times and it will display how long between calls from that location. If it is more than 20ms, you probably have too much in teleop.

This VI can be used for vision loop and periodic task loops as well.

Greg McKaskle


All times are GMT -5. The time now is 09:53.

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