LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

position control with DC servo and CVI

I am trying to create an automatic beam tracking device that I think requires a closed loop system to feedback the current position of the cursor on the screen.  I have looked at the discussion forum and most is done using the motor drivers, or PID toolkits.  However, what I have with me is a multifunction DAQ (PCI 6036), my own design of a driver(with push pull amps) and DC motor.  I am able to  move it manually (left, right, up, down) by sending some voltage pulse my problem however is reading the position and input the paramaters necessary for closed loop control.  Do you have any suggestions on how to to go about this?

 

Thank You,

Jem 

0 Kudos
Message 1 of 2
(2,931 Views)

Hi Jermellie,

 

If you are using LabWindows/CVI to develop your application, I suggest you take a look at some of the shipping examples for CVI that comes with the DAQmx drivers. The one we should be particularly interested with should be PID Control-Single Channel-RT.c which can be found under C:\Documents and Settings\All Users\Documents\National Instruments\CVI\samples\DAQmx\Control\PID Control-Single Channel. You will notice that there are 2 projects in this directory: One creates the executable to communicate with the Real-Time target DLL and the other implements the actual control loop DLL. Both the StartTask and RunTask function in PID Control-Single Channel-RT.c should give you a good idea on how to implement a PID control loop using DAQmx. Note that depending on the speed at which you are sampling, a real-time target may be necessary for your application. Another documentation you can look at for more of a visual (LabVIEW) representation of a PID control is to look in your NI-DAQmx Help which can be found in Start » All Programs » National Instruments » NI-DAQ. A good place to start is by looking at the section on Control Loops under NI-DAQmx Help » Common Applications » Control.

 

I hope this helps.

S_Hong
National Instruments
Applications Engineer
0 Kudos
Message 2 of 2
(2,905 Views)