View Single Post
  #11   Spotlight this post!  
Unread 02-04-2011, 16:48
Cuyir Cuyir is offline
Registered User
FRC #0067 (The HOT Team)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 7
Cuyir is an unknown quantity at this point
Re: Servo Actuating Prematurely

Quote:
Originally Posted by Chris Hibner View Post
I helped HOT solve their servo issue at Kettering. This is what we did (using LabVIEW).

1) Create a global variable to store your desired servo position. Let's say you name it ServoPos
2) in Begin.vi, set the ServoPos global to the value that latches your minibot deploy.
3) In Teleop.vi, instead of wiring anything into a WPI set servo block, wire your servo command into the ServoPos global variable.
4) Lastly, in PeriodicTasks.vi (in the fast loop), wire the ServoPos global variable into the WPI set servo block

By using the above method, PeriodicTasks is ALWAYS commanding the servo to the latched position, even when it's disabled. The output to the servo is disabled in Disabled Mode, BUT the command to latch your servo is already there as soon as your robot becomes enabled.

When you push your button to deploy your minibot, the global variable will send your servo command to PeriodicTasks which will then unlatch your minibot deploy.
Yeah, thanks for that by the way The periodic tasks VI has been really helpful.