PID Loop Operation
Maintenance
and Troubleshooting
8–16
PID Loop Operation
The DL05 CPU only does PID calculation on a particular scan for the loop(s) which
have sample time periods that are due for an update (calculation). The built-in loop
scheduler applies the following rules:
S Loops with sample rates
2 seconds are processed at the rate of as
many loops per scan as is required to maintain each loop’s sample rate.
Specifying loops with fast sample rates will increase the PLC scan time.
So, use this capability only if you need it!
S Loops with sample rates > 2 seconds are processed at the rate of one
or fewer loops per scan, at the minimum rate required to maintain each
loop’s sample rate.
The implementation of loop calculation scheduling is shown in the flow chart below.
This is a more detailed look at the contents of the “Calculate PID Loops” task in the
CPU scan activities flow chart. The pointers “I” and “J” correspond to the slow (> 2
sec) and fast (
2 sec) loops, respectively. The flow chart allows the J pointer to
increment from loop 1 to the last loop, if there are any fast loops specified. The I
pointer increments only once per scan, and then only when the next slow loop is due
for an update. In this way, both I and J pointers cycle from 1 to the highest loop
number used, except at different rates. Their combined activity keeps all loops
properly updated.
Loop J
Sample rate 2 sec?
No
Yes
Loop J
PID Calculation
Loop J
Time up?
No
J > total
number of loops?
No Yes
Loop I
Time up?
Loop I
PID Calculation
Yes
I > total number
selected loops?
Yes
No
Yes
Set J = J+1 Set J = 0
Set I = I+1
Set I=0
Loop Sample Times 2 seconds:
Loop Sample Times > 2 seconds:
Begin PID loop task
End PID loop task
No