PID Control Application
| ||||||||||||
|
(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 For more information on Tuning PID Control by Simulation, check out our Technical Note on the subject.
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
|
||||||||||||