View Single Post
  #5   Spotlight this post!  
Unread 08-02-2012, 10:20
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Servo back and forth

Quote:
Originally Posted by Wiifi View Post
The -1 and 1 constants basically mean the motor is going in full reverse or full forward. I suggest adding something such as a wait command and time how long it takes to go that far. I'm not a guru when it comes to Labview but all you are doing right there is taking the maximum and increasing it by 85. I can probably take a screen shot tomorrow when I get in if you need an example.
This is true for the Set Output vi for Motor Controls. The OP is using a Servo and is using the Set Angle.vi, which takes in a range of 0-360 degrees I believe (most Servo's have a usable range of 180 degrees or less, see your servo datasheet for this info).

As dbeckwith said, the first problem is the boolean operator on the floating point wires. I don't know how this would work, but I'm sure it's not what you intended. From what you stated you only want to have one button to control this, so you don't need to use the OR at all (If you want to use another button to control this, you can use the OR to select either buttons). On the input of your Select use your button and the values should be 0 and your other value (I assume 180). The output of that should go directly into the Set Angle.vi. Finally calibrate your servo down position by removing the screw holding the servo horn, rotating the output gear to it's maximum down position and reinstall the servo horn and screw.
__________________