View Single Post
  #1   Spotlight this post!  
Unread 15-02-2015, 14:50
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Use a button to make a motor move a certain number of rotations

It depends on how you set your motors in Begin.vi, and what type of motor controllers you are using. Most likely, this will cause your motors to run at full speed forward or backward, while the button is pressed.

If you are using encoders and configured Talon SRX's to use CAN and position control with proper PID values, you may get a twitch. You will need proper software setup, encoders, and good PID values to do what you want to do accurately.

The drive reference contains data that will configure the various drive and motor vi's to interpret their inputs properly. By default, the maximum input/output is 1, which corresponds to a 100% forward or backward. Your ±3.76... input will be seen as a saturated maximum of 1. The default mode if you just open a can Talon SRX will be Percent Vbus, which works the same as PWM, and doesn't use feedback from an encoder.

All of this being said, you can approximate the closed-loop control to do what you want with a sensibly low speed and a timer, but this will take a LOT of experimentation, and the results will be highly variable.
Reply With Quote