View Single Post
  #4   Spotlight this post!  
Unread 15-02-2015, 15:11
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

What is the number of pulses per rev for the built-in encoders? I think the only legal motors that have built-in encoders have 7 pulses per revolution and a 71:1 step down through the typically attached gearboxes. Are these the ones that you are using?

If so, that could correspond to 7 x 4 x 71 = 1988 counts per revolution. The factor of four is because the encoder is quadrature, and has four registered pulse edges per pulse cycle. That means you would be seeking a count of approximately 7475. The math changes if you are using a different gearbox. Note that the numbers I am using are integers. You can't have fractional pulses.

All of this assumes that you set the output type as position in Begin.vi, and that you have appropriate PID terms.
Reply With Quote