Controllin​g three stepper motors

hiii
   i am using RS232.....
   i want to ask you can i control three stepper motors with a single code.... and how should i connect  the three RS232 with a single pc to get its input from my LabVIEW code....
i have written my code for a single stepper motor ...will the three stepper motors be got the same data.???
thanks
do not hesitate to give kudos

sahil wrote: 
the last answer:i think ActiveX can be formed by not only ocx files but with exe and dll files also...
and i think we can form exe files using labview(by using create project method)..can this be  used to form activex??
You think that absolutely correct sahil but it is on the manufacturer of the software whether to make the software Activex enabled or not. And also, you are talkin about .exe and .dll. So let me tell you, that this part also depends upon the manufacturer whether to include that in a .ocx file, .exe or .dll.
Coming to your next part, you are telling that you think that exe can be formed in labVIEW. So dear friend, you think this part right too. You can make a .exe of the VIs  you make in labVIEW. But if you think that you can make an exe of an already existing exe, then you think wrong!!!! 
Somil Gautam
Think Weird

Similar Messages

  • Suitable card for three stepper motors

    Hello everyone, 
    I want to ask which DAQ card would be suitable for controlling three (X,Y,Z stage) stepper motors using continuous and/or finite pulse generation.  X and Y stages have to be independent on each other (i.e. diagonal movement), Z one does not but it would be nice. Solution may include buying two cards to ensure the independency of counters.
    I have heard that for finite pulse generation two counters are used for one axis (stage). Does it mean I need a card with six counters? Or two cards with four and two counters? In that case, our lab is equipped with the old 6035E card providing two counters (unfortunately not independent in finite pulse generation mode probably due to the statement above), which could handle one of the axes. 
    I dont want to use DIO for pulse generation because there is no possibility to control the frequency of pulses. Frequency for the stepper motor varies from 1000 to 2000 Hz. 

    Hi Diego,
      There is a way to only use one counter to output a finite digital pulse train.
    Normally when performing a finite counter output operation, two counters are required. One counter is used to actually output the pulses and another is used to gate the first counter and therefore output a finite number of pulses.
    The way to accomplish this same behavior with a single counter is by setting up a continuous pulse output task with a start trigger and a pause trigger. The pause trigger takes the place of the second counter normally used as the gate signal, freeing this counter to be used for other operations. 
    Finally, an external source must be used to create a pulse of a desired width in order to achieve a finite pulse train that used a single counter on the PCI-6602.  In the case below the external signal is passed to Dev3/PFI0, which has been configured to be the pause trigger source terminal. 
    Pause triggers are only valid for continuous sampling mode with implicit timing. You can find the properties for the proerpty node in the following locations:
    Properties » More » Pause » Trigger Type
    Properties » More » Pause » Digital Level » Source
    Properties » More » Pause » Digital Level » Pause When
    For each property, right-click the terminal and select Create » Control or Create » Constant  from the shortcut menu.
    Keep in mind also that there are stepper motor controllers available from NI like 7332. For more information check the link above:
    http://sine.ni.com/np/app/main/p/sn/n21:6/ap/globa​l
    May you have further questions dont hesitate to ask!
    Best regards,
    David Varga
    Applications Engeneer
    NIH

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

  • 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

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

  • Control two stepper motors with PCI 7332 for sinusoidal movements

    Hello,
    I am now using two stepper motors of RK566BAE (Oriental motor). I connected those two motors with UMI-7764 and PCI-7332. I designed to have independent sinusoidal movement of each motor. The first motor is wired to Axis 1 and the second to Axis 2 (of UMI-7764).
    I want to use Ni-Motion to create  a single VI in LabVIEW which helps to control both motors. But I have not figured-out how to obtain the movement I desired.
    Could you please advise me.
    Thank you so much.

    There are two ways to do elliptical arc moves:
    Use contouring two download target position arrays to the onboard buffer
    Use arc moves in combination with gearing (shipping example). This requires three axes.
    The 7332 doesn't support contouring and gearing and it doesn't provide a third axis, so there is no way to use this board for this type of moves. The cheapest NI board that supports elliptical moves in contouring mode is the PCI-7342. As the second option requires three axes, at least a PCI-7344 is required for this method.
    Here is a link to a feature comparison table for all NI 73xx motion control devices.
    Kind regards,
    Jochen Klier
    National Instruments

  • Trouble positioning a stepper motor accurately

    I'm using a PXI - 7344 with an MID7064 motor driver for XYMR Microscope Stage(Danaher Motion) which has encoder of resolution 2000 (counts/rev).
    The motor is in 200 steps/rev configuration and microstepping by 10 (closed loop). 
    So the motor and encoder are effectively in same resolution. So i expect it to be accurate to +/- 1 step(with three pull in moves ) because the motor and the encoder may not be in phase.
    But i get accuracy of +/- 3-4 steps. I didn't  have this problem previously (till a week ago), I had accuracy of +/- 1 step.
    Any ideas on what could be wrong?
    Thank you
    Prathyush

    Hy Prathyush,
    Here is another thing to consider.  You may be trying to stop the move in between physical poles on the stepper motor.  Since the motor has 200 steps per revolution, that means that there are 200 physical poles on the motor to step with.  You are microstepping at 10 microsteps/step.  So, if you try to stop a move after a number of steps that is not divisible by 10, then you are essentially trying to hold the rotor between two poles which are competing to magnetically attract it.  Essentially, the rotor is in an unstable "tug-of-war" so to speak.  Now your encoder has a resolution of 2000 counts/rev, each count being evenly spaced out.  If the motor is being held between two poles, there might be slight vibrations which cause the encoder feedback to vary slightly, thus giving you a 3-4 count error.  If you set up your moves where you never land in between poles, I expect you should have better accuracy.
    Wes P
    Applications Engineer
    National Instruments
    Wes P
    Certified LabVIEW Developer

  • Elliptical Motion of Two Stepper Motors with PCI 7332

    Greetings,
    I am trying to move two stepper motors on a 2d elliptical arc using LabView and PCI 7332 controller board. The 2D ellipse example in the LabView library does not work with the 7330 series. Is there any other easy way to perform such a motion with PCI 7332? Thank you in advance.

    There are two ways to do elliptical arc moves:
    Use contouring two download target position arrays to the onboard buffer
    Use arc moves in combination with gearing (shipping example). This requires three axes.
    The 7332 doesn't support contouring and gearing and it doesn't provide a third axis, so there is no way to use this board for this type of moves. The cheapest NI board that supports elliptical moves in contouring mode is the PCI-7342. As the second option requires three axes, at least a PCI-7344 is required for this method.
    Here is a link to a feature comparison table for all NI 73xx motion control devices.
    Kind regards,
    Jochen Klier
    National Instruments

  • Getting Started 9501 Stepper Motor with Softmotion Error

    Hi everybody! i'am with a cRIO9073, one stepper motor NEMA 23 and one module 9501.
    When i follow step by step the guide GETTING STARTEDNI 9501 C Series Stepper Drive Modules and NI SoftMotion Module
    in the final step, after compiled, when i show the Interactive Test Panel, it appears always the error 6283.
    Someone knows this error and the reason??
    Thankyou very much in advance!!
    Cordialement

    PS: I bought the three elements (cRIO, Drive 9501 and Stepper NEMA 23) from National Instruments, as the NI guide recommends.
    I continue understanding nothing..
    Thanks

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

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

Maybe you are looking for