Driving 2-stepper-​motor quasi-simu​ltaneously or simultaneo​usly

Hi All,
does anyone has idea how i can modify the attached vi to drive 2-stepper-motors in 1D quasi-simultaneously or simultaneously. my purpose is to drive 2-axial sealing punch for micro-hydroforming process. Each of the motor works fine (forward/backward) with the attached vi conf. for open loop stepper.
my system; LV8.20, Controller PCI 7350, UMI-7764, Stepper-driver SMC32-3(nanotec), drive ST4218L1806-LC(nanotec)
secondly what is the correct step-by-step order of NI-Motion flx to realiase motion controll program just like in LV vis. am new to motion controll.
regards to all
anyasodor gerald
Message Edited by anyasodor on 02-13-2008 10:39 AM
Attachments:
OneAxisMove02.vi ‏42 KB

Hi Jochen and all
a little proplem now; what could go wrong with schrittmotor? one of my  schrittmotors now moves only backwards(+/-).
second question; when i run both motors with the attached vi, one sees that one of the motors run on a low velocity compared to the other one instead of the same vel. as expected
help pls!!
regards
gerald
Attachments:
Two-Axis Move01.vi ‏51 KB

Similar Messages

  • 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

  • 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

  • Driving stepper motor via parallel port

    Hi everybody,
    I want to drive a stepper motor via the parallel port. The problem is to
    create a constant frequency on a digital line of the port. I tried to do
    so with a While-Loop with a certain delay, but the frequency varys due
    to occurrences like mouse-movement (due to the call-ups of interrupts I
    think).
    Any Ideas?
    Regards
    Martin
    Attachments:
    Martin.Eis.vcf ‏1 KB

    How about a simple NE555 timer circuit to externally create the constant
    frequency, then use a bit in the parallel port to enable and disable the
    NE555 circuit? You could probably go to Radio Shack and pick up the
    components for less than $10.
    Jim
    Martin Eis wrote in message
    news:[email protected]..
    > Hi everybody,
    >
    > I want to drive a stepper motor via the parallel port. The problem is to
    > create a constant frequency on a digital line of the port. I tried to do
    > so with a While-Loop with a certain delay, but the frequency varys due
    > to occurrences like mouse-movement (due to the call-ups of interrupts I
    > think).
    >
    > Any Ideas?
    >
    > Regards
    > Martin
    >

  • Stepper motor problem

    Hi!
    I edited a code with labview to control the motion of my stepper motors
    by simply sending a command to the serial port 1, this command depends
    on the controller card.
    It works absolutely fine but when the code is running for long, the
    stepper motor goes funny and doesn't stop , I have to switch off the
    controller card power supply resulting in the lost of the reference
    point I have previously set up.
    It might be the buffer memory getting full, I tried to initialise the
    port without any success, it still does it.
    It is crucial for me to solve this, the stepper motors are used to
    transverse optics such as lens and mirror. If this happens again the
    optics could be crunched.
    Thanks
    Fabrice
    Sent via Deja.com http://www.deja.com/
    Be
    fore you buy.

    Stepper motors can get stuck and resonate if they are driven at too high as
    frequency or if they are overloaded. If that is what is happening when "the
    stepper motor goes funny and doesn't stop" you should try changing your driving
    frequency or if you are using a six-wire two-phase stepper you may be able
    to change the wiring configuration to allow more torque or a faster frequency
    response.
    -Jim
    [email protected] wrote:
    >Hi!>I edited a code with labview to control the motion of my stepper motors>by
    simply sending a command to the serial port 1, this command depends>on the
    controller card.>It works absolutely fine but when the code is running for
    long, the>stepper motor goes funny and doesn't stop , I have to switch off
    the>controller card power supply resulting
    in the lost of the reference>point
    I have previously set up.>It might be the buffer memory getting full, I tried
    to initialise the>port without any success, it still does it.>It is crucial
    for me to solve this, the stepper motors are used to>transverse optics such
    as lens and mirror. If this happens again the>optics could be crunched.>Thanks>>Fabrice>>>Sent
    via Deja.com http://www.deja.com/>Before you buy.

  • Can I get a stepper motor to work useing an AO channel on a DAQ card?

    Can I get a stepper motor to work useing an AO channel on a DAQ card? I know its a very low currentl coming out, but what Im going to be using the motor for is very weak. Has anyone tried this before? I certinaly dont want to spend 2,000+ on somthing that will be basicly moving a string on some pullys back and forth.
    Thanks,
    -Mark

    Greetings, Mark
    You can certainly use the A0 as a driving signal, but you need to amplify the current considerably to run a stepper motor. Additionally, most stepper motors require multiple phase driving signals to work properly. If I understand your application, I believe a stepper motor is a bit of overkill...you only want to use them when precise positioning and repeatability is an issue. You might look at some of the linear actuators available.
    Eric
    Eric P. Nichols
    P.O. Box 56235
    North Pole, AK 99705

  • To drive Unipolar Stepper Motors using MID drive

    Hello friends I have purchased a RS components MID drive and I want to control a unipolar stepper motor using the same. The stepper motor is having 6 wires. I have used the same drive to run a bipolar stepper motor but I need to know as to how I can wire a unipolar motor to the same.I would like to know the connections and the disadvantages if any in driving a unipolar stepper motor using the MID drive.

    You can drive unipolar motors with the 7602/7604, but you wire them as if they were bi-polar. The user manual (which can be downloaded from the NI web site for free) shows the way to wire the 4-phase motor as a two phase motor on page 26. The basic idea is that you either ignore the center tap - wire Phase A to Phase A, and Phase A' to Phase A', or ignore one of the phases by attaching Phase A to Phase A, and Phase A' to the center tap.
    Hope this helps-

  • Difference between open loop and closed loop mode when finding the index on a stepper motor axis.

    I have a test system which uses a PXI-7352 motion controller with a MID-7602 stepper motor drive to position a 200 step/revolution stepper motor with an attached 1000 line encoder.  The MID-7602 is configured for 64 microsteps per step, giving 12,800 microsteps and 4000 encoder counts per revolution.  The system is controlled using LabView 7.1 and NI-Motion 6.13.  To home the motor, I've defined a sequence in MAX which first finds the reverse limit switch and then moves forward to the encoder index pulse.
    When finding its reference in open loop mode, the system its reference at the same microstep each time.  When findings its reference in closed loop mode, the system finds its reference somewhere within about a 20 microstep wide range.
    I hope somebody out there with more experience with this controller can describe the difference between finding the encoder index in open loop mode and finding the encoder index in closed loop mode. 
    Thanks,
    Mark Moss

    Hello Mark,
    I suspect that the behavior you are experiencing has today
    with the resolution difference between your encoder and your
    microstepping.  Let me illustrate with an
    example:
    Example Setup
    Stepper
    Motor
    NI
    Motion Controller
    10
    steps per encoder pulse (Every 10 steps the controller gets an encoder
    pulse, therefore positions 0-9 all appear to be 0 to the controller)
    The
    system has a maximum of 3 pull in moves set
    Open Loop Scenario
    The
    system is commanded to go to position 9.
    The
    controller sends out 9 pulses.
    The
    motor moves to position 9.
    Closed Loop Scenario
    The
    system is commanded to go to position 9.
    The
    controller sends out 9 pulses.
    The
    motor moves to position 9.
    The
    controller checks its position and sees that it is still at position 0
    because it has not received an encoder pulse.
    Because
    the controller thinks it is still at position 0, it sends another 9 pulses
    as its first pull in move.
    The
    motor moves to position 18.
    The
    controller checks its position and sees that it is at position 10 because
    it has only received one encoder pulse.
    Because
    the controller thinks it is still at position 10, it sends1 reverse pulse
    as its second pull in move.
    The
    motor moves to position 17.
    The
    controller checks its position and sees that it is at position 10 because
    it has only received one encoder pulse.
    Because
    the controller thinks it is still at position 10, it sends and additional
    single reverse pulse as its third pull in move.
    The
    motor moves to its final position of 16.
    I believe something similar is happening with your
    application as it looks for the index pulse. 
    Because the controller does not compensate for what it perceives as
    position error in open loop mode, the motor always goes to the same commanded
    position.  In closed loop mode, the motor
    is bouncing around inside the single index encoder pulse trying to find a
    certain position.
    There are several recommendations I can make towards
    correcting this behavior.  These
    recommendations are in order of effectiveness:
    Setup
    your system so that there are more encoder counts per revolution than
    steps per revolution.
    Turn
    off pull-in moves by setting them to 0 in MAX.
    Use an
    open loop configuration.
    Play
    around with the pull in window in MAX.
    Regards,
    Luke H

  • Trouble positioning a stepper motor accurately (to one step)

    I'm using a PCI-7344 with an MD7506 motor driver from RS. I'm testing angle sensors whose voltage output is proportional to (you've guessed it...) angle.
    I'm stepping the motor round by one step, checking that it's got there by reading the encoder, measuring the sensor voltage and repeating.
    My problem is that the motor sometimes 'hunts' around the target position. In closed loop (with an encoder associated with a motor) this results in sometimes not being able to reach the target exactly with the pull-in moves.
    Using open-loop and reading the encoder directly I get better results because I can loop more times, but the motor will still 'hunt' around a target point, changing direction a few times as it over
    shoots by a step.
    As there are a million MAX settings for this I won't list them all here, but I'm checking for a move complete when the InPos flag is set and I have a deadband of 0 steps too. I'm only rotating at 120 step/sec with a 10ms pause between steps.
    Do I have to accept that stepper motors are only accurate to +/- 1 step or am I doing something wrong?
    Thanks,
    Mike
    Mike Evans
    TRW Conekt
    N.I. Alliance Member, UK
    http://www.Conekt.net

    Mike,
    Maybe other people will have better suggestions, but in my case I can advise to either:
    1. increase the number of pull-in moves,
    2. increase the microstepping of your drive,
    2a... together with a higher precision encoder...
    Other than that, the accuracy is advertised to +/- 1 step, so maybe you would like to consider a stepper with more steps/rev.
    Good luck!, I hope other people will give other suggestions.
    Nestor.
    Nestor
    National Instruments

  • Stepper motor and loacell PID control - waveform motion.

    Hi, 
    Hardware :  cRio9073, C series module 9403 for stepper motor control and 9215 for load cell data acquisition. 
    I am trying to control a stepper motor in a closed feedback loop system with a load cell. The user would have to input two things : the maximum load applied and the frequency of the motion. At the moment I have it working in open loop controlling how many steps forwards or backwards it does and at what rate, with a display showing the load being applied.
    I am now looking to include the "PID.vi" built into labview into my existing code. I am using the load cell output as the 'process variable' and the 'output' of the PID will control the wait time between an ON and OFF signal to the motor (since I have to do the PWM in software as the 9403 module doesn't do it in hardware. Is this the right way to do it? ) 
    I wish to make the motor do a sinewave motion, thus the 'setpoint' of the PID would be dynamic. I have therefore linked the "Sinewave form.vi" (also built into labview) to the setpoint and the frequency of the "Sinewave form.vi" will be the user input for the frequency of the motor. However my problem lies with the 'Sampling info' of the "Sinewave form.vi" : Previously that is what controlled my number of steps, defining the maximum displacement of the motor. Now I need the peak of the generated sinewave to coincide with the maximum load applied defined by the user. How can I make it do that? 
    I have attached my existing code with how I have attached the PID.vi at the moment. 
    Many thanks for your help
    Lawrence 
    Attachments:
    PIDControl.vi ‏23 KB
    BIOGROWTH.lvproj ‏46 KB

    Hi Lawrence,
    Here is an example PID VI.
    Regards
    Rico P
    Attachments:
    General PID Simulator.vi ‏22 KB

  • Stepper motor closed loop control using 7344

    I have some question about the closed loop control of stepper motor using 7344. From the NI website I got that closed loop steppers work differently from closed loop servos. Instead of adjusting the output on each PID iteration like a servo system, closed loop steppers will do a pull-in move at the end of a move to adjust for any difference between the target position and the encoder feedback. By default, it will attempt the pull-in move three times.
    Now for example I got five points: (0,0) (10,20) (30 40) ( 31 60) (50 65). The request time interval I set as 10ms. This mean that in the first 10ms, the machine should move from (0 0) to (10 20). But for some reasons the machine can not move to (10, 20), it moves to (8,16) and the first 10ms passed. In the second 10ms, how it move? Move from (8 16) to (30 40), If like this, the following error will accumulated. In practise, it is not accumulated. Is there anyone can explain something about the closed loop control of stepp motor? Thanks a lot!

    Requested Interval is additional data for the Position buffer type. The Position buffer type requires a Requested Interval parameter, and indicates the time between contouring data points in milliseconds. For all other buffer types, the Requested Interval parameter is ignored.
    The controller will use the closest value it can that is greater than or equal to the interval value you requested. Your time interval must be an even multiple of the PID rate.
    For example, given a PID rate of 250 ms, a time interval of 11.2 ms between points is physically impossible, so a call to configure buffer with an interval of 11.2 causes the  buffer to actually be configured for 11.25 ms, since 11.25 is the nearest possible interval greater than 11.2. The following table shows valid intervals for each PID rate.
    My question is like this. For example I got five points: (0,0) (10,20) (30 40) ( 31 60) (50 65). The request time interval I set as 10ms. This mean that in the first 10ms, the machine should move from (0 0) to (10 20).  If it is impossible for the machine to move from (0 0) to (10 20), there are two ways to solve this problem. First is the time interval is 10ms and assume it move to (8 16) within 10ms and take (8 16) as the start point and (30 40) as the end point of the second move. Second is extend the time interval, assume it takes 14ms to move from (0 0) to (10 20). After 14ms, the (10 20) is the new start point for the second move. I think it works as the second ways.If not, the following error will accumulated.  Is there anyone can explain something about the closed loop control of stepp motor in detail? Thanks a lot!

  • 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

  • How can I output a square wave to control a stepper motor using 7332 controller?

    I have the following system configuration for testing a linear actuator (LA):
    LabView 7.1
    NI FlexMotion 7332 Motion Controller
    NI Flex DMM 4070
    The LA is a stepper motor with Step and Direction of Rotation inputs, as well as some discrete I/O for Power Enable and other functions.
    The LA specification only requires that I send a 50% Duty Cycle square wave signal with frequency less than 300 Hz to it in order to make it step.  The LA has it's own power source.  I only need the 7332 to generate the drive signal and the DOR signal to the LA.  Using some of the example VI's, I can get the LA to work, but I will need to incorporate the functions in to a custom application. 
    How can I weed through the numerous advanced functions the 7332 offers and only generate a DOR signal and a step command at a user-defined frequency.  How do I set up the controller for this?
    Thanks

    Hello,
    All the VIs that you can use to create a pulse train and digital I/O from your motion controller are found in the "Analog & Digital I/O VIs" sub-palette in the "Flex Motion" palette. Use "Load PWM Duty Cycle" and "Configure PWM Output" VIs to create the square wave. Use the "Set I/O Port Direction", "Set I/O Port MOMO", and "Set I/O Port Polarity" VIs to create digital output. I hope you find this information useful. You can learn about the specifics of these VIs and their inputs/outputs in the NI-Motion VI Help.
    Regards,
    Aaron B.
    National Instruments

  • How to generate digital pulses to run stepper motor in a sinusoidal motion profile using NI DAQ 6229 card

    Hi,
             I need to make a stepper motor undergo rotary oscillation with a sinusoidal motion profile. As it nears the extreme points it should decelerate and finally slow down to zero velocity and then it should reverse direction and accelerate until it reaches the other extremity where it should slow down and stop and reverse direction and repeat this motion.
            The hardware is NI DAQ 6229 and the stepper motor can be controlled using digital Hi-Low (1,0) pulses. For each high pulse(1's) the motor turns 1 step. I am able to generate a analog sine wave and convert it to digital data using Analog-to-Digital.vi  But i am not able to convert the digital data to a stream of 1's and 0's in the correct sequence to get the sinusoidal profile with the amplitude and frequency i require.
            The direction of rotation can be changed by giving a pulse to another input of the stepper motor. So only half cycle of sine wave needs to be generated and it can be replayed after changing the direction to get the full sinusoidal profile.
    Any ways of making this approach work or any new approaches to this problem would be helpful. Thank You.
    Regards,
    Prabu.
    Solved!
    Go to Solution.

    Hi,
             I finally figured out a way to do it. The analog sine wave is converted to digital and sampled. Consecutive values are compared and if the least significant bit(LSB) changes then a pulse is sent to the stepper motor to turn one step.
    I have included the sub-VI's that accomplish it for the particular stepper motor and connector block i have. The front panel of both sub-VI's are quite messy but the block diagrams should be much clearer. The sub-VI's get their inputs from a third VI which i have not included. So take a look at the VI connector panel to figure it out. Hope this helps. Kinda messy but worked out fine in the end for my application. 
    Thanks again for all the help. I appreciate it very much.
    Regards,
    Prabu Sellappan
    Graduate Student
    Aerospace and Mechanical Enggineering
    University of Southern California
    Attachments:
    start motor test waveform dtest.vi ‏73 KB
    sine profile generation subVI.vi ‏41 KB

  • Error -70006 when using stepper motor in Open Loop Mode

    We have a LabView program that runs a test in which a table is rotated. At the end of the test, the table is supposed to rewind. Instead, the following message appears:
    Error -7006 occurred at Read Trajectory status.flx
    Possible reasons: For FlexMotion, an invalid axis number or other resource ID (Vector Space, Encoder, I/O Port, and so on) was used.
    We have the PCI-7344 interfaced with a UMI-7764 and a Zeta4 that is controlling a ZETA83-93 stepper motor. There is no encoder in the system for this motor. The stepper loop mode was originally set to closed loop but the motor behaved erratically (moving multiple times when instructed by MAX to move once). The stepper loop mode was changed to open loop and the m
    otor started behaving properly, but that is when the error message starting appearing. Are there any other configuration settings, such as Primary Feedback (which is now set to Encoder) or ? that I may need to correct to resolve this error?

    First of all I would check a couple of things. The reason why your motor was not behaving properly in closed loop stepper configuration is most probably related to the fact that you don't have the encoder counts per revolution adn the stepper steps per revolution properly configured for your motor. Please follow the instructions found in the following knowledgebase:
    http://digital.ni.com/public.nsf/websearch/29edb56​146f274a386256a1c00624310?OpenDocument
    When you configure an axis in closed loop stepper mode, we use the information of the encoder to generate the adequate velocity profile. If the encoder counts and steps per revolution are not properly matched, then the motor will not execute the moves properly. What you need to do is the following:
    1.-Configure your axis as closed loop stepper in the Axis Conifguration Section in MAX.
    2.- In thbe 1-D Interactive Basic panel, kill the motor and click on reset position.
    3.- Manually rotate the motor one revolution.
    4.- In the advanced panel on 1-D interactive, read the Encoder Value. This is the value you should enter on the Axis Encoder Counts per Revolution under Axis Configuration. Press Apply.
    5.- Go back to the 1-D interactive Basic Panel. Change the bullet selector unbder Stepper Loop Mode from Closed to Open. Run a 10000 step move.
    6.- When the move is finished, read the encoder counts from the advanced panel. This will tell you how many counts you have in 10000 steps. You can now calculate the stepper steps per revolution by the following formula:
    (# of steps per count)*(# counts per revolution) = # steps per revolution.
    Your motor should work fine in closed loop stepper configuration now and the error should not appear. Please make sure you are using the latest version of our driver (Ni-Motion 6.0.1)to avoid older firmware errors and fixed bugs from affecting your system. You can get it from:
    http://digital.ni.com/softlib.nsf/webcategories/85​256410006C055586256BB9002C16DF?opendocument&node=1​32070_US

Maybe you are looking for