Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

restart stepper motor after limit switch activated

Hello,

 

I am currently using LabVIEW to control a stepper motor that is attached to a lead screw and I am using limit switches that connect to an analog input of my DAQ device to stop the stepper motor when the nut of the lead screw reaches the limits. I am unsure how I can use the analog input from the limit switches to stop the motor turning in one direction but allows the motor to turn in the opposite direction, twisting the nut of the lead screw away from the limit switch. Any help with this would be greatly appreciated. I am using Labview version 8.2. Outputs from my DAQ are digital outs for pulse direction and enable and analog inputs Ai1 and Ai2 for upper and lower limit switches.

 

Thank you.

0 Kudos
Message 1 of 4
(4,986 Views)

Hi Feek

 

What DAQ device are you using?

 

What type of stepper motor are you using, are they unipolar or bipolar?

 

Are you using NI Motion drivers and if you are which ones?

 

Please let me know so that I can give you further assistance.

 

In the meantime take a look at the following thread

 

http://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Lineair-motion-control-advice/m-p/570989#M53...

 

Regards

 

Robert 

Regards

Robert

National Instruments UK & Ireland
0 Kudos
Message 2 of 4
(4,969 Views)

Hi Robert,

 

I am using the USB 6008 DAQ with labview 8.2. I am using an astrosyn Bipolar stepper motor with 8 leads, MY702, and an external stepper driver by astrosyn, P402A. I am generating the pulse enable and direction using labview and the digital outputs of the DAQ. A 5v analog input from the limit switches is being read and these can be set to normally closed or normally high. I can use the limit switches to stop the motors in a number of ways (Break connection to enable, pulse, 24v power to driver or to stop the loop in labview), however I am unsure how to start driving the motor back after it has reached the limit switch. With the limit switch pressed then the connection to the ways I have mentioned are all broken or the loop is set to stop. Is there another way of operating these limit switches so that it will stop the motor but I will have the option to drive the motor in the opposite direction away from the limit switch. A software solution is what I am looking for. Thank you,

 

Regards,

 

Feek

0 Kudos
Message 3 of 4
(4,953 Views)

Hi Feek

 

A possible software solution would be to use a state machine architecture with case structures controlling the next state. The case structures would be controlled by a Boolean input read from the limit switches in a pulse format. To control the direction of the motor as far as the data that i can retrieve from the internet, the P402A stepper motor driver has a Direction signal clockwise or counter clockwise rotation input. The desired signal for this can be set in the appropriate state in the state machine. See link below for state machine design.

 

http://zone.ni.com/devzone/cda/tut/p/id/3024

 

Regards

 

Robert 

Regards

Robert

National Instruments UK & Ireland
0 Kudos
Message 4 of 4
(4,930 Views)