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.  

Similar Messages

  • Servo motor using parallel port

    Hello,
            I have a XY mirror scan Servo motor used for optical scanning experiment.
    The question I have is:
          I already have a program to control stepper motor via parallel port. Can I use the same to control servo motor ?
    Or is the SERVO motor concept different to that of a STEPPER motor ...
    Thank you
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]

    You will need a DAQ card that can generate the voltage needed to send a command signal to the 671.  The 671 will need to be tuned to the 6880 with whatever sized mirror is attached.  (If you bought the galvo and servo driver as a package it should already be tuned.)
    CTI systems take in an analog command from -10 to +10 Volts.  Almost all the NI DAQ cards (and many other brands) output +/- 10 Volts so that will be easy.
    Then you will need to decide how to scan your target.  A ramp pattern or triangle wave is the usual choice for scanning objects so you need to generate that in LabVIEW code along with the code that will read your sensor.  This should be done simultaneously but you really don't need a very expensive DAQ card to accomplish that.  Look on the NI website for options in your price range and do some research...
    Is your system one axis (one 6880 and one 671)?  If so you will scan a raster (ramp or triangle) to measure a single line of light intensity, move the stage a tiny distance and scan another line.  When you put all the lines together into a 2D image you will have a representation of one face of your object.  Many people use a rotary stage to spin the object while scanning to assemble a 3D model of the object.  This is a bit more complex of course.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • How to run stepping motor using LabVIEW

    Hi
    I need to run bipolar stepping motor using LabVIEW 6.1. Would anyone please guide me how to do that.
    I have measurement and automation 3.1.0.3021 installed on my system. I am new to LabVIEW.
    Jayaprakash.

    Hi,
    Do a search for the words "stepper motor" in the forums. This should bring up several threads where this has been discussed.
    -Sal

  • 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

  • How to draw the circle diagram of induction motor using labview

    hi
      i am trying to model the  electrical machines using labview..
    i want to know that is it possible to draw the circle diagram of induction motor using labview..........
    if its possible then please suggest me the possible ways.
                                                                                         thanks

    There may be better ways, but the method I used was to convert amplitude & angle to rectangular coords, then create an XY plot from (0,0) to those coords.  (Or 1 plot for Voltage, 1 for Current, etc.)  I would then just keep updating this plot and feeding it to the graph in a loop.  The result was a slightly choppy looking but useable animation of the phase vectors.
    -Kevin P.

  • Sinusoidal velocity profile of a stepper motor using labview

    Hi I am trying to get sinusoidal velocity profile of the stepper motor using labview.
    Could anyone please help me out...

    I'm also really interested in this solution.
    I think you could do it by controlling the velocity of the stepper with points (excel) or function maybe... but that's an idea...

  • Controllin​g a servo motor to generate constant force

    Hi,
    I have a machine which interacts with foot and I would like to control the motor so that it generates a constant load at the end effector (applied on the foot). I am able to read force and position information. What kind of control algorithm should I use to control a constant force generated by the servo motor? A force feedback controller which feeds back the force information to the controller and update the command signal seems to be ideal but my force sensors could be noisy and I don't know what filters and what cut off frequency I should choose. Can I assume a linear relationship between the currnet command to the motor and the amount of force generated at the output or it could be wrong due to the back emf, friction, etc...
    I appreciate if you could advice.
    I use compactRIO and labview fpga 8.6.
    Thanks

    I think it can be done with a simple force sensor and a DC motor provided you have a means to control the voltage from Analog output.
    The only problem you might encounter is it may oscilate around your force setpoint but you can find some simple ways to smooth that out.
    It really depends (quite a bit) on what control precision your design is willing to tolerate.

  • How to power a motor using labview DAQ output signal

    The power from labview is not enough to move a decent-sized motor (works with tiny one). Is there any electrical component/device that I can use to sort of increase it (something in between output from labview and the motor)?
    Thanks

    LabView is a software and does not supply any physical signals. To generate physical signals you need an interface board, NI has plenty of them which can be controlled via LabView. Anyhow, as you mentioned, digital i/o interfaces can handle currents in the mA range only. I think the best way to control motors via LabView and an interface board is using an additional relay driver board. Since relay contacts only switch power and do not supply any power you will need an external power supply matching the voltage and current specs of the motor.

  • 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

  • Controllin​g a dc motor using 7344

    hi
    i need some advice in controlling a normal DC motor. where should i take the signals? can i control the motors using the UMI instead of the digital i/o pins.

    Hi,
    the 7344 is the actual motion control device. You can wire it either directly to an NI power drive or via the UMI to a 3rd party power drive. For DC motors the 7344 generates a +/- 10 V control signal and it requires a feedback signal e. g. from a quadrature encoder that is mounted to the motor's shaft.
    For more information please refer to the manuals (7344, UMI-7774/7772, UMI-7764, MID-7654/MID-7652).
    There are also good tutorials about configuring a motion control system and PID tuning.
    I hope that helps,
    Jochen Klier
    National Instruments Germany

  • How to track position of motor using LabVIEW?

    I have created a VI in LabVIEW that will allow me to control a motor to turn a certain number of degrees and then the motor will provide me with feedback on its final position. For example, I ask it to turn 180 degrees and it will output 180 degrees on the screen when it reaches its destination.
    Is there a way to track the motion of the motor as it turns second by second? For example, at 1 second it is at 30 degrees and 2 seconds 75 degrees, etc. I would like to display this information in a chart/graph or table.
    Any help would be greatly appreciated.

    You can try use chart and wire its input with the output of the motor and put the whole in a loop.

  • How to control steps of a step motor using labview?

        Hi, I'm really beginner on labview and I need to make a VI to control a step motor. For each n steps, a sensor must observe the position of a mechanism and save in a table based on the number of steps taken. I've already have the sensor's driver, but I don't know how to comunicate labview with the step motor.
       I've seen some samples here, but they weren't enough. I need to buy some specific hardware? What's the difference between using VISA and Motion NI 77xx? Where I write how much steps I want it moves?

    HI 1M2S,
    You have many ways to communicate LabVIEW with a step motor. Are you using a IC step motor driver or a NI module step motor driver?
    If you a using an IC step motor driver you can use serial port or DAQ digital output to control the step motor steps.
    If you are using a NI step motor module you need use NI Motion functions.
    Best regards,
    Abel Souza
    Engenheiro de Aplicações
    National Instruments Brasil

  • Controllin​g MPLAB ICD-2 using Labview

    All,
    Need some real help here if possible?
    I have to program a PIC 18F8680 using a MPLAB ICD-2 programmer controlled by Labview, does anybody have any experience in this (or something similar) who could shed some light on the subject of where to start?
    Regards
    AnotherNewbie

    Hi AnotherNewbie,
    Thank you for posting your question. My name is Kevin and I am an Application Engineer for NIUK. I will be helping you on this issue.
    I have found a forum post where someone has asked a similar question "How can I control PIC programmer with LabVIEW" and there has been a discussion where some ideas have been passed around.
    Please follow the link
    Some of the ideas that are mentioned are controlling the software through DLL's through system exec calls from LabVIEW.
    Here is a link for help with System Exec
    Have a good look through the forum, there are some attachments provided in the thread that you may find useful.
    This is definitely a good starting point.
    Let me know how you get on
    Kind Regards
    Kevin R
    Applications Engineer
    National Instruments UK&Ireland

  • Difficulty driving a servo motor using cRIO 9103 and Module - 9505 and 9012 controller

    I want to run an example project (Position Control-closed loop)on my FPGA target... 
    My hardware - as mentioned above...
    When I open a new project Labview automatically detects the hardware... but when I open the example proj... how do I link the hardware with the project ?? How do I configure the cRIO now?
    Thanks in advance,
    Jaydev

    Hi Shoaib,
    Have you seen this tutorial, or is this the one you're referring to? http://zone.ni.com/devzone/cda/tut/p/id/6143
    The files are at the bottom....
    Jeff | LabVIEW Software Engineer

  • 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

Maybe you are looking for