RC Servo control using FP-PWM-520?

I was wondering if anyone has any experience using Labview (7.0) to control a Fieldpoint FP-PWM-520 module to drive small RC aircraft servos? I am a chemist and I am very inexperienced in advanced Labview programming but I am trying to make good use of the equipment I have available. I want to use the servos to automate a remote radiochemical synthesis ( as a syringe driver)  I have read that I may need a pulse width of up to 2 ms to drive this servo. This may kill the project right away since the output of the FP-PWM-520 seems to only go up to 1ms. Is that so? Anyway I would also very much appreciate any example code with LV 7.0 that may show this type of control. I apologize for my lack of knowledge in coding. I hope I can sort of reverse engineer someone elses code and learn a few things in the process. Thanks very much for any and all help!
                                                                                                               Steve Toorongian

We tried to use a cFP PWM module to drive RC servos and it almost worked.  My recollection
is that we could move the servo as required but the turn on and turn off issues killed the idea
for our application.  There is no way to control when in the PWM cycle the module turns off
it's output, therefore the final position of the servo (after you turn off the pwm output) could
be anywhere.  Subsequently, turning on the pwm would cause it to jump from wherever it
stopped after turn off to the new position.
Our solution was to develop a small microcontroller based pwm driver.  This gives us complete
control over the pwm output as well as a bunch of remote I/O points.  We multiplex up to
64 of these devices onto a serial port on the fp controller.
If the turn on and turn off issues aren't a problem I can dig out some of our testing .vis.  They
are not finished applications, just 'move the servo' kind of things.
The microcontroller driver was developed under contract so I can't offer any of that stuff
without permission.  Let me know if that would be of interest.
Matt

Similar Messages

  • 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

  • FP-PWM-520 - Can the phase relationship between the channels be controlled?

    When I change the period of the pulse trains on an FP-PWM-520 module using the Labview FP Write VI the syncronization of the channels changes but in a seemingly random manner. I need to set the 8 channels so that they turn on in a staggered relationship. The order of turn-on can be arbitrary but the spacing should be even.

    Hi,
    Unfortunatly, there is no mechanism that allows you to control (or synchronize) the phase between channels.
    Regards,
    Remzi A.

  • Motor control using pwm,pid

    Hi all,
    Can anyone help with this please.
    I have a counting circuit from a hall effect sensor and am controlling a motor using a PWM.I am controlling the speed of the motor varying the duty cycle and the motor is wired via solid state relay.these run fine.
    What i am trying to do now is connect through a pid as to control the speed of the motor.
    My understaning is that the set point is from the duty cycle, the process variable is the feed back from the sensor (rev per min) and the output is back to the motor to increase or decrease speed.
    Is this the correct understanding? and if so can you help with setting up.
    Attached is my vi.
    Regards Anthony
    Attachments:
    rev per min 5.vi ‏117 KB

    Continued from here: http://forums.ni.com/t5/LabVIEW/Error-200290-when-running-a-pulse-count-and-pwm-program-together/m-p...
    Please look at what I wrote there. You need only one loop. The PID and Counter Write functions should all be inside that same loop, along with the measurement. The PID will do nothing useful outside a loop.

  • Ssr control without the use of pwm

    i want to control the heater and a DC motor using the SSR. on checking for the solution i find that PWM with varing duty cycle is the best option but i don't know nothing about PWM and also how to program it on LabVIEW. i have a NI 9403 and NI 9478 DAQcard and other AI/AO cards. i am thinking of controlling the SSR using one of these cards. i am trying to use a simulated signal block (LabVIEW 2010) square wave, try to vary its duty using a PID. now the question is how to send this simulated signal to the SSR using the Available DAQ cards with me. i want to skip usage of PWM because i dont have the time. i want to start the experiments as fast as possible.

    this is the vi that i am using to control the heater for temperature control. the DAQ assistant is measuring the temperature using NI 9211 and this temperature is matched with the set point and adjust the duty cycle of the simulated signal, (square wave just like PWM),
    i am not actually using a PWM just creating something like PWM, the frequency that i have set is just a hit and trail (i dont know how much to set).
    the DAQ assistant2 controls the SSR which in turn ON/OFF the heater according to duty cycle.it's working fine. the same concept i am trying to use in the case of controlling the RPM of a DC motor.
    the rpm from the motor controller, that i have, will be fixed to 100 rpm. i will set the setpoint to 60 RPM in the PID, the PID will vary the duty cycle of the simulated signal and will controll the RPM but the question now arise is:
    1) from the experience obtained from heater control that i had done, there will be no current flowing to the DC motor because the SSR get fully closed (duty cycle 0) as soon as the process variable goes above the setpoint (60 RPM) and again opens to full (duty cycle 100) as it falls below the set point. i want it to at 50% duty cycle at at set point(60 RPM)  and as the RPM decreases it should increase the Duty cycle to adjust the RPM back to 60.
    2) now how to acheive this.
    i am simultaneously measuring the current and voltage that is going to the DC motor. if the duty cycle goes to zero ( SSR gets closed), i will not be able to measure the current and voltage going to the DC motor. that's why i want the duty cycle to be at 50%.
    Attachments:
    8 june pid cntrol heater.vi ‏127 KB

  • 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

  • Using Fieldpoint Explorer, I am having trouble configuring outputs on my RLY-420 and PWM-520 modules attached to an FP-1000 network module

    I have noticed that I can not get my Relay module to turn off all of the channels, also I can only set the PWM modules down to ~4% output.
    I have tried to "Reset" the factory defaults on the FP-1000. I've tried to configure the powerup states of the different modules, all with no luck.
    I have made sure I am running with the latest firmware on the FP-1000
    I did notice this problem before upgrading the firmware. Immediately after doing the upgrade the problem went away for a short while. Now it is back again.
    My system is configured as follows:
    1 FP-1000 network module @address 0
    4 FP-TC-120 modules @1,
    2, 3, 4
    2 FP-TB-10 dual channel bases @ 5, 6
    2 FP-PWM-520 modules @ 7, 8
    1 FP-RLY-420 module @ 9
    Something seems to me to be happening with my .iak file in FieldPoint Explorer, of course I could be completely off base.
    I appreciate any insight anybody might have with this problem
    Kerry Libberton
    TDA Research
    Wheat Ridge, CO

    Kerry,
    There are several different things that may be going on here. First of all, there may be an issue with power consumption. A network module (FP-1000 in this case) is designed to source up to 9 Watts of power to I/O modules. This assumes an average of 1 Watt per module. Certain modules require more than 1 Watt, most require less leaving extra power for the ones that require more. In your configuration, you may be over this depending upon how your FP-TB-10's are populated. Assuming that the TB-10 is unpopulated, your consumption is 4 * 0.35 + 2 * .25 + 2 * 0.6 + 1.7. = 3.8 Watts. Thus, the load from the Dual Channel modules may not exceed 5.2 Watts. If you are using exclusively the Dual Channel Analog Out Current modules, you will overload the power supply.
    Anothe
    r thing to look at is when resetting the network module, check the box that says factory configuration. After the reset, uncheck the box and then configure your channels and power-up values (edit this device on each module).
    Also, there are some times when relays may get "stuck" in an on position due to extremely high inductive loading. I have not seen that happen very frequently, but it does make me wonder, what type of load are you driving on the relay channels?
    The PWM module, has 12 bit resolution, and will accept values of 0% for the output duty cycle. What value for the period have you set?

  • How can i connect FP-PWM-520 8-Channel, 5 or 24 V PWM to computer

    Hi
    How can i connect FP-PWM-520 8-Channel, 5 or 24 V PWM to computer.
    Is it supports for Programmble interface(specially using LABVIEW).
    Give me the details to interface connector hardware and software description.
    Thankq all
    Mahesh. 

    Hi Mahesh,
    It sounds like you are just getting started with using the FP-PWM-520.
    Since you are looking for rather general information I would recommend that you search ni.com for 'FP-PWM-520' and you should find plenty of relevant links.
    Connection info can be found in the Operating Instructions Manual which is linked off of the Product Page.  More general information can be found on the DataSheet.
    As with all other National Instruments products you can easily program
    and control FieldPoint from LabVIEW.  Don't forget to download the
    latest version of FieldPoint (currently NI-FieldPoint Version 4.1 for Windows 2000/XP).
    These links and any other searches should help you find what you are looking for.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Is my PWM-520 broken?

    I have a cFP-PWM-520 module for controlling some electric heaters, but it doesn't work. The module is connected to eight solid state relays which in turn controls the heaters. Regardless of duty cycle setting, voltage supply or channel, the output is always zero (Vout-COM voltage is zero), but the status indicator is lit. I know this indicates a short circuit so I have tried the two different ways to reset the channels several times, but with no luck.
    The relays are working when I connect 24V directly to them. So is this module broken? If it is, what could be the reason?  A faulty power supply delivered 36V to Vsup on the module for a short while (about one minute), could this be the reason?
    Thanks
    Martin

    Hello Kevin,
    Don't mean to jump in here, but, I've been around Mac's since 1984 and have only re-installed a system on one occasion when I knew I messed it up with an optimizing program that crashed before it was done.
    Are you having any other issues with you system than you are describing above? Although it may resolve your problem you will not know why. As Andy-O once described it, it is like taking a "sludge-hammer" to solve the problem.
    If you are not having other issues with your system then insuring that your preferences for those programs are set properly and that the camera is compatible with the OS and hardware in the Mini ( I don't know what you have on the portable) - it could be you may need a driver for it to work.
    [WARNING: a little levity : so before you add any fluid to your headlights ( http://www.joe-ks.com/MultiMedia/LowHeadlightFluid.asf ) look to the simple things]
    Mini 1.42GHzG4/512/80/SD/Radeon9200/56   Mac OS X (10.3.9)  

  • Is it possible to do torque control using Flex Motion?

    I am trying to control the output torque to a motor?
    I know you can do velocity control using FlexMotion, how about torque control?

    To hold a servo motor at constant torque, all you need to do is provide a constant voltage. You can accomplish this using the analog output (DAC) of a FlexMotion board. To gain access to the DAC, configure the axis as an open loop stepper, then use the Load DAC.flx VI to output an analog voltage. The downside to this is that you won't have feedback, so you'll have no way to determine your position.

  • Throttle body PID control using pulse width modulation

    Hello all,
    I am trying to do a PID control for a throttle body (using pulse width modulation) for a set value of feedback voltage. The process variable is the pulse width duty cycle. The throttle body is expected to be fully open at a feedback voltage of 5V and pulse width duty cycle of 42.5%.  When I use the highlight execution using the attached file, I can see the throttle body fully open (the values observed are: PID output 42.5 %, feedback voltage approximately 4.7V). However, when the highlight execution is unclicked, the throttle body flutters in the closed condition (still PID output 42.5%, feedback voltage approximately 0.9 V). Can any one please help by suggesting any modification to this attached file to make this throttle body respond to the set value of feedback voltage.
    Many thanks 
    Ajith
    Attachments:
    Throttle body control using PWM technique - PID.vi ‏525 KB

    How did you determine your P, I, and D gains? If you have not tuned your controller, you'll get poor performance. Running with execution highlighting will slow down the execution, which will change the effect of the gains. I would start with pure proportional control (I and D = 0) with a small proportional gain, and see if it responds in approximately the way you want. If so, then your code is probably correct, and you just need to do a full tuning to get good performance. There are many resources available on the web, on this forum and elsewhere, for PID tuning. Note that since your code uses a simple PID example, and not the one from the PID toolkit, the gains do not have the units that are used in many tutorials so you'll have to correct the calculations to compensate.

  • 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

  • Fuzzy control using Labview and arduino

    Dear all,
    I have been trying to control the output of an LED using a fuzzy logic controller, based on temperature and humidity values that I receive from the DHT22 sensor via arduino in the LABVIEW setup, but the problem is, I am not sure how to set up the PWM pin of arduino for that purpose. I have used an arrangement for the setup but it has not given any LED signal so far. The VI is attached herewith.  PS- I have connected the LED to pin 6 (PWM pin) of the arduino UNO board.
    As far as the data acquisition part is concerned, the setup is working fine and I am being able to get the values of temp, humidity and light intensity.
    Any help in this regard would be highly appreciated.
    Attachments:
    temhumlightctrl1.vi ‏48 KB

    Just start with a simple VI commanding a PWM, and put a meter or a scope to see if the output changes.  If you can't get any output there is likley a problem with your setup.  If you are driving more than an LED you'll need some kind of buffer circuit or opamp to increase the current capabilities.  These micros can't drive much power so if you intend on using this PWM for controlling temperature and humidity you won't be able to drive it directly.
    Also be aware that your loop time is going to be relativly slow, and not deterministic.  Most control systems like PIDs need to have tight timing to ensure that the system stays stable while having a decent response time.  Since temperature and humidity change pretty slowly this will likely work just fine.  But know that the time it takes to send a command to the Arduino, have it go out, take a sample and then send it back over serial won't be consistent.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • PWM-520 low voltage problems

    Hi all.  I am having a problem with an FP-PWM-520 module and I'm hoping that someone can help.
    I have a Fieldpoint system with two FP-PWM-520 modules in positions @7 and @8.  The two modules are powered by a dedicated 24V supply.  One module works properly but the second module does not output enough voltage to run our equipment (~4-6V per channel at 100% instead of ~24V).
    I measured and got 23.96VDC across V and C.  I tried swapping the modules to see if it was a problem with the terminals but the problem moved with the module.
    Is there a configuration setting that i missed or is the module toast?
    Thanks,
    Dave

    Hi Janell.  Thanks for the reply.  Here are the clarifications you are looking for.
    1. The power supply is connected to the V and C terminals at postion @7 in the Fieldpoint train.  The V and C terminals at position @7 are then jumpered to the V and C terminals at position @8.  As originally connected, the two PWM modules share the same power supply.  This power supply is used exclusively for the two PWM modules.
    When I say that I swapped modules it means that I took the two modules and switched their position in the train (ie: the module that was at position @7 was moved to position @8 and the reverse was done with the other module).  When I swapped the modules, the low voltage outputs followed the module that I suspect has a problem.
    2. I did try isolating the supply to each module.  The result was that one module worked properly and the other still put out the low voltages.
    3. I will try this in the morning.  Is it possible that the PWM modules are interfering with each other?
    Thanks,
    Dave

  • FP-PWM-520 Resetting to 0% pulse width

    I am trying to use an FP-PWM-520 module to set a voltage output from a PV panel.  I am having an issue trying to reset the module to 0% pulse width.  I am taking a measurement, using an FP-AI-110 module on the same FP-2000 logger, every 1 second.  The VI I have written takes some number of readings, currently set to 10, and then resets the PWM module to 0% pulse width to open the PV module and take a new reading.  The VI then recalculates a new pulse width, sends it to the PWM and I resume taking measurements. 
    Am I wrong in assuming that I can reset, then set the PWM block 2 times in a matter of seconds?  Do I need to wait a specific amount of time before I send the reset and new pulse width? 
    Thanks for your help.
    Message Edited by upchuckjunk on 01-15-2008 05:25 PM

    I have been using Fieldpoint successfully for data acquisition for 3-4 years now.  I am new to the PWM blocks.  The code I am running resets the FP-PWM block, writing an array containing  eight "0" to the block, then waits for 1 second, reads the FP-AI block.  I can post code, but will have to strip out quite a bit from the state machine before I post it.  As I stated above, the PWM does not always reset.  It seems to reset most of the time, but every 3-4 cycles, it fails to reset the PWM to 0%.  I know this because my voltages never reach the maximum values they should. 
    To reset the blocks, what exactly do I need to do?  Do I need to wait a specific time?  Do I need to write some specific value to the block?  If I get answers to these questions, I know I can figure out what is going on with my code. 

Maybe you are looking for

  • How Can I Run A SQLJ Normal Project In SAP NWDS

    I have a question about SQLJ in SAP NWDS. 1.I created a java dictionary project,and then create the table , then depoly it.it's ok. 2.I created a java normal project including the above java dictionary project. 3.I used the SQLJ tech in the java norm

  • How do I add an animated gif to mail?

    How do I add an animated gif to mail and still have the animation active

  • ITunes Store Connection Problem and R6025 Error

    I have a problem with iTunes (v 7.6.2.9) on my desktop machine that I haven't been able to resolve. The same version works without problem on my laptop, both are fully up-to-date XP SP3 installs with no iTunes add-ons. iTunes starts correctly, but th

  • ODI not picking the file generated through calcscript

    Hi John, We have used samba and mapped the folder from linux to windows.We named the drive and specified the path. Now i ran the interface which invokes the calcscript for data extraction and the script ran well.I t generated the file. But the file i

  • ORACLE Spread Table problem !

    Please help me ! Whenever my form call the method "Connect" or "Query" of the Oracle Spread Table, the form runtime immediately quit without any warning or error message !! I've tried it on some different PCs and still receive the same result ! What