Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the two output analog signal from DAQ6015 to control a stepper motor?

Hi friends;
i am completely new about motion control. and now i am trying to use a DAQ6015 output analog signal to drive the stepper motor to do position control through labview 8.0.
could anyone tell me how to do it?  how to use the two output analog signals? i believe there must be some subvi. anyone can help me?
cheers
dan
0 Kudos
Message 1 of 12
(5,969 Views)
 

Dan:

You cannot typically drive a stepper motor with analog signals. You need a device called a driver which is a circuit that applies power to the motor windings in a proper sequence. Such drivers typically accept digital signals- one for selecting the direction of rotation, the other to control speed of rotation. The speed signal is typically a pulse train created by a timer/counter on the DAQ card (offhand I do not know if the 6015 has timer/counters, check your manual). The other option is to toggle a digital output line on and off with software timing- not 100% accurate and has an upper speed limit of less than 1000 Hertz. Hope I haven't bamboozled you with a lot of jargon.

Here is a brief tutorial on steppers:

http://zone.ni.com/devzone/conceptd.nsf/webmain/786DCA29F029AE588625688600517B15 

Numerous people have used LabVIEW with both methods above to drive steppers. You need to find out what driver is suitable for your motor from the manufacturer, they are not that expensive. Some drivers even connect to the serial port. You can also build your own if you have the capabilites.

We need to know a little bit more about your motor and your intended application.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 12
(5,951 Views)
Hi:
thank you for your reply.
i do have the stepper motor driver.  and  i can connect it with my computer. however, i do not know how to drive this motor.
i believe the two analog signals is to control the motor, one is for the speed and the other is for direciton.
some friend told me, i have to use squarewave signal to control the motor.
all i have do is to position a piston inside a cylinder. the labview program can generate the position data, for example 5 cm. and i want the motor can drive the piston to move.
however, how to transfer the 5cm data to the signal, which the motor can recognize. this is my problem.
cheers
dan 
0 Kudos
Message 3 of 12
(5,938 Views)
Hi Dan,

Could you provide some more information on your hardware?

I understand that you have a stepper motor but do you have a drive to control the stepper motor?

If you have a drive, how is it connected to your computer, with a PCI card, over serial, ethernet... ?

Who is the manufacturer of the motor drive? Do you have a soft copy of the manual? If so could you post it?

Once we have more information about all the hardware you have, how it's connected to your PC and any other information you think is relevent we'll be better able to help, or at least point you in the right direction.

Kind regards,
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 4 of 12
(5,931 Views)
Dear Sarah:
thank you for your email.
i have the drive, which is manufactured by our technician. and all i want is output two signals to drive this motor. one is a signal, jump between 0 and 5 volts. another one is squarewave signal. the first signal is to control the direction, the second is to control the speed of the stepper motor.
if you can generate one, please email to me.
or i can ring you, if you do not mind.
cheers
dan
0 Kudos
Message 5 of 12
(5,914 Views)

Hi Dan,

You may be able to do this with your DAQPad 6015 but it will depend on the specifications of the drive. You should find out what current level is required to control the drive. The AO of the 6015 is only +/-5mA so if it's any more then that you will need some additional circuitry to generate the necessary current.

It might be best if we spoke so I can determine how you will be able to control this motor. I think you will just need to generate some code to control the DAQ card but I'm not exactly sure what you will need.

For example if you want to move it to a specific position you may want some feedback in the form of an encoder on the motor that keeps track of how far the motor has moved. 

I believe I sent you an email on friday (is your name Dan Zhao?). If you call in to our office on 01635 572400, ask to speak to Sarah and quote the reference number in the subject of the email. We can go through the details of your system on the phone and I can figure out what you need to be able to control your motor.

Kind regards,

 
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 6 of 12
(5,895 Views)
 

Hi,

as nobody has done this before, I just want to add some comments to this thread:

DAQ boards are primarily designed for measurement tasks. They can be used for control tasks, too but this typically requires the use of a real-time system. This is also necessary if there is no control loop involved but other real-time tasks like monitoring limit-switches and following error.

Controlling a motor is much easier by using a motion control board. These boards take care of all real-time tasks onboard and it's much simpler to command the motor. E. g. for a straight line move you just need to load parameters for acceleration, velocity and target position. Then you send the start command to the motor and the rest is done by the board.

Here is an example of a simple straight move with position monitor:



A motion control board might be slightly more expensive than a DAQ device but the price difference pays off quickly by saving a lot of time when developing the application.

Best regards,

Jochen Klier
National Instruments Germany

 

Message Edited by Jochen on 07-24-2006 11:50 AM

0 Kudos
Message 7 of 12
(5,889 Views)
Hi Sarah:
i am totally new about stepper motor. i need to know much more about my stepper motor. i gonna ask for more information from our technician. then i will give you a call.
thank you for you help.
cheers
dan
 
0 Kudos
Message 8 of 12
(5,883 Views)
Dear Sarah:
thank you for your email.
this morning i have just worked out the two AO signal by myself. you did help me so much.
hey, some day if you can come to cambridge, i will buy you a beer.
cheers.
dan
 

Message Edited by 128 on 07-25-2006 06:04 AM

0 Kudos
Message 9 of 12
(5,869 Views)
Hi Dan,

Glad to be of help!

Good luck with the application and feel free to contact me again if you're having more problems.

Kind regards,
Sarah

Applications Engineer | National Instruments | UK & Ireland
Message 10 of 12
(5,866 Views)