PID motor control

VTrying to implement system similar to https://decibel.ni.com/content/docs/DOC-16983 with a9 volt DC motor max speed 350 rpm 
The problem that I am facing in here is that
1.>when i set a desired speed more than 200 rpm the controller output oscillates and suddenly becomes zero and the counter shows a random value(i.e feedback is not proper).For lower speed it works fine.
2>Also the rise time for the system is very high..Whta could be the causes for these glitches?

Hi nathand,
I have configured the gains using trial and error method  and they seem to work well in simulation when i am trying to simulate the motor with its transfer function.The rise time seems large when trying to implement the system with hardware( cDAQ 9184 DIO 9401 Analog O/P card 9263)
As you say the pulses might be wrongly filtered out.I have tried reducing the minimum pulse width parameter for the filter but that does not change results.But using it is necessary otherwise the counter reads garbage values.
I am not working with system today but when i follow up tomorrow i shall surely check for errors in DAQmx read..Can you tell me what sort of eror you are suspecting might occur?
I am uploading my VI for you to check if i have made a mistake in programming.
Thanks
Attachments:
PID.vi ‏66 KB

Similar Messages

  • Can I use SoftMotion to simulate a PID motor control loop using a Solidworks model?

    Hi
    I'm not a labVIEW user yet. But I probably will become one when I can do the following:
    I have a Solidworks model of a complex machine with multiple servo motors. Can I use labVIEW plus SoftMotion to calculate the needed motor forces and aply these forces on the Solidworks model making some parts in the model move and can I get positional feedback from the Solidworks model which I can use in labVIEW to calculate the motor forces again. This way I could use labVIEW to simulate the complete motor control loop including some PID filtering.
    I could find some posts about SoftMotion, but they all seem to handle about SoftMotion in combination with external hardware. But I would like to do a complete software simulation.
    I hope this is possible.

    Hi Melomania
    Solidworks for SoftMotion works in an interesting manner. First SoftMotion runs in labview and plots a trajectory path based off the input from the user. The generated points are controlled by speed, velocity and acceleration. These generated points are sent to SolidWorks where the physics engine takes over. SolidWorks calculates the ammount of force required to move the component the given distance and also if there are any collisions that take place. Basically the whole process is open loop with no PID being implemented. The purpose for the software is to test your motion system for collisions and calculate the required torque for your motors to move and the velocities and accelerations provided. A system prototyped with SoftMotion Solidworks will still need to be tuned when constructed in the real world.
    For your application I would look into Control Design and Simulation Toolkit.
    Thank You
    Eric Reid
    National Instruments
    Motion R&D

  • Quanser DC Motor Control Trainer Missing Some VI's

    Hi, my name is Ansel. I am working on a project to set up an NI ELVIS with the Quanser DC Motor Control Trainer board and create a few very simple experiments demonstrating basic mechatronic functions.
    I've been unable to utilize the VI's that came with the Quanser DC Motor Control Trainer board. The disc that was included must have been faulty because not a single file (not even simple html files) would open. I contacted Quanser about this and was directed to a website (http://www.meqtronics.com/public/requests/QCI_TEMP/QNETCDv1.20forLabVIEW8_5/) from which I was able to download the content of the disc. The files I downloaded seem not to be broken, however when I attempt to run one of the VI's, such as "04-QNET_DCMCT_Speed_Control," all but four of the sub-VI's necessary are found. The four missing VI's are "Intergrator.VI," "Integrator (DBL).VI," "Transfer Function.VI," "and "Transfer Function (DBL).VI." I have all the necessary components installed, as far as I know, and a search of my computer's hard drive returns no results for any of these VI's. I am running the full version of LabVIEW 8.5.
    I would appreciate advice from anyone concerning this issue, but I'd also like to know if the Quanser Trainer VI's are the best way to learn how to create my own very simple VI's. All of the documentation I have found on the internet has referenced the trainer VI's that were supplied, so without them I haven't made much progress. I am only interested in a very simple open-loop system for controlling motor velocity as well as a slightly more complex closed-loop system. Is it worthwhile to get the Quanser Trainer VI's working or could I build these experiments from scratch?
    Thank you for your time.
    Ansel
    Message Edited by Ansel on 04-29-2008 04:50 PM

    Ansel,
    Just to clarify, the version of the NI-ELVIS software that you may have is not the reason for the missing VIs in the Quanser program you downloaded.  The VIs in question are included as part of the LabVIEW PID Toolkit, which I'm assuming is not installed on your machine. However, these particular VIs (Integrator, Transfer Function, etc) are fairly out of date, and they are only included in the PID Toolkit to support legacy code.  I'm not sure if you have access to the PID Toolkit (it is also included as part of the LabVIEW Real-Time Module), but I would not suggest purchasing it just to get this Quanser code working.
    If you are going to be focusing on simple open-loop control of the Quanser DC Motor, you could start by looking at some of the basic DAQmx examples.  Driving the motor at a certain velocity would just require supplying a constant voltage through a DAQ output.  If you want to do more advanced closed-loop control, the LabVIEW Control Design & Simulation Module might be worth taking a look at.  Take a look at the 3-hour Control Design & Simulation course here.  It is written specifically with the Quanser DC Motor board in mind.
    Chris M.

  • Software Feedback-b​ased PWM Motor Control

    Hi all, I'm trying to design a software based feedback controlled motor using the USB 6009 (which does not have hardware pwm capability).  I will be actively detecting the rotational speed of the motor and adjusting the software PWM in response, so the PWM does not have to be very acurate.  The user will input a desired RPM value - this value will be compared with the detected RPM and the software will adjust the PWM.  There doesn't need to be any PID control, just a linear stepping of PWM until the detected RPM of the motor is within a certain range of the desired RPM.
    The output of the 6009 controls the motor digitally using an H-bridge and I will need to be able to reverse the rotation of the motor.  1 line on the digital output goes to 1 "side" of the H bridge and the other line goes to the other "side."  Only a single side should be active at a time and the other side should be kept at LOW.  I figure this should be easy to implement once I get the PWM-feedback figured out. 
    I am currently hung up on a good method of how to implement PWM using manual software methods and construct the actual feedback mechanism.
    Here is the VI I have so far (crude PWM using mod-n of the output loop iteration counter (which isn't a linear stepping)).
    Thanks 
    Message Edited by gastro54 on 04-14-2009 06:07 PM

    here is the VI
    Attachments:
    motor control.jpg ‏148 KB

  • PID position control : guide me

    Dear member
    I want to built a PID position control 
    i read the DC position through potentiometer with -128 to 127 [full 360 degree]
    so the input to the pid is voltage range between -128 to 127
    the input of dc motor is PWM and the motor rotate direction
    so the PID output will be PWM 
    what about direction bit ??? What will be it circuit
    also how to control the speed in same system ?? is thire another PID?? 
    best regards
    hi ?Q>
    Solved!
    Go to Solution.

    nathand wrote:
    mangood wrote:
    what about control the position and the speed at same time ???
    That's a complicated problem. A quick internet search turned up this paper which describes some possible approaches:
    http://www.idt.mdh.se/kurser/ct3340/ht09/ADMINISTRATION/IRCSE09-submissions/ircse09_submission_22.pd...
    okkkkkk
    terrific paper
    hi ?Q>

  • DC Motor Control - AKD Drive and LabVIEW Softmotion

    Dear all,
    I need to control a DC motor, which basicly has to rotate from -15 degrees to +15 degrees with changeable frequencies/time period.
    The motor is used for inducing vibrations, thus the frequency and positioning must be (easily) controlled in LabVIEW.
    My setup looks as follows:
    cRIO 9082, NI 9514 C-Module, AKD Servo drive and an AKD DC Brushless motor.
    Until this point i have used a "Contour move block - repetitive" for controlling the engine using a table, however, this doesn't allow me to configure velocity and acceleration etc. Furthermore, I don't know what units the block inputs are (radians, degrees, units/rotations whatsoever) - See pictures for details on diagram and setup.
    Also, i would like the possibility to actually see and/or control a PID-controller using the feedback option.
    So, i short, i basicly want to:
    - Control the positioning of my DC motor (from -15 to +15 degrees).
    - Control the motor using a PID controller (not necessarily needed, but i would like the possibilty)
    - Control the velocity, acceleration, deceleration and frequency/time period.
    Thanks in advance - looking forward to some good answers! 
    Have a great easter holiday.
    Best regards,
    Jzaulich
    Attachments:
    Motion and error.PNG ‏20 KB
    Project tree.PNG ‏22 KB

    Hi Anders,
    Thanks for your reply.
    I have the softmotion module installed and working - thats not the issue.
    However, at the moment i'm using the "countour move" example provided with the SoftMotion module.
    It works fine, however, it doesn't allow me to change the system too much and the unit of the input is not denoted anywhere (radians, degrees, revolutions etc.).
    As i am all new to both LabVIEW and SoftMotion there's obviously a lot of obstacles.
    I would like to model the motor control using a PID regulator with the position as input - is this possible, without making it too complex?
    Best regards,
    JZaulich.

  • Motor control by serial port

    So now I decided to move to a little hardware 
    I have been controlling the speed and direction of a DC motor by passing a combination of ASCII values and HEX values.For eg:- P20 will give me some speed P50 will give me another.M1/0 will rotate the motor in both the directions.S will give me counts which has been converted to the respective RPM.
    So I have no issues here. But now I have to implement a PID controller with it.
    That means Set Point will be decided by user(That is me) and Process Variable(PV) will I think be the feedback from the output of RPM.And, I think output of PID will be given as HEX to VISA.I don't know.Am I correct over here? 
    How to implement the motor control with the PID block?
    Can anyone guide me in the right direction?
    Attachments:
    Basic Serial Write and Read1.vi ‏23 KB

    Hi Sunny,
    the output of the PID is a number used to set an actuator. In your case you have to send that number to your motor control board, which expects strings (not any kind of HEX)! As you already gave examples of the expected strings you would use a FormatIntoString function to form the proper commands.
    VISA also only uses strings as in-/output, you have to create them anyway!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • DAQ and motor control in the same VI

    Hello,
    I am a beginner in labview and I am trying to control a maxon motor and run a NIDAQ at the same time. Basically, I need to measure the pressures and the angles at the same time and record these.
    The problem that I am facing is that when I execute the VI, the motor runs first and this is followed by the measurement. I have twiddled around with it a lot getting a lot of help from this community but I can't figure it out. No matter what I do the motor starts running first and after the motor has completed its movement then the DAQ takes the measurements.
    Is there any way to run the motor and the sensors together? I can run the motor seperately and I can run the sensors separately in their own VIs but can't seem to run them sequentially.
    Any help would be appreciated.
    Aman
    Attachments:
    VI.jpg ‏64 KB

    In LabVIEW, your wires between VIs (and structures like While Loops) determine the order in which things happen.
    There are several approaches that you can take to de-couple the motor and DAQ processes.  The most obvious would be to put the motor control in one while loop, and the DAQ in another.  Yes, you can do this in LabVIEW.  Just don't get too carried away.  Each loop usually will go to a separate core to run.
    If there is data that has to be shared between the loops, you can use local variables, or the Value property nodes of the controls and indicators of your VI.
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • Maxon Motor Control and NI UMI7774

    Hello,
    I am using maxon motor control PWM servoamplifier ADS 50/10 for my application.I am currently working on a project that requires me to get the precise position (mesure) with an incremental encoder with 2 channels A and B. I am Using NI Motion, NI UMI-7774,NI PCI 7550, and Labview 10
    I try to connect my maxon direct with the Labview Hardware NI UMI 7774 and i don t know how to do this.
    anyone have any idea?

    Hello,
    can you please give me some more informations about the problems you see with the connection?
    Generally you have to at least connect the "Analog Output", the "Ground" and the "Enable" from the NI-7350 with the Maxon ADS 50/10.
    You can find an overview about the pins of the NI UMI-7774 here on page 16/17:
    http://www.ni.com/pdf/manuals/373359c.pdf
    The connector for the Maxon you can find here:
    http://www.farnell.com/datasheets/6244.pdf
    Please tell me, what informations you are looking for.
    Johannes

  • New to Motor Control, Seeking best approach

    Hi...  I have an upcoming task where we want to have a LabVIEW based motor control applied to a round, rotatable table inside a coating chamber.  The table will be on the order of 20 inches in diameter, made of aluminum and I will guess that it might weigh around 10 pounds.  We will have four equally spaced quadrants where a silicon wafer will sit in each quadrant.  On command we want the table to move to one of four locations where it will hold for quite some time (minutes to hours) while that one wafer is exposed to coating material.  Then we will want it to move to the other three positions in a similar way.  We want to have feedback that the table is where we think it is and we want to be able to define and return to a "home" position when desired...   There is a possibility that we might also want small motors on each of the four individual stations, meaning we would add some planetary rotation capability for each quadrant while still having overall motion control of the larger 20" round platform..   I'm not yet sure of the desired rotation speed of the small planetary components. but let me guess at say from once per second to once per minute...  On the other side I can imagine a case where they might want these to truly "spin" at say 1000 rpm.  For the larger 20" table I would say that needs only to be able to move one quarter of a revolution in say 10 seconds but when it stops it needs to hold accurately...    
    We will have a PC running LabVIEW controlling this and other features of the process...  Certainly a PCI backplane will be available but we have budget to also buy other interface chassis if that's what is recommended... It's a one time deal so we only need to build one system.  
    I am seeking feedback on what's the best motor type, controller, interface, etc for this kind of application...  Your thoughts???   Any feedback will be much appreciated...  thanks.. bob...

    Hi Bob,
    Here are a couple of links to get you started:
    Configuring a Motion Control System
    This is a good general intro to motion control and breaks down what NI provides in the way of Motion drives and controllers as well as the pros and cons of the different types of motors we support. 
    NI Motion Hardware
    This is a break down of all the hardware we sell.
    http://www.ni.com/motion/
    Please let me know if you have questions after looking through these links.
    Message Edited by Michelle_B on 10-20-2008 02:35 PM
    --Michelle
    Instrument Control R&D
    National Instruments
    Instrument Control
    Machine Vision

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

  • Can I modify the Arduino sketch 'LIFA_Base​.pde' to include some motor control

    Hi there,
    I am new to Labview and Arduino. I have two Inertial Measurement Unit sensors and I wish to send the readings to a PC via Bluetooth. I read that I can perform this using the LIFA. Can I modify the Arduino sketch ‘LIFA_Base.pde’ to include some motor control? I wish to use the readings earlier to control the motor to move different directions. At the same time, I wish the readings can be sent continuously to the PC wirelessly?

    The newest LIFA_Base.pde has motor controls. The issue that I see is that the VIs are designed to be connected to the Arduino through serial.
    You could have an Arduino connected to the computer and another Arduino connected to the motors. Each Arduino is equipped with Bluetooth to create the wireless connection.
    Alternatively, and probably easier... create your own case in the LabVIEWInterface.pde to handle Bluetooth commands from the computer. In this case, you would only need one Arduino with Bluetooth (connected to the motors). *Assuming your computer has Bluetooth and you can send Bluetooth commands.
    It is hard to give suggestions without knowing the whole system. Hope this helps.
    Edit: Also, you should upload your Arduino (LIFA) related questions to the LIFA Board: https://decibel.ni.com/content/groups/labview-inte​rface-for-arduino
    CLD Certified 2014

  • FPGA programming for motor control using free downloadable IP cores for PWM and Quadrature encoder interfacing

    Hi,
    I have a cRIO-9014 with a NI9505 DC brushed servo drive module, and I would like to program the FPGA for PWM and Quadrature encoder interfacing using the intellectual property IP functions mentioned in the "CompactRIO Motor Control Basics Tutorial":
    Quadrature Encoder dX Method (FPGA, Use in SCTL).vi
    Pulse Width Modulation (FPGA, Use in SCTL).vi
    I made a search at ni.com/ipnet but I couldn't find them.
    Where can I find free downloadable IP cores for PWM and encoder blocks to include them in my FPGA interface program?
    Thanking you in advance,
    Manuel
    Solved!
    Go to Solution.

    Found by myself (google search!) at:
    https://lumen.ni.com/nicif/us/codepowelecguide/content.xhtml

  • CRIO motor control using AMC Drive

    Hi
    I am trying to setup a simple DC motor control system with cRIO-9081, NI 9401 and AMC PWM servo drive 12A8.  Can someone please tell me if this AMC drive is compatible with my other NI products?  Do I need anything else to setup a simple closed loop speed control for a small DC motor?  Any advice or example is very much appreciated.
    Thanks

    Hi SunnyX,
    It seems like your servo drive is expecting an input of +/-10V analog.  Are you able to confirm this in the device manual?  If that is correct, you will not be able to generate the necessary signal with the 9401.  You will need another module that you can program to output this signal such as the 9263.  
    You could also consider using the modules designed specifically for motion control and the SoftMotion Module to simplify the motion control programming.  Please let me know if you have any additional questions or comments!  Thanks.
    Regards,
    Kira T

  • Basic LabVIEW example or tutorial for motor control beginner?

    Hello,
    I'd like to control two brushless servo motors using LabVIEW. I've got a PXI7358 controller card and a Copley amplifier. I've read the Getting Started tutorial but otherwise I am new to LabVIEW. I'm looking for a good basic VI and/or a tutorial about how to get started programming the motion of these motors with LabVIEW.
    Thanks,
    Matthew

    Hi, I'm not sure whether this is the right place for asking this question or not and if not, then please guide me to the right place for asking such question. Thanks.
    I have a stepper motor with the Vector Network Analyzer Anritsu MS4623B. I got it up and running with the LabWindows/CVI. I need to sync the motion of the stepper motor with my data acquisition. Basically, I have to acquire the data in a way that in the start the motor will come back to home position wherever it was and then I want to move it to the specific position to do the measurements (For Example, I want to measure the 40 GHz channel between 1m to 3m movement of a stepper motor on a linear positioning system (ball-screw)). I've interfaced the VNA with the PC using LabWindows/CVI and I've controlled the clockwise and anti-clockwise movements of the stepper motor using LabWindows/CVI but I'm unable to sync the system in a way that whenever I run the code, the motor will run back to the home position and then move to a specific measurement start position and move till the end position and in between do the increment and stop and acquire the data. Is there any one to help me please? It's really urgent please and I'm doing this thing first time so please guide me in a proper way. I shall really apprecaite that and will be highly obliged with you. Thanks for your time and concern.
    Thanks and Regards.
    Attachments:
    VNA & Motor Control User Interface.jpg ‏199 KB

Maybe you are looking for