LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data position from a step motor

Hi,
 
I need to save the positions of two step motors in a file... though I am not using encoders. Is it possible to save to a file the positions I am asking the motors to be in? and not just the initial and final positions?
 
Thanks  
0 Kudos
Message 1 of 5
(3,428 Views)
Hi there:

It is easy to save any data to a file.  I would add the data types you want to a cluster and save them in a datalog, this would be the easiest.  the only (as far as I know) way to save motor position information without an encoder is to count the steps and save that information.  the problem with this is the fact that if you miss a step with your motor, now all your subsequent positions will be inaccurate.  This may not be a problem for you, I don't know.  I just spent a few months working on a test stand with stepper motors and encoders and all I can say is encoders are the way to go.  They can be difficult to get working accurately (depending on how you are using them) but they are worth the time!!!   Determining position with just a stepper motor is relative guess work at best.  Depends on your implementation though.  Good luck

Greycat
0 Kudos
Message 2 of 5
(3,409 Views)
Thanks for your help, but how can I count the steps? Where is this information?
0 Kudos
Message 3 of 5
(3,380 Views)

You can send the stepper motor a finite pulse train.  Most stepper motors can be configured for the number of steps per revolution and when you send a finite pulse train, you can control how many revolutions the motor travels for each move request.  I used to do this many years ago and I found the best way for me was to know how many steps per revolution and calculate the number of pulses to send to the motor based on the desired motor travel.  I used magnetic switches to find the motor's home position however.  The drawback to stepper motors is when you turn it off, it may move or slip and you can never be sure of its position when its turned back on.  Hence, why I needed to be able to detect a "home" position.

 

Good luck,

Tom 

0 Kudos
Message 4 of 5
(3,373 Views)
Yes - you would definately have to generate the pulse train (or square wave signal) from the labview program.  This way you can "count" the pulses generated.  There are other ways to generate the required pulse train (function generator or from a DAQ card with Dig out and a counter).  When we first started working with the steppers, we generated the pulse train from the computer but found this to have it's limitations and took a surprisingly large amount of CPU power (if produced straight from dig output on a Daq).  It is a balance one has to find in thier particular application.  We ended up going with a function generator and used the encoders wired to the counters of the Daq to track position.  Our program controls the direction and enable lines to a stepper driver board, which in turn drives the steppers.  Hope this helps, let us know if you have any other questions.

Greycat
0 Kudos
Message 5 of 5
(3,364 Views)