LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Stepper Motor

Hi All.

 

I am pretty new to Labview, and am looking for some advice in controlling a set of two stepper motors.  I have some experience with controlling stepper motors, but previously I used Matlab to create a binary script that was read into Labview to create a motion that I desired for the two motors.  Now I am hoping to control the motors using coordinates read in from another system (not an encoder, but a completely different system).  I basically just want the motors to follow the X and Y coordinates as they are read into Labview from the other system.  Any ideas are appreciated.

 

Thanks!

Jacob

0 Kudos
Message 1 of 6
(2,958 Views)

Well I would say step one would be to first figure out how to interface w/ the motors/motor controllers from LabVIEW i.e. a LabVIEW "driver" either that already exists depending on the manufacturer or that you may have to create



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 2 of 6
(2,931 Views)

I already have a Labview driver to interface with the motors.  I use the digital outputs on the DAQ to control the motors: one pair to tell them to step or not, and another pair to change direction or not.

0 Kudos
Message 3 of 6
(2,904 Views)

By LabVIEW driver I'm ssuming you mean the DAQ drivers and I'm also assuming since you're using a DAQ to control the motors you don't have an actual motor controller which means you will have to write the code to perform the function of a physical motor controller.

 

Since it sounds like you're starting with a pretty low-level interface, I would say the next step is to write a wrapper that lets you input a) Step Direction and b) No of Steps to make in the direction

 

Then you could use that function within what will ultimately be your "motor controller" which will keep track of where the motor currently is based on previous steps, and use that to enable the use of an absolute position your high level input.



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 4 of 6
(2,880 Views)

I also have an actual motor controller (an Applied Motion PDO 3540, which I will attach the manual for, for reference).  So I'm going from Labview, through an NI DAQ, and then to the driver to control the motors.  The only inputs for the driver are the 2 step inputs and the 2 direction inputs.

Message 5 of 6
(2,872 Views)
Hi jb0423

As it is digital daq you can use positive (true )for forward direction and negative (false) for reverse direction...
it can be adjusted in stepper motor settings what is the angle needs to be rotated for each pulse based on that you can trigger your input ....
0 Kudos
Message 6 of 6
(2,856 Views)