Control a servo motor thru labview.

I want to control a servo motor thru labview. I have the following hardware: servo motor, electro-craft bdc-12, s8vm-15024 cd power supply, NI PCI-7831R, and scb-68 circuit board. I am new to the field and I have no idea how to connect the amplifier to the circuit board and create a program in labview to control the motor. Thank you for your help.

reposted here: http://forums.ni.com/t5/LabVIEW/I-want-to-control-a-servo-motor-thru-labview/td-p/1651742

Similar Messages

  • Controllin​g a Servo Motor Using LabVIEW, Phidget & Mac OS

    Can anyone help me with this problem? 
    I'm attempting to control a servo motor attached to a Phidget, using a VI in LabVIEW on a Mac. The Phidget works fine with the Mac, LabVIEW works fine with the Mac, but there seems to be a problem combining the three. The problem I'm encountering is that the examples on the Phidget website (www.phidgets.com) for LabVIEW use ActiveX. Can anyone suggest a solution for this? Is it possible to use one of the control options in LabVIEW (GPIB, VISA, etc etc.) instead?
    I'm not great with computers so really have no idea where to start. 
    Thanks!  

    Thanks for your reply Jeff! So I can insert a CIN to the block diagram, right click and use the 'create .c file' option, insert the example code for controlling the motor from the Phidgets website (after tweaking it to make it specific to my setup) and that should work? How do I load the C library? Or a better question may be, what is the C library? (I wasn't joking when I said I'm totally new to this!)
    I've been working my way through 'C for Dummies' this week but I have to admit, the bit about header files and libraries lost me. I downloaded a bunch of stuff from the Phidgets website, including the phidget21.h and phidget21.lib files...do I '#include' both of these at the top of the example code?
    I've been in touch with the Phidget Support team (who are indeed great!) and received a similar reply ("You would have to call into the mac Phidget21 Framework directly").
    Once the CIN is all set up do you know what degree of control I'll have over the motor? The aim is to have the motor move in steps from -60deg to +60deg around a central point. Would this need to be defined in the code and then linked into LabVIEW or is this something I could control from within LabVIEW? The idea of my project is to use the motor to move a light source around a sensor. The sensor is hooked up to an NI DAQ that will record and display values (after some manipulation) on the front panel. I hope to display the sensor values and the corresponding motor position values.  

  • Accelerometer sense tilt then interface with USB-6008 and generate PWM to control M995 servo motor

    hi everyone,
    currently im doing a final year project in LabVIEW using USB6008. my project involve of sensing the tilt from accelerometer and convert the tilt into PWM to control the turning of servo motor.
    accelerometer that im using is ADXL322 which has Dual axis ±2g sense range
    servo motor that im using is M995. when the servo motor in neutral position it required 1500microseconds, while it turns 90degree it requires 2200microseconds and whilw it turns -90degree, it requires 800 microseconds.
    currently im facing problem in generating the PWM signal to control the operation of servo motor.
    attachment is my VI design that i have done to date.
    the program is about attracting tilt range from accelerometer using USB NI 6008 and then convert the tilt into angle in degree, and after that generate PWM to control two servo motor.
    hopefully there is somebody can help me on this. thanks.
    Attachments:
    FYP.vi ‏253 KB

    currently i need to generate PWM to control servo motor model MG995. but i am facing problem in generating the PWM in between 800usec to 2200usec to control the rotation of the servo motor. is there any example for me to refer.
    below is my VI that i have done to date.
    hopefully somebody can identify my mistake because my VI is not able to turn the servo motor.
    Attachments:
    pwm.vi ‏128 KB

  • Controlling a Nanomotion motor with LabVIEW?

    What do I need to run a Nanomotion motor with LabVIEW?
    LabVIEW - Controller - Driver - Motor
    The Nanomotion motor which I intend to use is a HR4, for alignment purposes in a cleanroom environment. Do you have any experience in using this or other Nanomotion motors please add a comment to this post.
    Regards,
    Marcus
    Marcus Törndahl
    Senior Software Designer @ Prevas AB

    Marcus,
    some years ago I have used an NI 7344 motion control board to control a Nanomotion ultrasonic actuator. I don't remember the model type of the drive, but it has provided a +/- 10 V command input. The position feedback signal came from a quadrature encoder.
    In fact NI's motion control R&D has worked with Nanomotion to implement some features into the control algorithm of the 734x and 735x boards to optimize the control behavior for Nanomotion actuators. The most important parameters, that were added to support these motors are the foward and reverse offset voltages to configure the static friction deadzone.
    Brief explanation: There is a deadzone of approximately +/- 2 V at the command input, where the motor doesn't react to command voltage changes. The 734x and 735x boards can avoid this deadzone. Otherwise it would be very hard to properly control the actuator.
    I hope that helps,
    Jochen Klier
    National Instruments

  • How to control instron 5582 utm thru labview

    hi all
    i am student and new to labview.
    as a part of my project, i need to control an instron 5582 universal testing machine(UTM) thru labview.
    is this feasible? can it be done thru a daq card or gpib? any information regarding this will be useful since
    i just have 5 mths to complete this.

    Mr. Bond,
    From the way it looks in the brochure for your Instron 558x, all of the data acquisition and control is built into the hardware. I also noticed that the hardware comes with its own software interface for displaying measurements and utilizing its functionality. If the whole system is integrated, there may be no point to interface with another software program (namely, LabVIEW).
    You might try contacting the manufacturer or obtaining a more detailed user manual. Specifically, you are interested in whether the controls and measurements are exposed to the user. For example, there may be a simple connector through which you can control the instrument serially. Or the data acquisition done on the device may be accessible on an output port. Also, I would be quite surprised if the device was GPIB controllable.
    Hopefully these can be a few questions to ask the manufacturer to try to use LabVIEW for control and data presentation. Good luck with your application!
    Mike D.
    National Instruments
    Applications Engineer

  • Can we cascade PID and PIV loops to control the servo motor

    hi
    presently we are using PID loop for controlling the motion of a servo motor using ni-7352 card. We  are not able to receive the desired response from this implemenatation. So is there any other alternative like using a PIV loop or using PID cascaded with PIV to achieve a better response. If there is possibility help us to proceed further with this.
     also tell us which is more reliable 1)using PID alone  2) Using PIV Alone 3) using PIV and PID cascaded.
    please mail to this query to [email protected]

    Sidda,
    before you start thinking about advanced control architectures I want to ask you to tell me some details about your system behavior and the control parameters that you have used. I have used 73xx boards for very dynamical systems and I have always been able to find control parameters that resulted in a very fast and stable system behavior.
    For the case that you need some help with tuning please have a look at this link. In many cases autotuning doesn't result in good system behavior but you will find a lot of interesting hints about the manual tuning process there (e. g. that increasing the Kd gain typically results in a better damped system).
    If this doesn't help please attach some screenshots from your step response and the control parameters that you have used.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • How to control an electric motor using LabVIEW?

    Hi,
    is there a simple way to control the rotation speed of a electric motor (12V) using LabVIEW?
    I have an idea how to achieve this by using NI measurment card, by its not that cheap. Any ideas?
    Maciek.
    LabView 2009.
    Solved!
    Go to Solution.

    Rubid wrote:
    Let's complicate the problem. Is there a way to control the output voltage of the USB port in my PC?
    Do you know what a USB-RS232 converter is??
    Buy one together with that power supply and your problem is solved
    What do you mean with "control the output voltage of the USB port" do you want to drive the motor directly from the USB port

  • Servo motor control using MCB2300 and Labview

    Hello Everyone,
    I have to drive servo motor using MCB2300 board and labview. I am new to LabView as well as MCB2300 board. I understand that I have to generate Pulse to control the servo motor. 
    I have gone through some of the post but could not find something useful. 
    I need to do it asap, a fast and eloborating answer is much appreciated. 
    Thanks is advanced.

    I don't know if this will help you, but think about this tip:
    On the back of my (digital-) Servo package there was some data written (see attached image).
    You've heard of PWM (Pulse Width Modulation)? If not look it up in
    wikipedia / microcontroller.net / (if you speak german) http://www.rn-wissen.de/index.php/Servos or google
    The description of the Servo says that I have to send every 200ms +/- 1ms a positive (+5V +/- 1V) signal with a length depending on the angle I want the Servo to be set. The Signal is coded in conjunction to time, which means, as longer the Signal as higher the angle is. The Signal range is in between 70 to 240 ms (with my servo and not exactly). The Signal must repeated every 200 ms like I said before. I don't know, if you understand C but here is a function I wrote, which works fine for me:
    void set_Servo_0(uint8_t angle)
      DDRA |= 2; // Specific Port declaration for my µC (Atmel)
      uint8_t tick; // a var to count how often I send my Signal
      for(tick = 0; tick < 2; tick++) // loop to count -> send Signal three times
        if(getStopwatch1() > 200)  // getStopwatch is a libary specific function to measure time in ms steps
          PORTA |= 1;  // port high
          sleep(angle);  // angle comes from outside the function, it is a parameter for this function. Sleep for this time with port high = pos Signal
          PORTA &= ~1;  // then pull down
          setStopwatch1(0); // reset the timer 
      mSleep(250); // Finally I have to wait for this time (in ms) when I send different angle parameters one after another, to let the whole system
                          // (µC + Servo and rest of program) to settle down, else I will loose signal steps due to incorrect timing (not nice, but works).
    This function gets the angle as Integer from 7 to 24 and puts the Servo in corresponding position one time.
    Maybe You can adapt it, good luck.
    Attachments:
    Servo.jpg ‏207 KB

  • Servo Motor Control

    Hi all...
    I'm working with the AT-MIO-16E-10 Board,
    and I use its 2 counter (0 and 1) to control 2 servo motors, when I
    using them to generate continuous pulse, both motors can move
    continuous. But my problem is, when I generating a finite pulse train,
    only either 1 motor can move(ie. no of pulse=10000)...why and how can I
    control 2 servo motors by this board?

    sushma:
    You currently have 4 other threads asking help for control of a stepper, one of which you said you had a working solution. Now you are asking about servos which operate totally different from stepper motors. Please keep discussion on one thread and include what hardware you have to work with (motor driver, motor, DAQ card) so that others may help in an efficient and timely manner.
    Thanks
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Servo motor control using CRIO+FPGA and 9477 digital out module

    Hello experts,
    I have a futaba BLS551 brushless motor digital servo (3 wires-+,-, signal). i also have a CRIO+real-time+fpga and 9477 digital out module. how can i generate servo signals using this module
    please help...
    Thanks,

    freemason,
    In order to control your servo motor with the FPGA and or DIO module you will have to write drivers to control your motor and drive.  While this is possible is an extremely complicated and time consuming process.  I would highly recommend you consider using the NI 9514 with soft motion as it will provide full servo functionality and is relatively easy to use.
    Regards,
    Sam K
    Applications Engineer
    National Instruments

  • How to control the step motor in this situation?

    I have a PHI TRIFT3 ToF-SIMS instrument. The instrument comes with a default
    software. However, the software don't offer fine step motor control. I want to control
    the step motor using Labview.
    I got some info from a Japanese engineer of the company.
    The step motor controller is connect to a card in ISA slot. In the default software, I
    can send command like D2000(distance 2000) and A100(acceleration 100) to "port 2"
    to control the motor. I have a manual of the commands.
    However, I don't know how to send command from Labview. Here is a joysticker
    connected to COM1, COM2 is used for other vacuum control. The joysticker can also
    control the motor..Here are some reply from the company about the control.
    "We do not use special driver for control the step motor.
    This is just sending the serial command via RS232C per command instruction I
    sent you before. The only difference is, to simplify the hardware, we just talk to data acq
    module(wave form card) via PAHOST card(installed in ISA bus slot of the PC)
    to passthru the RS232C command to stepper motor control unit.
    If you try to talk to step motor. just send the RS command from Labview
    platform. (of course need to connect the step motor controller from PC,
    default TRIFT PC does not have a spare COM channel, might be need to add
    serial etension card or add the computer for Labview control)
    "TRIFT PC passthru the RS232 command throught ISA bus to PHI data
    acquisition box to stepper motor control.
    Joystick handled by default software , convert to stage movement
    command X and Y then send thru to ISA. "
    I tried to use the Basic Serial Write and Read.vi to send command to COM1 but I always
    get an error"1073807246 ocurred at property node(arg 1) in VISA configure Serial prot(Instr).vi->
    Basic Serial Write and Read.vi  Possible reason: VISA: the resource is valid, but VISA cannot access
    it."   I think this happens because the default software is also open and trying to control COM1.
    What should I do to accomplish the step motor control? Thanks a lot

    Just to start from scratch, have you verified that you can do basic communication with your serial port, ie successfully perform a loopback test?  Please let me know, and we will go from there.
    Logan S.

  • Servo Motor and NI Card

    Hello,
    I'm pretty familiar with LabVIEW specially with the vision part of it, but I'm not familiar at all with servo motors.
    Problem statement:
    I'd like to make a VI that controls a servo motor that will rotate a screw every x amount of time (in both directions, obviously).
    Limitations:
    The screw turning should be a smooth as possible as it is a very delicate instrument and experiment. 
    As stated above, I don't know the first thing about servo motors and NI cards, and I would like to get some advice from you. Where should I begin? What are your recommendations for NI cards/ Motors?
    I don't think that the software aspect will be very challenging, it's just two nested loops-- the first is a while loop that controls the whole experiment time and the other controls the turning function.
    Unless, I underestimate to complexity of setting up a servo motor VI.
    I'd be happy to hear any thoughts/ideas you might have.
    Thank you,
    A

    Hey A,
    I would start by checking this website.
    I would recommend using a PCI card 7332, with UMI 7772, and AKD servo drive P00606. Then you can select the motor from here. Depending on the size of your application, choose a motor, and then make sure that the drive has enough current to power it. 
    Regards,
    A. Zaatari
    National Instruments
    Applications Engineer

  • CompactRIO restart when run VI of NI 9505 and servo motor

    I plan to use NI 9505 to control a servo motor, and the cables are connected according to the manual of NI 9505 (The M+  and M- ports are connected with servo motor directly). I can read the the encoder value from VI, but when I try to control the servo motor by even a very simple VI, the error happens, and the compactRIO restart. When I disconnect the motor and 9505 module, the voltage between the M+ and M- port can be measured, and it  is 24 V. I think maybe the current of motor through the 9505 module is too high, but why and how to solve it. Is there anybody can help me? Thank you very much. 

    If you believe that your motor pulls more than 5A, take a look at this from the NI 9505 product page. It's the first bullet point.
    Continuous current of up to 5 A at 40 °C (or 1 A at 70 °C) at 30 V - for higher power add NI 9931
    The NI 9931 will allow the 9505 to supply up to 7.3A.
    www.movimed.com - Custom Imaging Solutions

  • Servo motor for shaft oscillation

    I am looking for a servo motor to oscillate shaft periodiaclly at some angle.
    We have quoted one company but the price they are charging for control box I would prefer to build something myself.
    Their servo motor
    Motor rated torque 8.6 Nm
    Rpm 2000
    Continuous stall torque 10.2 Nm
    Continuous stall current 7.29A
    Insulation Class H
    Protection IP65
    Electrical connection Full Connector
    Motor Brake Not Fitted
    Feedback device Sin/Cos encoder
    Cooling Natural
    I have taken a look at NI  webpage and found similar motor AKM52H.
    What sort od drive for it is necessary and what are other components required to Program/Control it.
    What for and where in general should I start looking for this sort of applications?
    In our application we need to oscillate the shaft of the motor to some angle up to probably 20 degree at frequency up to 50 Hz.
    Ideally the motion should be smooth(Sine) and average shaft position should not change(no drift of the shaft position over time).

    Hello 
    If you wish to control a servo motor this can be done quite easily. I'm not sure about the specifics of what servo motor you should get but in terms of the controlling the device this could be done with a wide range of PCI cards or any multifunction DAQ device. I assume for this kind of application you would want D I/O to control the stepper motor and an Ai for the feedback. 
    I suggest calling the office (click the contact NI button for details how) and speaking to an inside sales engineer. They can help you configure your device for your application. 
    Many thanks 
    Dan
    Applications Engineer
    Nation Instruments UK

  • How can I control my step motor

    I am using a 6006-DB 3-mothor driver and a NEMA step motor model 405-SM, both from AMSI corp. I would like to control my step motor using LabVIEW. We use the LV. 5.1.1 version and we have a PCI-MIO-16E-40 as adquisition card.
    The sistem I want to built is to control my step motor and while turning detect the intesity variation on a photodetector which is conected to my adquisition card.
    I wonder if somebody has an idea how to do that.
    Thank you in advance
    Daniel Hernandez

    Ok I understood, I can use my PCI-MIO-16E card to control my steper motor driver, I will try to do that. But, if I use a DB-25 connector, how can I use my PCI card??
    I was thinking to use the parallel port, directly, to conect my steper motor driver.
    I attache some VI someone passed me. (It use a Setbit.vi and out port.vi)
    Attachments:
    MoteurGOTO6007-DB.vi ‏81 KB
    MoteurGOTO.vi ‏87 KB
    Commande_moteur.vi ‏10 KB

Maybe you are looking for

  • P35 Neo-FI memory problem with 4 ram sticks

    Hi, I have a problem to get my 4 ram sticks to work. a1 and a2 works but soon as i put another ram in to motherboard example to b1 or b2 it wont post anything on the screen. I know that my 4 rams works ok and i dont have any problem with them. I have

  • What video format is best for video quality?

    Would anyone care to comment on what video format is recommended to achieve the best video quality in Encore when burning to a 25 GB Blu-ray disc?  I have the choice of saving my HD video that will be imported into Premier Pro CS4 (and then sent to E

  • Need help with rman bkp testing

    Hello, I am using oracle 8.0.6.0 on windows 2000 server and in nocatalog mode.As i cannot use duplicate command in this version, I took image copies of all the datafiles,controlfile and archives. I restore whole database on test machine on daily basi

  • Buttons with alpha

    I have created some circular navigation buttons with alpha, and I am wondering if I can get the alpha to be honoured in two situations. 1) When I click on the button only the circle part gets highlighted. 2) If I overlay these buttons over a graphic,

  • Which is better iPod 4th gen or 5th

    hi I have a choice of a 32gb ipod 5th gen or a 4th 64gb which is better?