Log in

View Full Version : Code Error (Not getting beyond the loop)


pedro123
22-02-2011, 11:50
Hi,

So we made a Project with Game Code and added our personal TeleOp code into the designated file. When we try our teleop without uploading the whole project as startup, it works.

However, when I Build the project and Run As Startup and the crio Reboots, only one part of the teleop works. We have compressor code and drive code with two motors plus the pneumatics. When we Run As Startup, our compressor turns on, reaches the limit and stops but we cant control the joystick at all. the error file says that the code is not getting the robotodrive loop. So, I made two while loop with pneumatics and compressor in one and the robotdrive in the other, however it still does not work... Can you help?

Thanks!

Jimmy the Kidd
22-02-2011, 13:15
Hi,

So we made a Project with Game Code and added our personal TeleOp code into the designated file. When we try our teleop without uploading the whole project as startup, it works.

However, when I Build the project and Run As Startup and the crio Reboots, only one part of the teleop works. We have compressor code and drive code with two motors plus the pneumatics. When we Run As Startup, our compressor turns on, reaches the limit and stops but we cant control the joystick at all. the error file says that the code is not getting the robotodrive loop. So, I made two while loop with pneumatics and compressor in one and the robotdrive in the other, however it still does not work... Can you help?

Thanks!
Could you either post the teleop.vi or give a screenshot?

Alan Anderson
22-02-2011, 13:43
When we try our teleop without uploading the whole project as startup, it works.

When you say "try our teleop", what exactly do you mean?

dekker120
22-02-2011, 16:14
Check to make sure that the Watchdog is either Disabled, or that the Watchdog is being "fed" in the while loops... Also check to make sure that the While loops don't have too long of a wait delay... This could be activating the Safety Config feature on the motors. Posting a screenshot would be nice.

j.cole
22-02-2011, 21:53
Read my thread about while loops in teleop. You cant have them in there. You instead can put them into the periodic tasks VI.

pedro123
22-02-2011, 22:30
I will upload a screenshot of my TeleOp vi as soon as possible (most likely tomorrow morning) but till then, I should let you know I have two while loops. I'll update the info tomorrow.

Read my thread about while loops in teleop. You cant have them in there. You instead can put them into the periodic tasks VI.

I just read that but my whole teleop code is two while loops, if i place them in the Periodic tasks, do I just leave my teleop code empty (No drive either?) ?

thanks