pic: Another Teleop while loop

7e32eceda65b905beb57dd9bf80667b6_l.jpg

this is my two-type throw program

Are you actually using this code in Teleop? What I see would completely break the robot program if it were placed there.

Yes, I am. It works too. I wonder why people keep telling me that there’s something wrong? Please tell me if I am missing anything. :confused:

If “stop” isn’t true, then putting that while loop in Teleop will keep the rest of the robot program from running. I would expect to see communication issues indicated on the Driver Station.

Since you don’t have any sort of delay in the loop, it will also use up all of the CPU time setting the motor output as fast as it can.

Huh. It doesn’t seem to do that when I run it in parallel with my other loops. I wonder why? :confused:

Telepop itself is in a loop. Adding a while loop inside it is, at the very least, redundant. Although I can see why others think it might cause problems as well.

Well, I pretty much have a few while loops which execute at the same time. I have the loops so that I can fire until the battery dies (if I wanted to). I didn’t know that teleop was a loop. Huh. Thanks.

Teleop isn’t exactly in a loop. It’s called by the Robot Main vi whenever the Driver Station sends new data, and if your Teleop code doesn’t finish before the next data packet arrives you’ll start tripping the communication watchdog. Putting a neverending loop inside Teleop is a sure way to break your code.

Can you post your Teleop.vi file? I’m curious what you’ve done that lets the robot work even with the collection of unthrottled and unterminated while loops you say you’ve put there.

Can’t right now. my younger brother kneeled on our programming computer and broke the screen, so… :frowning: :frowning: :frowning: :frowning: