FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping Motor?

What function(s)/structure(s) would I use to stop a motor?

After hitting a limit switch, I want the motor to "brake": I want it to stop, but still give resistance, and disable the control to move in that direction.

Here's what I have so far.

I want Button 4 to be disabled after hiting the limit switch, and at the same time "freeze/lock" the motor in place.

Capture.PNG

0 Kudos
Message 1 of 3
(5,880 Views)

Hello ElectroMancer,

How much force is going to be on the motor? If there is a low load you could simply stop the motor once the limit switch is enabled. If there is going to be a large load on the motor and you have an encoder you can set the motor to stop once the limit switch is enabled. You could then measure the position of your motor angle and create a control loop to maintain this position until an external event occurs like a fire command.

Wear
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 3
(3,694 Views)

What motor are you using? I think if you are using the CIM motors the speed controllers can be set to brake or coast when a neutral PWM is applied.

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 3 of 3
(3,694 Views)