LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Labview to control motorized stage??

Solved!
Go to solution

Hi,

I'm new to Labview and doing a project which requires using labview to control motorized stage(XYZ axis). I need to use Labview programming and have no clue at all. Looking for help, Thanks a lot!!

 

Lei,

0 Kudos
Message 1 of 7
(7,786 Views)
Learn Labview basics: http://www.ni.com/getting-started/labview-basics/
-refer links in Selecting a Stage and Motion Controller for Your Automation Application : http://www.ni.com/product-documentation/4031/en/
-Fundamentals in Motion Control :http://www.ni.com/white-paper/3367/en/
Thanks
uday
Message 2 of 7
(7,771 Views)

Is it a specific XYZ stage that you have been given for the project?  If so, tell us what it is and there's a chance you can see code someone else has used to control those stages.

 

However, just in general this board isn't meant for raw beginners.  Read some of the "getting started" links, maybe watch some tutorial videos, try writing some code, and then if you can't figure it out, come back here and post the code you made along with an explanation of what you can't get to work.  Basically, if you don't at least try to help yourself, we won't try very hard to help you back.

0 Kudos
Message 3 of 7
(7,753 Views)
Solution
Accepted by topic author Labviewfastlearn

Everything said by the others is correct and needs to be done as they describe at some point. But I've always approached these motion control projects by first looking at the "motion controller" (hopefully you have one) and "motor drivers" (which you must have) between the computer/LabVIEW and the motors and deciding what communications will be needed to those devices and get a feel for the command syntax and language to be used with them.  In some cases the motion controller and motor driver are integrated into a single unit. Heck, in some cases they are even integrated with each motor.

 

The motors may be stepper motors or perhaps servomotors.  

 

In the case of stepper motor drivers (the devices that provide the power electronics to run the motors), many of them are run using just two digital input control signals known as "step" (a pulse train) and "direction" (a hi/lo level) and while it is possible to generate these directly with the PC, it is an order of magnitude easier (if you don't already have a Motion Control Library available to manage the generation of these signals and the running of stepper motors) to have a "Motion Controller" between the PC and the "motor driver".  Stepper motor drivers can usually be configured for motor current and step size and sometimes for other more-motor/driver-tuning parameters. The configuration of these may be done with jumpers, switches or, for some drivers, with ASCII commands over some sort of communications port but in general they are values you get setup once initially and then never touch again so you don't generally need to have a full-time communications path available to change them.

 

In the case of servomotor drivers (again the devices that supply the power electronics to run the motors), many use a +/-10V analog input control signal and again while it is possible to generate the signal directly with the PC's hardware, a separate motion controller is generally much much easier and more robust.  In the case of a servo system, there is also a feedback signal from an encoder or resolver attached to the motor that must be used by whatever device is acting as the motion controller in the system.  Again there are configuration parameters associated with the driver (and controller in this case, since it is part of the servo feedback loop) that must be configured initially but once setup properly, they seldom need to be changed again.

 

A motion controller that is separate from the PC often will handle multiple motor drivers and can often coordinate motion between them. It will handle the ramping up/down of the motor's speed as that changes. It will keep track of each motor's position. In the case of the servo system, it will take the feedback signal and use it to adjust the motor's speed/position/torque. The motion controller will also handle the limit switches and home or index signal usually found on most axes of motion and provide the switch state information back to the PC.   To run the motor controller then is just a matter of stringing together a set of (usually ASCII) commands to tell it how fast to run and how far to go (plus direction) and then sending a "do it" command. You then poll it to keep track of the progress of the move and the states of the switches.

 

In many cases the builders of the motion controllers provide a primitive means of communicating with their controllers from a PC using no other software other than what they provide. With that you can at least get a feel for what the various controller commands do and the responses they produce. From that you can start building sequences of commands to perform the actions you desire. 

 

Then you can add LabVIEW to the mix and figure out how you can get it to send similar command sequences over the communication paths that are available and respond intelligently to the information it receives back from the motion controller.

Message 4 of 7
(7,718 Views)

Thanks for help!

0 Kudos
Message 5 of 7
(7,691 Views)

Thanks for help. It's a linear stage, with RS232. I have watched some videos and writed few code, just a little confused about code structure and what code I need to use. Imitation without understanding makes me puzzled. I'm trying.

0 Kudos
Message 6 of 7
(7,690 Views)

Thank you very much man, this is marvelous!!! It gives me a quick understanding. Hope I can make it soon.

0 Kudos
Message 7 of 7
(7,687 Views)