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.

Similar Messages

  • 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

  • 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

  • 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

  • Shared variable engine modbus - Getting a stepper motor to work

    Hello,
    I am new to Labview. I need to trigger the stepper motor to start by allowing current to run through the motor. This can be done by turning bit3 on the16 bit register 007Dh. The register address has been attached below as 007Dh.png so please view that before you go any further to have a better sense of what i'm trying to accomplish. Please also note that the decimal conversion of 007Dh is 125.
    So my question is, how do you turn on bit3 of that 16 bit address? How would you translate the holding registers from the manual
    into a 5-6 digit data item that labview can understand?
    (Please refer to this page for the types of data items: http://zone.ni.com/reference/en-XX/help/371618J-01/lvmve/dsc_modbus_using/)
    Attachments:
    007Dh.png ‏17 KB

    Hello Frank,
    Thank you for the help with the modbus slave simulator, everything worked just fine. However I still can't get the real device to work with labview. I am wonding if you can answer a question for me as I am not sure I can do what I want with the equipment I have. 
    What I need to do is turn a stepping motor on and off using Labview as well as get Labview to record the speed and position of the stepping motor over time. I have an AED-AD stepping motor driver made by Oriental Motors. I have attached the user manual in case you need to see it. I am conecting the motor driver device to a computer using an RS485 converter, which oriental motors suggested I use for the purpose of using Labview to collect data. 
    My question is, will this setup work for what I need to do, or do I need some kind of data aquisition device as well? 
    After I solve this, I will be adding three more motors to the Labview program monitoring the same thing as well as some pressure sensors.
    I have just finished my second year in the engineering program and have been hired as a research assistant to solve this problem so I am completely new to Labview. If there is anything else you can suggest to read or someone I can talk to to get more information about this type of control systems I would be very greatful. So far, I have been reading as much stuff as I can find about Labview on the internet but I have not come across anything that helps me figure out if my setup is appropriate for collecting data in Labview.
    Thank you again for your help and advice! I hope you are having a great weekend!
    Kind Regards,
    Meesh
    Attachments:
    HM-60065-3E.pdf ‏1787 KB

  • Stepper motor pulses per step measurement (Step Angle)

    Hi everybody,
    Recently I have one project to do step angle measurement for a stepper motor. The motor will couple with A,B phase encoder, and PXI-6602 card is used to count the pulse from encoder.
    Well, the test will make the motor to rotate 1 revolutuion (360 degree) i.e. 200 steps are required. The software must able to measure and record the pulses per stepper's step i.e. 1.8 degree until 1 revolution is reached. But now the PXI-6602 will only present the accumulative counts per revolution, Any idea can split the accumulative count into small per step count with high speed and accurate method.
    Thanks & Best regard. 

    What is it you need to characterize?  For what purpose?  Using an external sampling clock can help make the test run much more quickly, but is not absolutely necessary.
    One of my first counter-based apps was to characterize a stepper motor with a microstepping drive.  1 counter measured the step and direction signals going from the motor controller to the microstepping drive.  1 counter measured a quadrature encoder.  Only the encoder measurement used a sampling clock, and it was internal.
    My technique included considerations such as:
    1. I did not move in single steps.  It may be a little less crucial to you with a 200 step/rev motor & drive.  I had something like 3200 step/rev as I recall.  Friction alone could have prevented any motion from occurring on single steps. 
    2. Each motion moved some small-ish prime number of steps so I could move around many many revs and be sure to land on each stopping position an equal # of times.  A simpler method would be to move 1 rev + 1 step.  In your case, that's 201 steps.  The downside is that you extend testing time.  With a 200 step/rev motor, this shouldn't be such a burden though.
    3. After all step pulses were issued, I started monitoring the encoder data.  I looped around evaluating chunks of position data to determine when I had a dataset that looked "settled."  The main criteria I used were slope and standard deviation.  When the criteria were met, I would store the median value.  You could consider using a mean or an RMS as well.
    4. Repeat enough times that you land on each stopping position a statistically significant # of times.  Rule of thumb seems to be about 30.  That would give you 6000 actuations of 201 steps each.  Seems feasible that test time might be in the 1-2 hour realm.
    -Kevin P.

  • Stepper Motor with Linear Stage (Position Control and Data Acquisition)

    Hey All,
    So.. I've attached a stepper motor to a linear stage and so far it's working pretty well.  Using a stepper motor driver from Pololu, I've simplified the control of the motor by just using output pulses from the counter output of a PXI-6143.  I've tested the motor using the Pulse Train examples in LabVIEW and all is working well.  
    My goal now is to allow the user to collect data from a pressure sensor, attached to the linear stage, every X number of steps.  From what I can tell so far, and please correct me if I'm wrong, the motor step movement is synchronised with the pulse train input.  That is to say, if I give the motor a 200 step pulse train, the pulse train ouput is completed at the exact time the motor has moved 200 steps.  From this, I've created a VI that moves the motor X steps, aquires the data point, and then repeats this process for the required amount of data points.  The problem with this is that the motor movement is not continuous; it stops for a split second to take the data point.
    How can I have labview ouput a pulse train of say 1000 steps and record a data point every 50 steps?
    Two ideas that came to mind were:
    1. Use the counter input port on the card to count the pulses being sent to the motor.  
    2. Use an encoder connected to the motor shaft.
    I wanted to stay away from theses ideas though since they require resources from the DAQ card.  
    Thanks,
    Ryan

    Hi Ryan,
    Just to cover all the bases, what version of LabVIEW are you using and can you attach your VI? Initially your ideas sound like they should work, do you expect to be nearly maxing out the DAQ?
    Thank you,
    Deborah Y.
    LabVIEW Real-Time Product Marketing Manager
    Certified LabVIEW Architect
    National Instruments

  • What is the data throughput in labview. I want to use the parallel as acheap digital i/o to drive a stepper motor.

    I am trying to use the parallel port on a win xp machine to send data a@ up to a 3k rate. This is for the the purpose of driving a stepper motor. I have tried the port.out vi and placed this vi in a loop and it on a scope it looks like I am limited to a a 200hz rate. What am I doing wrong??? Can labview do this or is it too slow ???
    Thanks

    snook wrote:
    > what is the data throughput in labview. I want to use the parallel as
    > acheap digital i/o to drive a stepper motor.
    >
    > I am trying to use the parallel port on a win xp machine to send data
    > a@ up to a 3k rate. This is for the the purpose of driving a stepper
    > motor. I have tried the port.out vi and placed this vi in a loop and
    > it on a scope it looks like I am limited to a a 200hz rate. What am I
    > doing wrong??? Can labview do this or is it too slow ???
    Basically the way the Port I/O VIs are implemented they call through a
    device driver for each port access. This slows down the maximum port
    accesses to something like 1000 times per second depending on the speed
    of your CPU.
    There is a way to do it faster but that is a little more trick
    y. The
    idea is to use a device driver to enable particular port addresses to be
    accessed directly from the application level instead of always going
    through the kernel.
    I have written such a VI library and accompagning DLL and device driver
    and made it available on OpenG. It is not yet part of the standard
    binary distribution packets so you will have to get it from the CVS
    repository.
    Go to:
    http://cvs.sourceforge.net/viewcvs.py/opengtoolkit/portIO/built/portio/
    and download all the files in there including the ones in the
    subdirectory "ogportio.llb" and if you like "docs"
    If you want the nitty gritty technical details you can also look at
    http://cvs.sourceforge.net/viewcvs.py/*checkout*/opengtoolkit/portIO/c_source/Description.htm?rev=1.5
    On my 866 MHz Pentium mobile I can increase the number of port accesses
    in this way from 440 ms for 4000 read byte port accesses (100us ms per
    access) to 20 ms for the same number of read accesses (5 us per access).
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • 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.

  • Code drived stepper motor

    Hello,  first to
    apologize for my bad English 
     I made a program for
    driving a stepper motor CW and CCW with pulse.
     I used USB-6008 for
    sending pulse to a motor driver..
    Now I’m making a program for driving a motor with typed in
    code:
    F=4        // Forward
    (CW) 4 steps
    B=12     //Backward
    (CCW) 12 steps
    S=2000  //Speed 2000
    B=2        // … and so
    on…
    Parser splits this code in 2 array’s then determinates a tip
    of command and then sends them to a block for driving a motor..
    PROBLEM:  Motor
    driving block is not responding ()
    (In Motor driving block Instead of  pulse generator I’ve putted a random number
    generator. Just to avoid constant connecting a hardware )
    Pleas help mi solve this problem. Thanks in advance !
    Attachments:
    Step Motor Bot.vi ‏82 KB
    Motor.vi ‏139 KB
    Parser.vi ‏30 KB

    Step Motor bot only runs once.
    If you pick Auto and run it, the block gets parsed into two arrays.  You pick out the first row of the array and send that to STM.  But there is nothing left to loop back and and set the other values in your parser.  Turn on Execution Highlighting and run it.  I'll think you see what is going on.
    I think you still need to rethink your architecture.  I think the Action Engine nugget would help you figure out what you want to do.
    Message Edited by Ravens Fan on 02-02-2009 05:49 PM
    Attachments:
    Step Motor Bot_BD.png ‏19 KB

  • Stepper motor drives

    Hi,
    I am developing a control system for the speed control of a gas turbine. So for that i need to change my present manual movement of the fuel valve to one by a stepper motor. The valve is very sensitive, so i need a high resolution stepper motor (100,00 steps per revolution). I have a NI CRIO and have a digital I/O module fit on the chasis. With the existing setup, i would like to know what is the best stepper motor i can get in the market with least modifications to my current setup. If such a thing is not available, then what is the next best choice. Can anyone please help me out on this.
    Regards,
    Umesh

    Hi Umesh,
    could you please provide some more information? First I feel a bit uncertain by the resolution that you are looking for? Do you mean 10,000 steps per revolution or 100,000 (with a missing zero at the end)?
    If it's 10,000 steps/rev, you could use a standard stepper motor (200 steps/rev) with x50 microstepping. If it's 100,000 you definitely will need a gear box. In general I would also recommend a gear box if you need 10,000 steps/rev, as x50 microstepping is already a quite high value, resulting in reduced accuracy (steps are not evenly distributed anymore).
    Some other questions:
    Could you please provide information about the required velocity and acceleration values?
    What about the inertia of your valve? Any idea about motor sizing?
    Which cRIO digital I/O module are you using?
    Are you using NI-SoftMotion?
    Have you thought about using cRIO drive interface modules (makes programming much faster and easier)?
    Have you already decided which power drive to use?
    Kind regards
    Jochen Klier
    National Instruments

  • Running a system which conclude "Stepper motor + Pressure sensors"

    Hello
    I need some help as a beginner. Would u please guide me?
    Actually my project is about running a system with LabVIEW which is contain a stepper motor (with different speeds in clockwise and unit clockwise) a pressure sensor, a switch for calibration the sensor and finally reporting the output as a graph with shows the distance that motor moves a barrier and changes of pressure during the movements of barrier.
    Right now, I have stuck in ordering the hardware parts for connecting the PC to the system. I don't know exactly what do I need to handle the hole system. Would you please help me? I don't know from were and how should I start?
    Thanks a lot

    As GerdW mentioned in the other post you might want to speak with a NI applications engineer.  If this is a school project of some type and/or you just want to spec everything yourself then you certainly can.  Your first step is to define all the physical parameters of your devices.  So you need to know what kind of stepper motors you need based on the required angular resolution, torque, etc.  What kind of pressure gauge will you use?  What type of output will it provide you (simple voltage, pulse train, full USB interface)???  What kind of switch will you use.  Can it be controlled by low-current TTL or will you need a driver or relay?
    Make a list of everything you will need for your application:  motors, sensors, switches, etc.  Then determine how to interface to them.  THEN you can start looking through your hardware options and pick the best choices based on your needs.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • Which stepper motor is required to connect with labview

    title:fault detection in pen. i am doing a project in image processing using labview .i want to  interface stepper motor with labview using daq how can i interface and which type of stepper motor is suitable for rolling metal sheet in which the pen is placed at the top

    I would start with the motor and work down, Labview will woek with any.
    1.  Figure out how much motor you need: torque, speed, resolution, size (nema 23, 34 .....)
    2.  Select a drive for your motor: many diferent drivers to control a particular motor, How much current is required, motor voltage, inductance
    3.  Determine the interface to the controller: step and direction, cw/ccw, serial.  (I  like step and direction)
    4.  Determine support options for the motor, encoders, limit switches ...
    5.  Now you can select your ni card to match the interface, (NI Motion- good for copmlex interfaces and multimotor synchronization, Digital/ counter timers simple but limited conmplexity, less expensive but more software needs to be written)
    This all depends on budget and requirements.
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Best way to make this stepper motor control system

    The goal of my project is to have real-time data collected by a Dataq 158u utlimately controller a stepper motor.  I orignially planned on running this whole thing with basic stamp, but I'm realizing that this may not be possible.  I have a stepper motor and a L293DNE driver.  I will continuously be recording data with the dataq, in the form of volts, and want these values to determine how the motor works.  For example, if the voltage is 0-3 volts, I want it to rotate clockwise, 3-5 volts not rotate, and 5-8 volts rotate counter clockwise.
    I've been trying to figure this out the past week, looking through threads with basic stamp, matlab, and now labview.
    Is there an easy way to do this? or easier way that I am currently trying to figure out?
    Any help would be greatly appreciated!!
    Thanks in advance.
    -Nick
    Solved!
    Go to Solution.

    Nick,
    What I was describing is how you would need to configure the motor controller to accept PWM from LabVIEW and operate in a Locked Antiphase mode so you could control motor direction. A lot of the LabVIEW part depends on the DAQ you use. For instance does your DAQ have a Counter that can generate PWM? I did some checking just now and your DAQ is not manufactured by National Instruments and I could not locate any native LabVIEW drivers. I did however go to the Dataq 158u MFG website and found they do have LabVIEW drivers BUT their Software (SW) must be running in the back ground. The Dataq 158u web site also has a help forum, I suggest you start their to understand the capability of the Dataq 158u. Also it appears you are not familiar at all with LabVIEW , before you can take on a project like this you need to start with the basics of LabVIEW, learn how to handle arrays so you can store your ADC results and how to use loops and timing and shift registers.  NI has some FREE basic training like the 6 HR intrudction to LabVIEW I would start their. Oh and in your OP (original post) you doubted the Basic Stamp could do this, I do this type of control using Atmel micro controllers all the time, I am sure the Stamp could eaisily do this. Just get on one of their forums for more info. Oh and to answer your question an Inverter is an IC that inverts the input signal, what you would end up with at the direction pins of you motor controller is PWM on one pin and 180Deg out of phase PWM on the other.
    Alan

  • MAX does not run stepper motor

    I am an abosolute novice at NI Motion and cannot get MAX to move a stepper motor. I'd be very grateful for any help.
    The system consists of a PXI-7340 Motion Controller card installed in a PXIe-1065 chassis. The PXI-7340 is connected by means of a SHC-68-C68-S cable via the Motion I/O port to the Motion I/O port of an UMI-7774 board. The UMI-7774 board is supplied with a 24Vdc power supply as well as an isolated 15Vdc power supply to its power terminals. Two stepper motors are to be controlled using this UMI, which has 4-axes capability. The Axis 1 and Axis 2 sections on the UMI are connected to a Danaher Motion P70530 Stepper Drive each by means of a D-Sub to D-Sub cable via the Control port on the UMI and the J4 Command port on the P70530 Drives. The P70530 drives are supplied with 65Vdc power from a bench top DC power supply capable of 70V, 15A. Each P70530 drive is connected to a Pacific Scientific Powerpac stepper motor (N33HRHJ, 65V, 5A).  (Thus, two P70530 drives and two stepper motors are connected tothe UMI.)
    I am trying to get MAX to turn the motor. In the listing in MAX, under NI Motion Devices/PXI-7340/Default 7340 Settings/Axes 1/Axes Configuration, all limits were disabled, settings saved and initialized.
    However, in the 1-D Interactive window, when the Target Position is set to a value, e.g. 2000 steps, and the Start button is pressed, the motor does not move.
    But, the LED on the P70530 blinks until the Kill button on MAX is pressed.
    Can anyone tell me why the motor does not move?
    Where does one go to learn more on MAX? Why are all the manuals at NI made for experts who already know what they are doing and not for beginners? The Help is no help at all really.
    Regards,
    PKP

    Thank you, Jonas, for your reply.
    I called in to NI and talked with "Vivek" and he helped me set the MAX settings and the DIP switches on the P70530 motor drive (amplifier) to get the motor to run. He pointed me to the "Getting Started P7000 Series Stepper Drives" 28 page manual, which for some reason was not included in the CDROM that came with the P70530 drive or with the pre-installed manuals in the PXI chassis. (You would think to include all the relevant manuals on the CDROM, but nope.) The manual showed how to "Change Settings" for the PXI-7340 inside MAX and set it to the 7340 Settings for P7000 Drives.
    Under Axis 1/Axis Configuration/ Stepper Settings tab, set the Stepper steps per revolution to 5000.
    Under Axis 1/Motion I/O Settings, all the filters, switches and the "Inhibit Output Settings" has to be disabled.
    Now the motor runs. Yay!
    But there is one teeny-weeny thing.
    Under  Interactive/1-D Interactive, when the velocity is set to 100 rpm or more, or the Acceleration is set to over 20 rps/s, the motor whines and does not rotate.
    When V=0 to 95 rpm, Acc=10 rps/s, the motor runs for a given Target position value (such as 200, 2000, 20000, etc.)
    Here is another weird observation. When the Velocity is set to say 60 rpm, the actual motor speed measured with a tachometer and a stroboscope is found to be  about 1440 rpm, i.e., 60 x 24 rpm. (I measured the rpm using the two different devices and both tend to agree.)
    Is the "rpm" unit a typo? Should it be something else?
    What am I missing? Why is the stated rpm different from the actual measured rpm?
    Thanks for any help.
    Regards,
    PKP

Maybe you are looking for