View Single Post
  #1   Spotlight this post!  
Unread 30-01-2012, 20:40
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
How often is code run in teleop?

Hello -

I'm looking to migrate some of my code which I have written into Teleop.vi (mainly moving motors and servo's with buttons) into Periodic Tasks.vi, mainly to cut down on the Watchdog errors we get periodically.

However, I know that I must put the code within a while loop and tell it how long to wait till the loop executes again.

If I'm getting the value of a joystick button, and if someone is holding the button then we are changing a case structure to true which moves a servo +1 degree, how much wait between each iteration of the code will result in the fluid motion we see within Teleop.vi?

Thanks.

EDIT - Also, is the Select function more efficient than a Case Structure?
Reply With Quote