How to stop 1067 stepper motor

Any hardware type questions or problems for all other Phidget devices.
Post Reply
lindner
Fresh meat
Posts: 1
Joined: Wed Dec 27, 2017 10:08 pm
Contact:

How to stop 1067 stepper motor

Post by lindner »

I bought a 1067B stepper motor controller. Seems to work well and is easy to control. I am controlling the phidget using a C-program on MacOS (though eventually I will switch to C-program on linux).

I would like to be able to stop this motor controller based on a limit switch. I understand that the phidget doesn't have a direct digital inputs for stopping the motor (I read your other post explaining why, though I am still surprised to find a motor controller without digital inputs for limits). I bought a 1012_2B and some limit switches to detect when the linear stage gets to the end.

However, I am confused about what to do once I detect that a limit switch has been activated. The 1067 API that I find here

https://www.phidgets.com/?tier=3&catid= ... &prodid=66

doesn't seem to list a 'stop movement' function that I could call when I find a limit switch has been reached.

I suppose I could call PhidgetStepper_setEngaged(ch,0); but it seems that would also remove the hold current from the motor and would make the stage likely to rebound off the limit switch and end up in a poorly defined position. That doesn't seem like a good option.

I could also do something like

PhidgetStepper_getPosition(ch, &position)
PhidgetStepper_setTargetPosition(ch,position)

to read the current position and then set the target position to that position. I think this would work, though it seems pretty awkward.

Is there a simpler way of stopping the motor that I don't see?

______________________
Incidentally, the webpage API listed for the 1067B seems to be wrong. The webpage lists the API for some current sensing device:

https://www.phidgets.com/?tier=3&catid= ... rodid=1029
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: How to stop 1067 stepper motor

Post by Patrick »

You can either set the target the current position, or set the velocity to 0.

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest