|
Re: Use a button to make a motor move a certain number of rotations
You would put it as an input to the drive (where you have it), but you have to have the drive motors properly configured. One other thing, is that you need a little more logic to latch the value. The Teleop.vi runs approximately every 20 ms. As soon as you let go of the button, your input will be to drive the motor back to the 0 position. This isn't what you want.
If you intend to drive your robot completely with position commands, you will need a state machine that keeps track of the current values, incrementing and decrementing the intended position.
It is much easier to drive in speed or voltage mode.
|