Repeatable different steps of a stepper motor

Hello everyone,
I am working on a project where i have a stepper motor moving a plate and a signal sensor who measures a distance. I managed to initialize the signal so my initial position is the position where the sensor gives me the minimum value (Voltage).Each time the stepper motor moves, i define it from the front panel. My question is, how can my stepper motor moves automatically for e.g. 8000steps then without define it again for another 5000 steps or whatever i want with a time delay. The definition of the steps now is being done from DAQmx Timing>Samples per channel. I want to run the program and the steps to be already defined wihtout change them again and again from the front panel. I attach my current VI.
Thank you in advance
Attachments:
(2nd version (a-D).vi ‏73 KB

Hi Chris,
not a problem, we all were new at some point. In case you don't know there are boatloads of classes you can access online with your License or even without one:
Here's a small collection (courtesy of crossrulz):
3 Hour Introduction
6 Hour Introduction
LabVEW Basics
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training
Learning NI
Getting Started with NI Products
And if you are a student you can take a real class with NI for a ridiculously small amount of money (say, 93%) discount).
With start twice I mean that I was wrong in believing you did so, when I fact you started two different tasks, so: nevermind.
PFI stands for Programmable Function Input, which is confusing because it is probably assigned to an I/O line. I just asked to find out what section of your code I have to look at. I'm still not quite sure about this, butI understood you want to move the motor, when you push a button. The only part of your code, where you even read a button within a while loop is for the Direction Line. Apart from that you just write the inputs once and then forget about the tasks (not even stopping them sometimes). I suggest moving the button that should move the motor into a while loop. 

Similar Messages

  • Calculate step Angle from Stepper Motor Counter

    Hi,
    I am looking for a formula to calculate the Stepper Motor Angle from the Stepper Motor Counter. The Stepper Motor has 1.8 Degree/200 Steps Resolution. As it rotates more than 200 Steps, I want the Angle to reset to 0 and start calculating again from 0 to 360 Degrees. As I am a beginner I am confused to use some sort of While or For Loop. Any suggestions?
    Solved!
    Go to Solution.

    Hi rkamat,
    FOR loops are used when you know the iteration count before starting the loop.
    When iteration count depends on a condition you should use a WHILE loop instead…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Stepper motors to move antenna

    Hello !
    My name is Paul, I am from Romania.
    I need some ideas on how to make a project.
    I need to control a fake antenna (I am saying fake because it won't be attached to anything, just for display purposes) using LabView.
    The antenna will be very small (about 15cm in diameter and made from light materials) so I won't need powerfull motors. I was thinking about hooking up 2 stepper motors (maybe from a printer) to some sort of controll board and to a PC with LabView. The antenna needs to move 360 degrees on a round base and 180 degrees of elevation.
    I found a video on youtube that is a lot more complicated and a lot heavier than what I need, but should give you a better perspective of what I am talking about.
    http://www.youtube.com/watch?v=vihdaseWNQw
    I need the cheapest way possible (because I am on my own budget).
    Thank you !
    Solved!
    Go to Solution.
    Attachments:
    antenna_base.jpg ‏201 KB

    I drew a quick sketch hoping you will understand better what I'm trying to do. I only connected one stepper motor for a test run. I opened the "Arduino Stepper Motor.vi" in LabView and tested on stepper motor 1. It didn't move (but maybe I didn't set it up correctly in labview). The setup was made exactly as the picture I attached.
    The stepper motor 1 (which controls elevation) has to move the antenna 90 degrees. So I'm guesing I have to divide the 90 degrees to 1.8 degrees (the motors deg/step) to find out how many steps I need in total. And the same for stepper motor 2 (360 / 1.8).
    So I need a .vi that automaticaly transforms the degrees which you set the elevation and azimuth to steps for the stepper motors. And when I press "Start" the two motors move to the desired position. I also need a "Reset" button to automaticaly come back to the original position (which will be 0 degrees azimuth and 0 degrees elevation - let's say the magnetic north) each time I run the program.
    Attachments:
    setup.jpg ‏1120 KB
    setup_drawing.jpg ‏1102 KB
    EasyDriver-Stepper-Motor-Driver2.png ‏50 KB

  • Using BNC2110 DAQ In Order to Control Stepper Motor

    So basically my goal here is to use LabView to control the direction and the steps of the stepper motor.
    I have BNC 2110 (connected to PC), Lin Engineering's 4218M-54P-04 Stepper Motor, and Lin Engineering's R701 Stepper Motor Driver.
    The specification documentations are attached.
    I know that the driver and the stepper motor are compatible.
    Is it possible to control the motor through Labview(PC) < - -> BNC2110 < - -> R701 Driver < - -> Stepper Motor, without the motor's own controller?
    An example of a controller for this particular motor would be on this website.
    I would much appreciate your support.
    Thank you.
    Attachments:
    4LeadBipolarSteppingDriver-linengineering--4218m-54p-04.pdf ‏652 KB
    DriverR701.pdf ‏379 KB

    Hi jhprks,
    It would appear that the stepper motor controller that you list communicates via RS-232 or RS-485.  You can make serial calls in LabVIEW using the Serial or VISA commands.  It could be something to look into.
    Further, we do have a multitude of ways to accomplish this with our hardware; here are a few resources to take a look at, with the first being an example of how to do this with a multifunction DAQ device:
    Using Software Timed Digital IO to control a stepper motor with DAQmx:
    http://decibel.ni.com/content/docs/DOC-6385
    Stepper motor control via Parallel port:
    http://zone.ni.com/devzone/cda/epd/p/id/3611
    High Performance Stepper/Servo control:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/10026
    Stepper Motor Theory of Operation:
    http://zone.ni.com/devzone/cda/ph/p/id/248
    Stepper motor Drives:
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/3308
    Adam
    Academic Product Manager
    National Intruments

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

  • How do you control LED lights on the front panel to identify the number of steps a stepper motor has taken?

    I am controlling a stepper motor that is coupled with a valve with four outlets (using an Arduino).  I've got a general understanding of how to control the motor, but I want LED lights on the front panel to light up that indicate which outlet the valve is currently at after the steps are taken.  The method I'm thinking about involves a lot of repetitive code.  I'm not that experienced with LabVIEW, I'm assuming I need some sort of loop structure but I don't know how to set it up in order to control the sequence of the LEDs.  I've attached my current block diagram for a visual aid if needed.
    Attachments:
    Capture.JPG ‏33 KB

    I was thinking about using the Stepper To Go and Stepper Write functions four separate times, using the same constants for the steps each time since the distance between each outlet is equivalent.  The only difference would be what's connected to the "steps remaining" node, which would be the function that activates one of the four LEDs (if that makes sense).  I was thinking that doing it this way would be a little counterintuitive since the only thing that needs to be changed is the LED indicator.

  • How can I send commands to a stepper motor to move in steps?

    How can I controll a stepper motor by using labview.7?
    what do I need?

    This will depend on what hardware you are using to send the commands to the stepper motor. NI offers motion controllers and drives that come with all the functions you will need to operate the motors. Depending on the size and number of motors, you will have different hardware requirements. Take a look at the motion products available here: http://sine.ni.com/apps/we/nioc.vp?cid=1506〈=US
    If you have more questions, you can always contact NI at www.ni.com/contact to help spec out the system.
    If you are using third party products, you will have to call their dll from LabVIEW using a Call Library Node function. This gives you access to all the functions in a dll.
    Hope this helps.
    Regards-
    Julie S.
    Applications Engineer
    National Instruments

  • STEPPER MOTOR - STEP, Clock, Direction and Preset.

    I have wired a stepper motor, driveboard and a amplification circuit to a DAQ card. However the stepper refuses to move. I am willing to pay a small fee to someone who can guide me through the internet. My e-mel is [email protected]

    Please check out this thread:
    http://forums.ni.com/ni/board/message?board.id=250&message.id=9874
    -Alan A.

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

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

  • What's the type of control for stepper motor?

    Hi,
    I'm using PXI-7358 controller, UMI-7774, Industrial Device NextStep third part microstepping drive, stepper motor SANYO-DENKI (type 103-8932-6421, NEMA42) and incremental encoder 3600 ppr (14400 count/round). I want to say what's the NI onboard type of control used to control motor step position? In the case of servomotor the type of onboard control is a PID, in the case of stepper motor what's the type of control? What's the MAX parameters to set for the project specific (overshoot, settling time, rise time etc..)? What does it means "Pull-in Window" e "Pull-in Tries" in MAX? So, it's possible control the stepper motor with user's algorithm control, excluding the onboard control?
    Thanks for your patience,
    Best regards
    Lorenzo

    >
    Matt wrote:
    > Go to SE24.  Type in cl_dd_document and press enter.  Select the methods tab.  Look for the method "CONSTRUCTOR".  Double click on it.   Click on SIGNATURE button.  The types of the parameters are clearly seen.
    >
    > matt
    TYPE and VALUES OF TYPE -- different things. For example, TYPE C -- CHAR. VALUES of this: A, B, C, ..., 1, 2, 3.
    Thus, return to question.
    TYPES: sdydo_attribute(50) TYPE c
    TYPE: sdydo_attribute
    VALUES: ???
    May be, value ABRAKADABRA correct?

  • Stepper motor

    I have a labview program for controlling a stepper motor and allthe necessarry hardware. When I run the labview program there are no errors. However the motor does not move. A friend suggest to run MAX AUTOMATION but I have not. I am concerned if I run MAX I might damage the computer and corrupt the present configuration. I have connected STEP< DIRECTION< PRESET AND CLOCK from the drive board to four DIO. I have not specified that in MAX. What shall I do?

    MAX gives you a very useful but limited ability to manipulate your DAQ board's i/o signals. It's often used in place of a full-fledged user program during initial setup and later during troubleshooting because it provides an NI-controlled interface to the DAQ hardware that isn't corrupted by possible user programming bugs. I think you probably ought to use MAX first to work out all the appropriate signals and connections before trying to use your friend's program.
    You'll also need to understand the basic principle of operation for your friend's program and the stepper driver board. If you're using a different motor or driver, you may have incompatibilities.
    What DAQ board do you have? Who makes the drive board? The signals you mentioned (STEP, DIRECTION, PRESET, and CLOCK) are not a familiar set to me. DIRECTION is very likely a digital bit to determine whether to step CW or CCW. Either STEP or CLOCK (or both?) should probably be a counter pulse train. I've usually seen either one or the other word used in a stepper interface, but not both at once so I'm not sure what's up with that. I really couldn't guess what function PRESET means. And you'll also need your digital GROUND or RETURN connection(s).
    As for "assigning pins" to the functions: I would approach it a little differently. The issue is that you can't arbitrarily assign any old signal to any old pin. For example, some pins are for analog input and you can't generate digital bits on them.
    So..... First determine what kind of signals you need for each functions (digital bit?, counter pulse train?), then find out which pins from you DAQ board can produce the right signal, and finally wire them up. At that point, you can choose either MAX or LabVIEW programming to put signals onto those pins. MAX will be best for initial testing, but the final app almost always needs to be based on programming.
    -Kevin P.

  • 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

Maybe you are looking for

  • Multiple devices, one email - how can I see from iPad if I've replied from iPhone.

    Hi, I use both my iPhone and iPad to access my email. When I reply to a message on a device, I get an icon on the email on that device showing that I've replied. However, when I access the same email account from the other device, I don't see a repli

  • Using Element 31" LCD TV as display

    I have a 2008 macbookpro15 with the big video output plug on the upper right side as you face the computer. In the past I have used it successfully with my 2008 vintage 46" samsung to display photos stored in iphoto. (mac output to HDMI input). now w

  • Syncing iPad iPhone iMac with Google Calendar, everything you want to know

    Ok Guys, I just spent the last 4 hours going nuts with experimentations, trials and errors, and I finally think I figured it out, so bear with me here because it's not that simple. And excuse me for the poor english, I'm from Brazil. Ok, in the iMac

  • Upgrade to Win7 & PSE-9; Can't Reconnect Photos in Catalog

    Just bought a new computer, which upgraded me from XP to Win 7, and at  the same time I upgraded to Photoshop Elements 9. I restored my Catalog backup, but found a majority of my photos had become disconnected due to a change in the folder hierarchy

  • Compatibility BRIDGE CS4 PSE8 et MAC OS 10.7.5

    good morning I work  actually with mac OS10.7.5 and i  use everyday PSE8 with a classification in adobe bridge CS4  I would like to change my mac OS for at least 10.8 or mavericks or even with yosemite which is coming soon can you tell me if there is