Stepper motor speed control

Dear Reader,
I want to control the speed of a 4-phase stepper motor using LabVIEW 6i and PCI 6024E card. Hence I am approaching you for help and advice. I want to control the speed of a stepper motor, which is used for rotating the diffraction grating used in the monochromator.
Please try and answer a few of my questions:
1. Can I interface the stepper motor directly with the card PCI 6024E, or I need a drive for that purpose?
2. I just want to rotate the stepper motor at a fixed speed, meaning that I don’t want to change the speed of the stepper motor in between, I need a few fixed speeds, what are the problems of controlling the stepper motor using the PCI 6024E cards?
3.Have you been successful in interfacing your stepper motor
with the 6025E card?

I have attached a library about steppers from Brad Hedstrom. It is very old and I think he would write it differently today, but it answers all of your questions. Except the typenumbers of the interface cards and that is answered by: they all are ok.
greetings from the Netherlands
Attachments:
stepper.zip ‏96 KB

Similar Messages

  • DC Motor speed control

    Hi,
    I am trying to control the speed of a 36V 2.5Amp 3000 rpm max speed DC Motor using LabVIEW.
    I need someone to guide me what are the hardware required to do this.
    1) Which DAQ is most suited for controlling the DC motor ?
    2) Any other hardware required such as a controller, etc ?
    3) Any example programs for DC motor speed control ?
    4) Any circuit diagrams explaining the connections to be made.
    I wil be grateful if someone helps me with the above said things

    Hi Kabi, 
    A DAQ card will not be able to provide the power to the motor, you should be able to generate an analog control signal and pass it through an amplifier. If you are using a servo motor it should be possible, if the motor is a stepper motor you will need a drive that you can control with step and direction commands. 
    -N
    National Instruments
    Applications Engineer

  • Stepper Motor Speed Record

    Hi,
    I am controlling a Phidget stepper motor using the VI captured below which includes a loop. I simply wish to record the speed of the motor as it runs into a text file or similar.
    Currently i am trying to create an array and then output that as a file once the loop has stopped. This isn't giving me anything
    Unfortunately i have very little LabView knowledge... is there a simple and effective way i could do this?
    Any help would be much appreciated.

    Your description of your project was a little vague.  Also, no code/image was posted as was noted above.  And, you do not run stuff into a text file.  You store data in one.  What are you using to record this data?  Are you using a constant for the amount of iterations/samples you wish to take or is this going to be dependent on a User Control?
    Remember, code does exactly what you tell it.

  • URGENT!!! motor speed control

    Dear all,
    first let me tell you my system detail:
    1. Hacker A100-8 brushless DC motor
    2. Master spin 170 pro opto (speed controller)
    3. power supply
    4. NI DAQ USB-6353
    I have already run this motor by using transmitter and remot control, like RC planes fly. Now I would ilke to run this motor from computer. let me give you my setup:
    PC > DAQ > speed controller > motor
                                       ^
                            power supply 
    now I would like to use either matlab/simulink or labview, to control or run my motor in real time using generating PWM signal. can anybody help me out? Thanks in advance.

    Since you are wanting to use DAQmx and not any of the Motion software that is made for LabVIEW the examples will be very limited. I suggest playing around with the PWM and Digital Out functions to get an understanding of how they operate.
    http://www.ni.com/tutorial/2991/en/
    You can also take a look at this example below which uses DAQmx to control a stepper motor. This is a little different than what your DC motor control setup will look like but it should be good for reference if you understand how stepper motors work.
    https://decibel.ni.com/content/docs/DOC-6385
    I still suggest posting this in the general section of the forums as it will get many more views and thats really what your application is about. This forum will get more views for things like SoftMotion which is NIs motion control software. Since you are working with DAQmx however you would want people who work more frequently with DAQmx to view your post, which will be in the general section of the forum.

  • 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

    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.
    NIC AE Specialist

  • Simulating Electronic (Analog) Motor Speed Control

    Is there a way of simulating (Analog) Electronic Speed Control in Multisim 10?  The system involves a permanent magnet DC motor with quadrature encoder, a frequency-to-voltage converter, operational amplifier circuits, and a MOSFET driver.  The parts that I am wondering about are the motor and encoder.

    Multisim has a motor but I don't see a quadrature encoder. The only problem I see is with the quadrature encoder as it partially works in  the mechanical area on a rotating shaft. There are no moving parts in Multisim or any other spice software that I know of. That would have to be simulated by creating a circuit in the electrical area that would mimic the mechanical function of the quadrature encoder. This could be a huge task and I wouldn't even begin to know how to accomplish that.
    Multisim's motor has a pin on it that electrically represents the RPM as a voltage that is read on a multimeter. I have found that it doesn't always work as expected in all applications. You would just have to try it and see it it works for you by adjusting it to your motor specifications.
    This is all I can tell you and if someone has an idea I would hope they would post it for you
    Kittmaster's Component Database
    http://ni.kittmaster.com
    Have a Nice Day

  • DC motor speed control using LQR controller

    can i control the speed of a DC motor using Linear Quadratic Regulator (LQR) controller in LAb view

    In short, yes. The best experience is when you actually have the LabVIEW Control Design and Simulation Module. Here are some examples related to this topic:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Case Studies\Mechatronics\DC Motor\CDEx DC Motor with State-Space.vi
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Case Studies\Mechatronics\DC Motor\CDEx Robust DC Motor.vi
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Control Design\State-Space Synthesis\CDEx LQR.vi
    Notice that you have much more examples of LQR and Motors under:
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Control Design\State-Space Synthesis
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Case Studies\Mechatronics
    C:\Program Files (x86)\National Instruments\LabVIEW 2013\examples\Control and Simulation\Case Studies\Electrical Machines
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • Position drift during the stepper motor controlled back and forth motion

    Hi everyone there,
    I get a headache position drift problem during the stepper motor controlled back and forth motion. I have been wroking on the problem for the last two weeks, and still can not figure it out. So I write down here my problem in hope of getting some clues from those have some experiences in stepper motor motion control.
    My goal is to use a stepper motor to drive a beam flage fixed onto the shaft to go back and forth for a certain angle, and this back and forth motion needs to be stable and reproducible within hours. With the SMD1 stepper motor driver, I only need to send in a pulse train to control the number of steps(the pulse frequency defines the stepping rate), and another pulse to controle the direction (i.e., cw or ccw). To do this, in LabView, I used the counter of the DAQ board to produce a finite pulse train to step the motor, and used one digital line to produce a pulse to switch the direction every 500ms, the timing is contolled by the software.(I used the oscilloscope to monitor these two pulses, the pulse train produced by the counter looks very stable, and delay between the pulse edges of the direction pulse and the pulse train is also very stable within 500ms. There seems no software timing problems at such a long delay.)  And this labview controlled motor appears to work perfectly as I required, the motor steps a defined number of steps at one direction, and then steps back at the origin position. But after running for a few minutes, the back position shifts gradually(I can not observe a obvious shift at the first few minutes) with repect to the origin position(the position I start running). I looked it up at the manual and also the website, I got a clue that this might because the motor steps at the resonace frequency of the motor and hence misses or takes extral steps sometimes. So I changed the steping rate from 1Hz to 1000Hz to see if the shift disappears or gets smaller at certain frequency range, but the shift always exists.
    I did observe the shift got smaller within the same running time when change the step model from full step (1.8degree/step)to half and quarter step model. According to this, the motor did miss steps (or pulses) during running, the quarter step model has smaller shift due to the smaller steps.  But I also noticed that the motor always shift at one direction, no matter I started with clockwise or counter-clockwise, this seems really strange to me. Because the motor should shift at each direction with the same probability if we assume the motor missis steps randomly.
    There is something must be wrong, either the labveiw program or the motor, but I don't even know a clue of this weird shift problem. And because of this, I haven't made any progress in my lab for the last three weeks. So any suggestions could be very helpful for solving this headache and will be really appreciated.
    Thanks a million in advance and Merry Christmas!
    Li

    Hey, Brian Beal,
    Thanks for your quick response. "accel" and "decel" mean acceleration and deceleration, am I understanding right?
    If yes, then I don't have these in my LabView program, I just generate one TTL pulse train and one TTL pulse with LabView and send them into the SMD1 stepper motor driver.
    The pulse train steps the shaft, and the other switchs the direction.
    Yesterday, I confirmed that if the motor steer always at one direction either CW or CCW, then the stepping were very stable, no missing or extra steps happen for hours.
    And I also observed that the motor took one extra step  from time to time when the direction changes. And this only happens when the direction switch from CW to CCW. (bizarre!)
    I guess this indicates that some pulse noise happens when the motor switch the direction too often.  But I just don't have any clue for irregular extra steps.

  • Stepper motor and NI6025E card

    I want to control a stepper motor with a 6025E National instrument card. My stepper motor is controlled with a microstep controller.
    Does anybody have already done that ? I am interested by some examples...
    Please HELP me...
    Frederic
    [email protected]

    I don't have any examples but I have done this before and it's not that difficult in principle. Getting precise timing can be tricky, and you'll have to use counters rather than the regular DIO ports for that kind of precision.
    I had an MC3479 stepper motor driver to control each motor (there were 2). The way I did it was to use a counter for the clock signal and the DIO ports for control. I generated a gated pulse train on one of the counters, with a DIO pin (DIO 0)as the gate. The Direction, Full/Half step, and other control lines were also connected to the DIO port. I just wrote out whatever data word I needed to setup the motion I wanted, with the pin 0 high to let the clock move the motor. The motor had to be stopped by clearing bit 0, which I had after a tim
    ing delay that was changed in the program. It required a little calculation to get the time delay matched with the frequency of the pulse train to get the number of steps I needed, and it was only approximate; I wasn't worried about exact position as much as being able to adjust the position dynamically.
    For precise position you might try using just a digital line to increment the clock. This is simplest, but the timing will depend on your program. You can also use the other counter for a very precise gate signal, which gives accuracy as well as time-specific rotation, but uses the other counter and is programmatically more complex.

  • Running 2 stepper motors with LabVIEW using RMV ST400-NT controller and driver

    Hello, I am new to programming as well as motors in general so please bare with me in my attempt to explain myself. I have a project involving laser therapy and I am attempting to control two stepper motors from Falhauber, Type AM2224-R3-AV-4.8. I will be using a RMV ST400-NT controller and driver. Original plan was to use 3 stepper motors for control in 3 axis but realized 2 axis is complicated enough. My power source is an Agilent E3630A. I am new to this whole thing and from what I have read form examples and other posts is that NI drivers seem to work best for these applications. I've written simple programs from examples, reading and watching videos. I want to know whether it's possible for these to work together using LabVIEW and also a nudge to help me get started would be much appreciated. Can someone please help guide me in the right direction, I feel a bit lost when it comes to all this. Thank you for your time and consideration.  Also, I will be using Windows 8 laptop with Labview 8.5. I have attached pics of components I will be using.
    Justo T.
    Attachments:
    photo 1.JPG ‏1150 KB
    photo 2.JPG ‏987 KB
    photo 3.JPG ‏1085 KB

    Hi jtarula,
    I want to preface this response by saying that I am mre familiar with NI controller and driver rather than the one that you have. I am assuming that you are using the dll provided by the manufacturer here:
    http://www.rmv.com/download.htm
    With these, you should be able to interface with LabVIEW using the call library function node. What the controller is capable I am uncertain of. I am certain that you should be able to since another user has commented on the use in LabVIEW before in another forum post.
    I also want to let you know that LabVIEW 8.5 is not supported on Windows 8, which means that you may run into some compatibility issues. Here is the compatibility chart.
    Paolo F.
    National Instruments
    Applications Engineer

  • Write a Labview program to control both speed and direction of stepper motors

    Hello,
    I am currently undertaking a project in University. As part of it I have to run two stepper motors at varying speeds, and one of them in forward/reverse. The motor I have for the project is a RS 191-8334 (V9728) and the controller is a RS 240-7920 (v10900). I have no experience of using Labview, and the version I have on my laptop is Labview 10. Any help would be greatly appreciated.
    Ideally I would want a program to do both full/half steps, forward/reverse, have speed control and be able to control the number of steps.

    Hi Wef,
    I would need to know more information about the devices in order to assist you.
    What inputs does the stepper motor controller require and what hardware are you using to supply the required signals to the motor.
    Best regards,
    Stephen C
    Applications Engineer

  • Using LabView, Arduino, and Easy-Driver to control a Stepper Motor

    Hello fair folks of the LabView forums!
    I am a humble engineering student in need of some advice and input on a project I am working on.
    I’ve also done a fair amount of reading on the LabView forums with people trying to use LabView and Arduino to control stepper motors, and I’ve used as much information from each as I could. However the problem I'm encountering now is one which is unique to my VI Configuration.
    So, here is what has been done thus far:
    -Installed LabView Interface for Arduino [LIFA]
    -Installed necessary VISA drivers for LabView to communicate with arduino
    -Uploaded firmware to Arduino to allow it to communicate with LabView
    -Properly wired Stepper Motor with Easy Driver and Power Supply; I have verified this by first using the Arduino independently of LabView, using example code found here.
    -I have created a VI, and have just recently got it to run without reporting back any errors. While I suspect the behavior I’m encountering has to do with something inside the VI, it is difficult to determine as there are no errors being reported!
    But here is general problem I am encountering:
    -Connect Joystick to USB Port, connect Arduino to USB Port.
    -Plug in outlet for Power Supply
    -Open LabView VI
    -Run LabView VI
    -LabView successfully detects Joystick, and Arduino.
    -Tilt Joystick; Stepper Motor moves in proper direction, but it only takes a single step. If held, it does not move further. If returned to zero, and then tilted, it again only takes a single step.
    I know that in the example code, the Arduino issued the step command by writing the signal from LOW to HIGH, and varied the speed by how often it did this.
    I assumed that the Write-PWM feature would do this same thing, but perhaps my assumption is wrong. I will continue to tinker with this myself, but I would be extremely grateful for any insight you might be able to lend.
    I’m thinking, if not the Arduino Write-PMW feature perhaps a simple timing-sequence that could be used to alternate between writing 0 and 1, with the timescale of the sequence being scaled to the X-Axis from the Joystick. But, I am open to suggestions, and certainly appreciate any thoughts you may have to offer!
    Attached to this is the VI used in this setup, a picture of said VI, as well as a rough sketch of the hardware configuration.
    Thank you!
    Attachments:
    Arduino Stepper Control.vi ‏1224 KB
    VI Picture.png ‏82 KB
    Configuration Sketch.png ‏522 KB

    Hi danjifraga,
    I am not so familiar with the Arduino toolkit functions, but you may have better luck looking at the Arduino page at:
    www.ni.com/arduino
    I'll ask around on Monday to see if anyone is more familiar with the toolkit.
    Good luck,
    Brian
    Brian G.

  • How can I change the speed of a stepper motor?

    HSI bipolar Linear Actuator Size14, HSI Chopper Driver 40105, NI PCI-6052E, NI SC-2345, 2 SCC-DO01 modules, and SCC-FT01
    The motor works at one speed with a boolean array input, using the SCC-DO01.  But I need to be able to change the speed of the motor.  Specifically it needs to operate on several frequencies of functions of as displacement vs. time, such as sine wave, triangle wave, and square wave.  I tried to find information about using a digital pulse train but had no luck.  Is it even possible to accomplish with this hardware?
    Message Edited by Draben on 01-22-2006 09:43 PM

    In general E-Series DAQ-boards like the PCI-6052E are not very good for motion control tasks. The 6052E doesn't provide hardware timed digital I/Os so you can control the digital lines only by software. This is both slow and inaccurate as long as you are running the board under a non-deterministic OS like Windows.
    On a real-time OS the jitter would be better but still the frequency would be low and it would still be hard to program accurate acceleration and deceleration ramps.
    If you use the counter/timer instead of the digital I/Os you could reach higher velocities and a much better timing accuracy but it would be even harder to program acceleration/deceleration ramps which you will need if you want to reach higher velocities with your stepper motor. Additionally for motion control applications you may want features like limit switch monitoring and following error tracking which require again real-time capabilities.
    With this said I don't recommend the usage of a multifunction DAQ board as a motion control board. Please have a look at the NI motion control boards like the PCI-7332 which does all the motion I/O and trajectory control onboard.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • How do you controlling a stepper motor

    I want to control a stepper that is lifting a scissors lift but I want to calibrate it to different height enter in the heights into memory and then recall when necessary.

    Not sure if you were looking for electrical help or programming help. If you want more details you could reply to the thread....
    You need a stepper motor controller. This is an electronic circuit. They can probably be found with a web search. The range in prices from $50 to $1000 or more. Or you can build one using componants from National Semiconductor or Allegro or Texas Instruments or other chip makers.
    Depending on motor configuration, you can have a unipolar (6 wires, 3 wires per phase) or bipolar system (4 wires, 2 wires per phase). If you don't have instructions with your motor, you can figure out phasing with an ohmmeter.
    Usually the controller has a square-wave input and a direction input. Sometimes some other inputs. Usually there is one step (or even one microstep, depending on the controller) per rising edge. Sometimes they have an analog speed input, but this kind of controller is probably not right for your application.
    You can count steps in one direction. The stepper controller takes care of powering the windings to make the motor turn round. Then count steps back. Unless you have stalled the motor, the motor steps are very repeatable in location. If you remember how many steps from some reference point (i.e. all the way in one direction, say), you can save the position reference and come back to the location by counting up or down until your current position reference matched your saved reference.
    Hope this helps some.

  • How can I control 3 stepper motor in same time?

    I want to control 3 stepper motor and 30 electro-valves.
    I only had a few lessons on how to control one in C in college.
    Now I need to do this in labview and using an board from NI
    How can do the control of the three motors in same time?
    What the best board to do this. Maybe the NI PCI 6034.
    But I will need more than one?

    At least some of the NI motor controller boards have up to 32 digital lines which can be set to input or output. I did not write the software for our systems but we are using quite a few of the digital lines for our systems and have no problems reading the digital inputs or setting the digital outputs. Also, the digital outputs offer a high current sink capability and usually can be used to drive external drives without any interface circuits.
    The digital lines are available on a separate connector of the NI boards and there are also break-out boxes (with screw terminals) available. I do not see any serious problems to do your control tasks just with one NI motion controller board, as long as you do not have any special requirements (high sampling speed, high frequency pulse output etc) for the digital lines.

Maybe you are looking for