Data Acquisition (DAQ) and Control from Microstar Laboratories

PID Control Application

data acquisition filtering data acquisition software channel architecture enclosures services

(View more Control information.)


Process control applications require more than a simple measurement of the response of a system. These applications also need to control the response as well. A very flexible and powerful way of achieving this type of control is to use the DAPL PID1 command. The PID1 command has the same functionality as a hardware PID controller, but in addition offers ease of programming and multitasking support. Many PID tasks can be run at the same time under DAPL, each independently controlling separate outputs.

For more information on Tuning PID Control by Simulation, check out our Technical Note on the subject.

Typical Equipment:
DAP 4000a or DAP 5200a
MSXB 036 Counter/Timer Board
MSTB 004 Termination Board
MSTB 009 Termination Board
Cables MSCBL 040, MSCBL 054 or MSCBL 056, MSCBL 006, and MSCBL 076

Example: This application measures the rotational speed of a DC motor using an optical encoder and the Counter/Timer Board. It then controls the speed of the motor with an analog output.

Example PID Control Code Listing in DAPL

   OUTPORT 0..7 TYPE=0

   RESET
   PIPES SPEED, OUTSPEED
   VARIABLES SETP=64, P=-10, I=-500, D=-5

   IDEFINE COUNT 2
     SET IPIPE0 CTL0
     SET IPIPE1 CT0
     TIME 10000
     END

   PDEFINE CONTROL_SPEED
     CTRATE(IPIPE1, SPEED)
     PID1(SPEED, SETP, P, I, D, OUTSPEED)
     DACOUT(OUTSPEED, 0)
     END

   START