Go to Post Even in the eighties, driver practice won competitions. - Brian Maher [more]
Home
Go Back   Chief Delphi > CD-Media > Photos
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

photos

papers

everything



Another Teleop while loop

nxtmonkeys

By: nxtmonkeys
New: 19-02-2014 12:29
Updated: 19-02-2014 12:29
Views: 854 times


Another Teleop while loop

this is my two-type throw program

Recent Viewers

  • Guest

Discussion

view entire thread

Reply

19-02-2014 14:13

Alan Anderson


Unread Re: pic: Another Teleop while loop

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



19-02-2014 14:14

nxtmonkeys


Unread Re: pic: Another Teleop while loop

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.



19-02-2014 14:24

Alan Anderson


Unread Re: pic: Another Teleop while loop

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.



19-02-2014 14:26

nxtmonkeys


Unread Re: pic: Another Teleop while loop

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



19-02-2014 18:00

Pault


Unread Re: pic: Another Teleop while loop

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.



19-02-2014 18:07

nxtmonkeys


Unread Re: pic: Another Teleop while loop

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.



19-02-2014 22:35

Alan Anderson


Unread Re: pic: Another Teleop while loop

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.



20-02-2014 10:48

nxtmonkeys


Unread Re: pic: Another Teleop while loop

Can't right now. my younger brother kneeled on our programming computer and broke the screen, so...



view entire thread

Reply
previous
next

Tags

loading ...



All times are GMT -5. The time now is 19:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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