|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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!!!
|
|
#2
|
|||||
|
|||||
|
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. |
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|