LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stepper motor positioning control system

hello

 

Iam building positioning control system using a stepper motor, and I need to know what are some position sensors available to feedback the position of the stepper motor.. Also I need to know how can use a C code in the labview...For example, if I have an algorithm developed in C; How can I use that code in the labview..

 

 

Thanks

Shaham

0 Kudos
Message 1 of 9
(4,307 Views)

Shaham,

 

Below is a link to several encoders that NI provides specifically for stepper motors.

 

Quadrature Encoder:

http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321

 

As far as the C code is concerned, this can be accomplished in two different ways, provided that the code is first placed in a dll file.  

 

First, you can import the dll into a project library, by selecting Tools»Import»Shared Library.  This option is good for code that will be used often, as it creates wrapper VIs for each function that can be reused.

 

Secondly, a "Call Library Function" node can be used to call a C function from a dll.  This procedure is shown in the following tutorial, and is useful when code only needs to be called a few times.

 

http://decibel.ni.com/content/docs/DOC-9069

 

 

I hope this helps!

 

Drew

Drew T.
Camber Ridge, LLC.
Message 2 of 9
(4,280 Views)

ok that helps a lot, ok now iam using an amplier to drive a stepper motor not an acutal drive or something. I need to control a stepper motor using just the labview without using any addons like motion control or anything--are there any example VIs that you can refer me that shows the control of stepper motor. Also, what are some other ways to sense the position of stepper motor without using the incoder.

 

Thanks

0 Kudos
Message 3 of 9
(4,253 Views)

Hello,

What types of signals does your amplifier input?  Just a voltage or current range?  If so, what is the range of the input?  If you have a stepper motor amplifier that will provide the current needed for your specific motor then it shouldn't be very difficult to use a PCI board to provide the current or voltage or PWM signal without using NI Motion.  However, this is a very simple case in which you will only have very basic control of the motor.  Using a NI motion controller with the NI-Motion or NI-SoftMotion software provides trajectory generation, I/O, feedback interface, torque control, advanced motion, etc....all built into the API and board/module.  Can you give some more information about the application and hardware and possibly why using the motion add-ons is not a viable solution?  Also, could you explain why an encoder would not be a good solution?  There is no built-in feedback to the vast majority of motors so if you want to run a closed-loop system, an encoder is the most common method (even though there are a variety of encoder types).  Besides encoders, there are also analog feedback sensors that can be used with the motors.

Carlton
CLA
0 Kudos
Message 4 of 9
(4,244 Views)

Hi

 

Thnkx for the reply-well iam not doin anything big--just working on school project, and I've been doin some research on the NI website since I've never used NI Labview for this purpose. Because it is just  project for school, iam trying to build a positioning control sys using stepper motor;, without having to use any sophisticated controller or software-Iam trying to keep the cost as low as possible my budget is 50 to 100 dollars max. The amplifier Iam using is LM675,  The hardware and software I have is: NI LABVIEW, NI ELVIS DAQ; and NI DAQ Max software. The reason I asked about alternatives to encoder was because most of the encoders I see from NI are quite expensive when looking at the scope of this project.

 

 

0 Kudos
Message 5 of 9
(4,229 Views)

The other common way to handle stepper positioning is with a home sensor that provides a digital signal at a fixed position.  When the system starts up, it rotates the motor until it finds that home position.  By using the home position as your reference point you can get repeatable positioning without an encoder.  What type of sensor is appropriate for your application depends on the system, but if you need something cheap you might be able to use a simple push button that closes a contact (for example, you might mount a disc to your motor shaft with small bump on it that would hit the button).

0 Kudos
Message 6 of 9
(4,203 Views)

where can I find these home sensors, could you tell me any website where I can find the datasheet and the cost of such sensors

0 Kudos
Message 7 of 9
(4,184 Views)

Hi there. How many increments are there to your stepper? We use a stepper with about 12 or 14 steps at work here, without any position feedback at all. We analyse the data from the wheel attached to the stepper to determine the 3 active regions we measure.

 

Tay

0 Kudos
Message 8 of 9
(4,176 Views)

As I wrote in my previous message, you can use almost anything as a home sensor so long as it supplies a signal that your system can use.  You'll need to research something appropriate for your system.  You need is a sensor that will trigger at a specific point in the rotation of your motor (or, if you are driving a linear actuator, a sensor that will trigger at a specific point along the travel distance).  This could be a reed switch, a hall effect sensor, an optical sensor (when the beam is interrupted, you've reached the home position), or, as I wrote earlier, a simple push-button.

0 Kudos
Message 9 of 9
(4,166 Views)