User manual

PID Loop Operation
(DL450 Only)
Maintenance
8--67
PID Loop Operation (DL450 only)
DL405 User Manual, 4th Edition, Rev. A
The following ladder segment provides a time proportioned on/off control output. It
converts the continuous output in V2005 to on/off c ontrol, using the ouptut coil, Y0.
PV
Loop
Calculation
Σ
+
--
V2005SP
Time
Proportioning
Process
Y0
P
V
continuous
on/off
The example program uses two timers to generate on/off control. It makes the
following assumptions, which you can alter to fit your application:
S The loop table starts at V2000, so the control output is at V2005.
S The data format of the control output is 12-bit, unipolar (0 -- FFF or
0 -- 4095).
S The on/off control output is Y0.
The control program must “match” the resolution of the PID output to the resolution
of the time interval. The time interval for one full cycle of the on/off waveform is 10
seconds.
NOTE: Some processes change too fast for time proportioning control. Consider the
speed of your process when you c hoose this control method.Use continuous control
for processes that change too fast for time proportioning control.
T0
LD
V2005
At the end of the 10 second period, T0 turns on, and
loads the control output value (binary) from the loop table
V+05 location (V2005).
BTOR
The BTOR i nstruction changes the number in the
accumulator to a real number.
BCD
Convert the number in the accumulator to BCD format.
This satisfies the timer preset format requirement.
OUT
V1400
Output the result to V1400. In our example, this is the
location of the timer preset for TMRF T1.
END
END coil marks the end of the main program.
T1
OUT
Y0
The N.C. T1 contact, inverts the T1 timer output. The
control output is on at the beginning of the 10-second time
interval. Y0 turns off when T1 times out. The STRNE
contact prevents Y0 from energizing during the one scan
when T0 resets T1. Y0 is the actual control output.
DIVR
R4.095
Dividing the control output by 4.095, converts the
0 -- 4095 range to 0 -- 1000, which “matchs” the preset
time for TMRF T0.
RTOB
This instruction converts the real number back to
binary. This step prepares the number for conversion
to BCD. There is no real-to-BCD instruction.
T0
TMRF
V1400
The second fast timer also counts in increments of .01
seconds, so its range is variable from 0 to a maximum
of 1000 ticks, or 10 seconds. This timer’s output, T1,
turns off the output coil, Y0, when the preset is reached.
T1
T0
TMRF
K1000
A fast timer (0.01 sec. timebase) establishes the primary
time interval. The constant, K1000, sets the preset at 10
seconds (1,000 ticks). The N.C. enabling contact, T0,
makes the timer self-resetting. T0 is on for one scan
each 10 seconds, when it resets itself and T1.
T0
K0TA1
On/Off Control
Program Example