Closed loop control of DC motor drive using PCI 6251

Hi
i am using NI PCI 6251 for closed loop control of dc drive.(shunt motor,220v, 0.5HP, 2.5A rated, 1500RPM)
the dc motor is fed from a bidirectional dc-dc converter. this converter works in boost mode(forword motoring) and buck mode(braking mode/battery charging)
the converter is built using mitsubishi IGBT module. at low voltage side of the converter a battery bank of 48V is connected and high voltage side the motor is connected.
An IR sensor is developed to measure the speed of the motor and a hall current sensor is used to sense the converter current.
in the control part i have an inner current control loop(PWM controller) and a outer speed control loop.both controllers are PI controller. To measure the speed i have used counter of the DAQ assistant, then frequency. then this frequency is converted to RPM using labview.after giving the speed and current signals  to the controllers , then i started  tunning the PI gain, but at the starting the duty cycles was 100%, so the IGBT got damaged immediately. now how to tune the controllers during the closed loop operation.  the switching frequency of the converter is 20KHz.   
can any body suggest me how to run the dc drive in closed loop ?
thanking you.

Hi Premenanda
The freq data receiverd from the daq assistant has the units of Hz, or in terms of motor speed, rps (rotations per second). I can see that you are trying to convert that to rpm (rotation per minute). which can be done by dividing the rps speed by 60. Instead, you are multiplying it by 60 and also comparing with 2000. the resultant multiplied value is displayed in your program only if it is smaller than 2000.which is causing the problem here.( as seen in file 'original code.png)
I have attached a file named 'modified code.png' that shows how the conversion from rps to rpm is done. Please do the required changes in your code and let me know if it works.
Attachments:
modified code.png ‏18 KB
Original code.png ‏15 KB

Similar Messages

  • Closed loop control of step motors possible with 7344?

    Hi All
    I have been looking around here for a while for an answer to this question.
    For me, a closed loop control system is correcting for following errors all the time, also when the move is complete.
    If the load on a system changes, there will often be a need for compensation in order to keep the position right. Then you need a closed loop control system.
    I have made a system using DC motors with a 7342 controller. We are in the process og getting a new similar system, where the manufacturer chosed stepmotors in the believe that it can be used in closed loop.
    Is it really true that the NI version of closed loop is only performing a what you call a "pull-in" at the end of the move in order to correct for lost steps or flexibility of the connection between motor and object/encoder?
    I would call this "backlash compensation" or something like that.
    Why dont you make a real closed loop option. The control voltage from your servo motor control, could be fed into a voltage-frequency converter with a matchin sign signal.
    This shouldn't be too complicated to accomplish.
    /b

    You are right. NI motion control boards don't apply a control algorithm
    during moves when configured in closed loop stepper mode. In this mode
    the board monitors the following error during the move and generates an
    error when the following error limit is exceeded and they start the
    pull-in moves at the end of the move if necessary.
    If you really want to do PID control with stepper motors you still
    could connect an external V/f converter to the DAC outputs of the board
    and control the axes like DC motor axes. Some vendors implement this
    feature on their board but NI has decided not to do that as we don't
    think that this approach provides a good solution. Here are some reasons:
    The most important issue is the fact that you could easily exceed
    the maximum rate of change of the motor frequency in the case that the
    following error increases during the move. For a DC motor this would mean that the
    voltage of the controller increases to compensate for this error and
    the motor will follow - probably with some delay, but it will follow. For
    the stepper this could mean that the acceleration becomes so high
    that the motor stops immediately as it can't follow with a delay like a DC motor. What
    should the controller do then? Restart the move automatically? Generate
    an error? There is a big chance that you end up with a system moving in a stop and go mode.
    The second issue is related to the control algorithm itself. The transfer function of a stepper motor is not really linear so it will be quite hard to find good tuning parameters. A DC motor can be tuned by analyzing the step response and the Bode plot. For the reasons that I have described in 1.) this won't work for a stepper so how should you tune it?
    I have talked to some  motion control engineers who have tried to control steppers with a PID algorithm and they all agree that this is a real pain and it's not recommended.
    So if your system requirements involve online following error compensation I strongly recommend using a DC motor.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • How can I control a stepper motor drive using a DAQ card?

    I need to control a simple CW/CCW stepper motor drive using a DAQ
    card.  I simply need to output a 5 volt signal and then a drop in
    the signal, and so on 200 times or steps for 1 revolution.  I have
    desiigned the basic program, but do not know how to output the
    appropriate signal.
    Cheers,
    Matt

    What DAQ card do you have? Ideally, one with a counter output to generate the steps, where you can control frequency. If you try to start the motor too fast (acceleration or abrupt application of fast pulses) it may stall out. Search in Help/Search for Examples for 'frequency' and 'pulse' for example of frequency generation. You can also use a digital output on the DAQ card to control direction.
    If DAQ card does not have a counter, you coul do a software timed loop to toggle a digital output to generate the pulse train. It may not be fast enough nor accurate for your application, do not know from info you have given
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Stepper motor closed loop control using 7344

    I have some question about the closed loop control of stepper motor using 7344. From the NI website I got that closed loop steppers work differently from closed loop servos. Instead of adjusting the output on each PID iteration like a servo system, closed loop steppers will do a pull-in move at the end of a move to adjust for any difference between the target position and the encoder feedback. By default, it will attempt the pull-in move three times.
    Now for example I got five points: (0,0) (10,20) (30 40) ( 31 60) (50 65). The request time interval I set as 10ms. This mean that in the first 10ms, the machine should move from (0 0) to (10 20). But for some reasons the machine can not move to (10, 20), it moves to (8,16) and the first 10ms passed. In the second 10ms, how it move? Move from (8 16) to (30 40), If like this, the following error will accumulated. In practise, it is not accumulated. Is there anyone can explain something about the closed loop control of stepp motor? Thanks a lot!

    Requested Interval is additional data for the Position buffer type. The Position buffer type requires a Requested Interval parameter, and indicates the time between contouring data points in milliseconds. For all other buffer types, the Requested Interval parameter is ignored.
    The controller will use the closest value it can that is greater than or equal to the interval value you requested. Your time interval must be an even multiple of the PID rate.
    For example, given a PID rate of 250 ms, a time interval of 11.2 ms between points is physically impossible, so a call to configure buffer with an interval of 11.2 causes the  buffer to actually be configured for 11.25 ms, since 11.25 is the nearest possible interval greater than 11.2. The following table shows valid intervals for each PID rate.
    My question is like this. For example I got five points: (0,0) (10,20) (30 40) ( 31 60) (50 65). The request time interval I set as 10ms. This mean that in the first 10ms, the machine should move from (0 0) to (10 20).  If it is impossible for the machine to move from (0 0) to (10 20), there are two ways to solve this problem. First is the time interval is 10ms and assume it move to (8 16) within 10ms and take (8 16) as the start point and (30 40) as the end point of the second move. Second is extend the time interval, assume it takes 14ms to move from (0 0) to (10 20). After 14ms, the (10 20) is the new start point for the second move. I think it works as the second ways.If not, the following error will accumulated.  Is there anyone can explain something about the closed loop control of stepp motor in detail? Thanks a lot!

  • Creating a simple closed loop control

    Hi everyone,
    I need a bit of help creating a (very) simple closed loop control.
    Note: I am using 3 Measurement Computing boards: one USB-2416, and two USB-TC's. Since Measurement Computing has their own driver (called ULx), it might be a bit more difficult to understand than the NI drivers, but keep in mind ULx is the equivalent to DAQmx.
    I need to be able output a 0 or 1 binary value based on measurements from 4 voltage input channels compared to constants. Ie. if voltage measurement < 3.5 (constant), send a boolean value (see a, b, c, d in attached photo) which in turn gets sent to the ULx Write VI, and that outputs the binary value of 0 or 1. The problem I've run into is that I need to "compare" single chanels from different boards, which gives me single boolean values for each channel. The ULx Write VI only accepts boolean arrays. Is there a way (and there probably is, I just haven't been able to find it) of arranging these lone boolean values into a boolean array?
    (see attached file for what I have so far)
    PS. I am a COMPLETE rookie, only been using LV for a week or so, so please explain everything as if I have no clue what's going on.
    Thanks in advance!
    Solved!
    Go to Solution.

    Hi,
    the attached example I've made should demonstrate what you need to do.
    Some things to think about:
    1. It seems that the ULx vis return arrays of signals. If so you can select signals with "index array" as done in my example. That consumes less space and does not change the type of the signals to variant.
    2. If you compare the signals to your constants you will receive boolean arrays because every element of the measured signal is compared to the constant (see my example). You may then decide how to process that info - another hooray for signals :-)
    Regards
    Florian
    Attachments:
    Example01.vi ‏24 KB

  • Problem using PID toolkit and control design toolkit to design the closed loop system. (for DC motor closed loop)

    Hi, i have facing some problem during i upgrade a project. This project is an opened loop system, it only achieved up to controlling the speed of motor, detecting the speed of motor, and switching the direction of motor while controlling the motor (This motor is a 12 VDC motor).
    In order to improve the project, closed-loop dc motor control system will be implemented to correct the error of the motor's speed and maintaining the speed for the initial setting. I would like to use PID control method to do the closed loop system.
    I already installed the PID toolkit V8.2 and control design toolkit V2.1.2, and i'm using DAQ usb 6221, LabVIEW 8.5
    Below is my problem.
    http://img177.imageshack.us/my.php?image=howtocreatethesetpointnx2.jpg
    question: 1. How to generate a icon for set point? my setpoint is duty cycle...
                    2. How to feedback the output duty cycle to summing junction?
    below this is my basic concept
    http://img237.imageshack.us/my.php?image=closedloopbz5.jpg
    Problem 2:
    http://img357.imageshack.us/my.php?image=problem1yk2.jpg
    question: Why PID toolkit icon cannot wire to cd series.vi?
    Below is my original program...
    http://rapidshare.com/files/140538836/pwm_generate-final_PSMII.vi.html

    Hi Cyrus
    Have you had the opportunity to see our
    developer zone site on the PID toolkit? This article also has sample
    code at the bottom that may help you in developing your application. I
    have also linked below knowledge bases regarding setting a point
    profile and generating a PWM from a digital output line. 
    PID toolkit
    http://zone.ni.com/devzone/cda/tut/p/id/6440 
    How to generate a set point profile:
    http://digital.ni.com/public.nsf/allkb/125F27AC143B6AFD86256C2B0004A4DC?OpenDocument
     How to generate a PWM on a digital output line:
    http://digital.ni.com/public.nsf/allkb/1561D31534F07D608625727900391114?OpenDocument 
    Thank You
    Eric Reid
    Thank You
    Eric Reid
    National Instruments
    Motion R&D

  • DC motor closed loop control through labview using usb 6008

    Hello
    i am doing a project in which i want to control the speed of a DC motor (PID control) through labVIEW 2010. I am having a DC motor, a drive unit that regulates the voltage to the motor by getting analog voltage from 0 to 3.3V ( it can be used for both directions) and i also have a NI usb 6008 board. The problem is that i can't feed the usb 6008 with the digital signal from my hall effect speed sensor. Is it posible with this setup to control the motor?? I can also try to use the pulse as analog input and trasform the frequency into rpm's. Then i am thinking of generating an analog signal to feed the motor drive. If you have any further suggestion of a probably better hardware setup would be more than helpfull to me.
    Sincerely
    Jason Chaloulos

    Hello Michael
    Thanks for the reply. I came across those topics before and all of them are trying to generate a PWM signal as output i want to use just an analog signal output so timing on the output is not that important i guess. i am struggling on getting the frequency from the digital input signal that my hall effect sensor generates. Since the maximum speed of the motor is 3000 rpm and with my tooth wheel the maximum  output frequency of the sensor will be 300Hz which i see its way less than the limitation of my ni board. Is there any tutorial documentation that might help me with this one ? Thank you in advance.
    Kind regards
    Jason

  • Position Control of compumotor 406LXR linear servo table and GV-U6E(motor drive) with PCI-7344

    Since I had the answers referring:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000DD490000&USEARCHCONTEXT_CATEGORY_0=_14_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_14_&UCATEGORY_S=0
    Wiring step was done well. However, I still have a problem that MAX configuration doesn't fit in compumotor drive settings. Therefore, the setup is shown below, and I want to know how I can set up PCI-7344 configuration in MAX or LabVIEW VI.
    ;Uploaded from device address 0
    ;Gemini GV Servo Drive Setup
    ;Motor Setup
    DMTR 1703 ;Motor ID (406-x-LXR-M-x-D13-x-x-x-x-E5-x-x-x)
    DMTIC 2.48 ;Continuous Current (Amps-RMS)
    DMTICD 0.00 ;Continuous Current Derating (% derating at rated speed)
    DMTKE 17.6 ;Motor Ke (Volts (0-to-peak)/krpm)
    DMTRES 10.10 ;Motor Winding Resistance (Ohm)
    DMTJ 119.300 ;Motor Rotor Inertia (kg*m*m*10e-6)
    DPOLE 1 ;Number of Motor Pole Pairs
    DMTW 40.5 ;Motor Rated Speed (rev/sec)
    DMTIP 7.40 ;Peak Current (Amps-RMS)
    DMTLMN 3.4 ;Minimum Motor Inductance (mH)
    DMTLMX 3.4 ;Maximum Motor Inductance (mH)
    DMTD 0.000000 ;Motor Damping (Nm/rad/sec)
    DMTRWC 0.23 ;Motor Thermal Resistance (degrees Celsius/Watt)
    DMTTCM 20.0 ;Motor Thermal Time Constant (minutes)
    DMTTCW 0.33 ;Motor Winding Time Constant (minutes)
    DMTAMB 40.00 ;Motor Ambient Temperature (degrees Celsius)
    DMTMAX 90.00 ;Maximum Motor Winding Temperature (degrees Celsius)
    DHALL 1 ;Disable Hall Sensor Checking
    DMTLQS 0 ;Set Q Axis Inductance Saturation
    DMTLDS 0 ;Set D Axis Inductance Saturation
    DTHERM 0 ;Disable motor thermal switch input
    ;Drive Setup
    DMODE 2 ;Drive Control Mode
    DRES 8400 ;Drive Resolution (counts/rev)
    DPWM 16 ;Drive PWM Frequency (kHz)
    SFB 1 ;Encoder Feedback
    ERES 8400 ;Encoder Resolution (counts/rev)
    ORES 8400 ;Encoder Output Resolution (counts/rev)
    DMEPIT 42.00 ;Electrical Pitch (mm)
    SHALL 0 ;Invert Hall Sensors
    DMTLIM 1.5 ;Torque Limit (Nm)
    DMTSCL 1.5 ;Torque Scaling (Nm)
    DMVLIM 119.000000 ;Velocity Limit (rev/sec)
    DMVSCL 119.000000 ;Velocity Scaling (rev/sec)
    ;Load Setup
    LJRAT 0.0 ;Load-to-Rotor Inertia Ratio
    LDAMP 0.0000 ;Load Damping (Nm/rad/sec)
    ;Fault Setup
    FLTSTP 1 ;Fault on Startup Indexer Pulses Enable
    FLTDSB 1 ;Fault on Drive Disable Enable
    SMPER 8400 ;Maximum Allowable Position Error (counts)
    SMVER 0.000000 ;Maximum Allowable Velocity Error (rev/sec)
    DIFOLD 0 ;Current Foldback Enable
    ;Digital Input Setup
    INLVL 11000000 ;Input Active Level
    INDEB 50 ;Input Debounce Time (milliseconds)
    INUFD 0 ;Input User Fault Delay Time (milliseconds)
    LH 0 ;Hardware EOT Limits Enable
    ;Digital Output Setup
    OUTBD 0 ;Output Brake Delay Time (milliseconds)
    OUTLVL 0100000 ;Output Active Level
    ;Analog Monitor Setup
    DMONAV 0 ;Analog Monitor A Variable
    DMONAS 100 ;Analog Monitor A Scaling (% of full scale output)
    DMONBV 0 ;Analog Monitor B Variable
    DMONBS 100 ;Analog Monitor B Scaling (% of full scale ouput)
    ;Servo Tuning
    DIBW 1500 ;Current Loop Bandwidth (Hz)
    DVBW 100 ;Velocity Loop Bandwidth (Hz)
    DPBW 40.00 ;Position Loop Bandwidth (Hz)
    SGPSIG 1.000 ;Velocity/Position Bandwidth Ratio
    SGIRAT 1.000 ;Current Damping Ratio
    SGVRAT 1.000 ;Velocity Damping Ratio
    SGPRAT 1.000 ;Position Damping Ratio
    DNOTAF 0 ;Notch Filter A Frequency (Hz)
    DNOTAQ 1.0 ;Notch Filter A Quality Factor
    DNOTAD 0.0000 ;Notch Filter A Depth
    DNOTBF 0 ;Notch Filter B Frequency (Hz)
    DNOTBQ 1.0 ;Notch Filter B Quality Factor
    DNOTBD 0.0000 ;Notch Filter B Depth
    DNOTLG 0 ;Notch Lag Filter Break Frequency (Hz)
    DNOTLD 0 ;Notch Lead Filter Break Frequency (Hz)
    SGINTE 1 ;Integrator Option
    SGVF 0 ;Velocity Feedforward Gain (%)
    SGAF 0 ;Acceleration Feedforward Gain (%)
    Regards,
    JinHo

    First of all, before connecting the drive to the 73xx controller I would check that the drive and motor configuration works correctly independent from the controller. The Gemini drives have a utility called the Motion Planner that allows you to configure your motor and drive for independent operation so you can test if the motor and drive combination are working by themselves. Refer to page 18 of the Gemini GV installation guide which you can find at the compumotor site or download from:
    http://www.compumotor.com/manuals/gemini/Gemini_GV_HW_Install_Guide.pdf
    Once you have tested your motor and drive combination, make sure that the drive is configured in torque mode and that the command signal is configured to be sent from the I/O connector and not through RS232 using the Motion Planner. The next step would be to connect the 7344 through the UMI-7764 breakout box in the following order:
    ---- UMI7764 GVU6E
    ---- AOut Cmd+ (pin23)
    ---- AOGnd Cmd- (pin24)
    ---- InhOut Enable- (pin2)
    ---- +5V Enable+ (pin24)
    7344 --> EncA AX+ (pin8)
    ---- EncA- AX- (pin9)
    ---- EncB BX+ (pin10)
    ---- EncB- BX- (pin11)
    ---- Index ZX+ (pin12)
    ---- Index- ZX- (pin13)
    ---- +5V Encoder +5V (pin5)
    Verify that your enable line is connected in an open collector mode (as shown in the diagram above). Our inhibit outputs can sink current but not source it so if your enable line is not behaving properly you want to make sure that the +5v supply you are suing for the UMI can source enough current for your enable line to work. Consult Compumotor on the specs of their enable switch.
    Once the connections are done properly, all you need to do is configure and initialize your board for servo operation in MAX and then you can start your tuning process. Refer to the Tuning PID for servos tutorial in:
    http://www.ni.com/support/motnsupp.htm
    for instructions on tuning your servomotor properly. Also for more information on using MAX, refer to the following tutorial:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/081957EE013C7A4586256B92007818E0?opendocument

  • How to generate a pulse of 5 V -ve polarity in synchronis​ation with a 10 v input using PCI 6251 DAQ board

    HI
    I want to generate a 5V -ve polarity pulse to trigger my IEEE 1394 camera using an PCI 6251 (scb68 pin E) device, furthermore I am reading a standard Vsync signal from a SVGA port which is 10 v.
    Now I want to synchronise the image capture of an IEEE 1394 camera with the Vsync signal so that camera is triggered to capture at every 4th Vsync signal (which is 50HZ.). Presently I am able to read the Vsync signal and also generate the -5 v signal But the Daq board generates a continues -5v signal while I want a 1 ms pulse (for every 4th Vsync).
    Also this 5 v signal is generated even if the vi is stopped running.
    Can anybody guide me so this problem can be solved.
    Thanks a lot in advance
    Shri

    You can use the Write function, that is you can use the 10 volt signal as a trigger for the task, and when you get this trigger, the task starts and generate (writes) a waveform you defined in an array ("data", in the example).
    Something like this..
    DAQmxCreateTask("",&taskHandle);
    DAQmxCreateAOVoltageChan (taskHandle, clokSource, your_sampling_freq, -10.0, 10.0,
    DAQmx_Val_Volts, "");
    DAQmxCfgSampClkTiming (taskHandle, clockSource, SAMPLING_RATE,
    DAQmx_Val_Rising, DAQmx_Val_FiniteSamps,
    samp_to_read);
    DAQmxCfgAnlgEdgeStartTrig (taskHandle, input_channel, DAQmx_Val_RisingSlope, 9.0);
    DAQmxWriteAnalogF64 (taskHandle, 1000, 0, 10.0,
    DAQmx_Val_GroupByChannel, data, //data contain a pulse
    &samp_per_channel, 0);
    DAQmxStartTask(taskHandle);
    // and then you create a loop....
    For example you can specify data to be like this:
    data[0] = -5;
    for(i=1;i<1000; i++){
    data[i] = 0;
    Tell me if you need more help.....
    bye

  • Using PCI-6251 with Labview 6.1

    I recently purchased a PCI-6251 multifucntion DAQ board to get a higher sampling rate than my old PCI-MIO-16E-4 board.  However I have existing software that I want to run on the new board.  The board came with NI-DAQmx which will only work with Labview 7 or above.  I am currently running NI-DAQ 6.9.3 and the Measurement and Automation program does not recognize the new PCI-6251 board.  Is there anyway to get Labview 6.1/NI-DAQ 6.9.3 to recognize and configure the new board?  Or will I be forced to upgrade my Labview?

    The M-series boards (PCI-62xx are M-series) require NI-DAQmx driver. The NI-DAQmx driver requires a newer Labview. No way around it.
    John Weeks
    WaveMetrics, Inc.
    Phone (503) 620-3001
    Fax (503) 620-6754
    www.wavemetrics.com

  • Synchronous UART using PCI-6251

    Hello
    I am a beginner using LabVIEW and I need to create a synchronous UART using the PCI-6251, meaning, using one digital I/O to generate clock while another one shifts the data bit-by-bit. It has to work as a master in a half duplex mode. (LabVIEW always providing the clock but data flowing in one direction at a time).
    Could someone help me?
    Thanks!

    Hello, 
    It looks like your application is similar to the one in this forum. However the hardware in the forum is an X-Series in which the digital I/O has a dedicated sample clock and the PCI-6251 is an M-Series which requires you to provide the sample clock.  In order to accomplish what you are describing you will need to create a counter output task to use as your sample clock for the digital output and also to export on a PFI line.  An example of using a counter to correlate the digital output can be found by opening LabVIEW and navigating to Help»Find Examples»Hardware Input and Output»DAQmx»Digital Generation and selecting the Correlated Dig Write With Counter.vi.
    Thank you,
    Justin P 
    Justin
    National Instruments
    Product Support Engineer - Conditioned Measurements

  • How can I control a dc motor speed using an optical switch?

    I am trying to use LabVIEW to create a VI that controls the speed of a DC motor. The system needs to have an user set rpm and the DC motor needs to adjust the duty cycle to obtain the correct rpm dependant on the load. A disk with holes and an optical switch is being used to measure rpm.
    The current problem is that I cannot get the rpm based on the optical switch.
    Thanks for your help!
    Attachments:
    Speed reg.vi ‏183 KB

    The error for the samples to write does not appear after redoing the vi. Thanks. The controller seems to be working mostly.
    However, the issue with the Tone Measurement reading inaccurately at low frequencies still exist. Any ideas?
    I have attached the latest vi.
    Thanks again!
    Attachments:
    speed_reg_v2013-05-07.vi ‏183 KB

  • Closed loop velocity control based on load cell force

    Hello,
    My application is for a drill, that drills into rocks of various densities for the purpose of collecting rock core samples.
    My setup has 2 motors which get controlled, one spins the drill bit at a constant velocity, the other moves the drill mechanism along a Z axis.
    For efficient cutting, it is desired to apply a constant force between the drill bit and the rock.  I have a load cell which measures the force being exerted by the drill bit on the rock surface, and this force can be adjusted by changing the velocity of the Z axis.  So I would like to employ closed loop control to adjust the Z axis velocity to maintain a constant force on the rock.
    Platform: cRIO 9073, with NI 9505 & 9215 Modules, Labview 2010 Full with RT and FPGA modules.
    The load cell is by Transducer Techniques, and I use their TMO-1 module to condition the signal, the output of which is attached to an input of the 9215 module, where 0-100 lbs equates to 0-8VDC.
    The motors and encoders for the Drill and Z axis are connected directly to the 9505 modules.
    Right now I am using a modified version the example found in ...\examples\CompactRIO\Module Specific\NI 9505\Velocity Control (closed loop)\Velocity Control (closed loop) - NI 9505.lvproj to accomplish velocity control of the motors.
    My questions are:
    1) Do I have the appropriate NI hardware/software for this task?
    2) With my current hardware setup, what would be an appropriate way to control my Z axis velocity rate based on Analog feedback from the load cell?
    3) Development time is a critical factor, so are there any toolkits etc that are easy to get started with that would drastically decrease my development time, or do I already have everything I need?
    Thank you for your time
    -MK Hokie

    1. Your hardware and software look appropriate assuming the motors are compatible with the 9505s.  You didn't mention the NI SoftMotion module in your software list which is something you will need.
    2.  There are a few ways of doing this.  One method would be to have a force PID loop that would attempt to maintain a force setpoint by directly outputting values to your torque loop.  In this case, the drill would essentially move as fast as it could while maintaining the force setpoint.  Another option is to have the force loop output a velocity setpoint.  You would then have a velocity PID loop that outputs torque values to the torque loop.  By adding this additional velocity loop you could have control over your maximum and minimum velocities.  There are likely other alternatives as well, but these are the first two that come to mind.
    3.  Unfortunately there are no shipping examples that close the loop on force feedback.  My advice would be to start with the NI 9505 shipping example and adapt it to your needs.  There are quite a few things you will want to change though.  Do you know if you will need to use the trajectory generator to move the drill into position before starting the force control?
    Assuming you don't need any trajectory generation, you can scrap the entire RT portion of the NI 9505 example and just create the necessary FPGA code.  On the FPGA, you won't need the Spline or Synchronization code either because this information would no longer be coming from RT.   You could take these out and replace the position loop with a force loop and possibly a velocity loop and your FPGA program would basically be finished.  In fact the only real motion IP that you will need is for the encoders (assuming you want velocity control) and PID.  Then you would need to create an RT VI that allows you to send down enable, disable, PID gains, and setpoints. 
    If you do need trajectory generation, you would want to keep most of the example code the way that it is, but then program in a 'Force Mode' that utilizes the force and velocity controly as described above.  You could think of it as having two different routines programmed side by side. 
    Regards,
    Burt S

  • Closed Loop or Open Loop

    Dear All,
    I'm currently using the DAQ card PIC-6221 to control a DC servomotor with an encoder displacement feedback. I'm using the labview program with a motor amplifier to start the motor and stop it at a specific rotational displacement, where it works by stopping the motor when the encoder feedback value reaches the input desired displacement value. The final displacement of the motor before it stops always exceeds the desired value marginally. May I know for my case,am I using an open or closed loop control? Is a PID controller a MUST for closed loop control? Is my DAQ card capable of desigining a PID controller? If so may I know how?
    Also, my project requires me to toggle between the current and voltage mode control. May I know if that is possible to carry out digitally using the Labview Program as my current motor amplifier requires me to push a switch manually to toggle between Voltage and Current mode. Finally, I hope my last question is not out of this world but is it possible to use 2 amplifiers(drivers) for a single motor such that there's a chance to use both the current and voltage modes of control?
    Really looking forward to the replys of you kind souls out there! Thanks!
    Regards,
    Oompa

    Oompa,
    to learn more about the general concepts of motion control, please visit this link.
    In general I widely agree with JB's suggestions. I'll just add some more comments to your questions.
    If you need closed loop control depends on what you try to accomplish. If you just want to generate a certain torque (current mode) that is proportional to the output voltage of your control device, you may not need to run a closed loop system. A similar statement is true for the voltage mode.
    Closed loop control is especially important if you need to control the position, or if you need to run a special trajectory profile (position/velocity/torque over time)
    Maybe it's possible to control the current/voltage mode of your drive with a digital signal. You will have to find out in the manual or check with the vendor.
    Using two drives with a single motor doesn't seem to be recommendable. If you want to do something like that, you will need to switch the power signals with relays between the two drives, but as you are working with inductive loads this might become quite tricky and there is a risk to burn both, the motor and the drives...
    Regards,
    Jochen Klier
    National Instruments

  • Closed loop configuration question

    I have a motor(with encoder feedback) attached to a linear actuator(with end limit switches).
    The motor has a commercially bought servo drive for control. 
    The servo drive will accept either a step/direction (2 seperate TTL
    digital pulse train inputs) or an analog -10 to 10vdc input for
    control. 
    The purpose is to drive a linear actuator(continiously in and out) in
    closed loop operation utilizing a ( (SV) Setpoint variable)value from a
    file converted to a frequency to compare with an actual ( (PV) Position
    variable) measured frequency.
    I have created and experimented with individual vi's allows analog
    control and digital pulse train control (thankfully with the help of
    examples). 
    Before I pose my question, I would like to make the following
    observations:  It is my understanding that Closed loop control
    means that I dont need to know an exact position at which to drive, but
    constant comparision of PV and SV through PID applictation. 
    Without getting into any proprietery information I can say that the
    constant positioning of the linear actuator will produce a latency of 2
    to 3 seconds based on the time the actuator moves to a new position and
    when the PV will change.  While experimenting with the analog
    input, i noticed imediate response to motor velocity, but after the
    motor is stopped, position is not held in place.  However, while
    experimenting with the Digital pulse train input, I noticed that the
    servo drive can only accept one command at one time; if, halfway
    through a move, position error produces a response to move the linear
    actuator in the opposite or different direction, the origional move
    must finish first. 
    Can anyone recommend the proper configuration for the closed loop control i have described?
    If I can make the system work with the servo drive/motor I plan to use
    the simple (pci 6014) daq card with the Analog out, or utilize the
    digital out.
    If I cant get this to work, we do have a pxi with 7344 motion card(I
    would like to exhaust all efforts to use the PCI 6014 card).
    Depending on where I go from here, I planned to use the PID vi's for the loop control.
    Thanks,
    Wayne Hilburn

    Thanks for the reply
    Jochen.  I realize there is a built-in latency with windows but I
    think the I/O control would be ok.  A change in actuator position
    will not result in an immediate change in process variable;  Is
    there a way to measure the latency or is it calculated?  A
    satisfactory reaction time could be from 1 to 1.5 sec.
    Use of the PCI-6014 is to supply the control output to the servo
    drive/amp, and not to drive the motor itself.  As stated earlier,
    while using the 6014 board, I have the choice of digital or analog
    output.
    Currently I am at a point where I must choose which configuration,
    analog control or digital control(in the form of digital pulse train),
    (i am inserting from first message)
    While experimenting with the analog
    input, i noticed imediate response to motor velocity, but after the
    motor is stopped, position is not held in place.  However, while
    experimenting with the Digital pulse train input, I noticed that the
    servo drive can only accept one command at one time; if, halfway
    through a move, position error produces a response to move the linear
    actuator in the opposite or different direction, the origional move
    must finish first.  .
    I dont claim to understand all the limitations with the
    specific boards, however, i am using an approach that is showing me the
    characteristics(a couple are listed in the above paragraph)  of
    the hardware and software configurations.
    So I am really back to my origional question;  Which configuration
    would be better for closed loop control, analog or digital pulse train?
    Thanks,
    Wayne Hilburn

Maybe you are looking for