UMAX030211 Version 1.0.2. Preliminary Documentation – May be subject to change
26 - 85
Unless both the target and feedback inputs have legitimate control sources selected, the PID loop is
disabled. When active, however, the PID algorithm will be called every 7456h
PID Cycle Time,
the
default being every 10ms.
Object 6458h
PID Physical Unit Timing
is a read-only value and is defined in Seconds. The default
value for object 6459h
PID Decimal Digits Timing
is 3, which means the object 7456h, along with
other PID timing objects, are interpreted in milliseconds. Other time objects associated with the PID
control are 7452h
PID Integral Action Time (Ti)
and 7454h
PID Derivative Action Time (Td).
No time related objects use a fixed resolution of 1 decimal digit. These objects include 7450h PID
Proportional Band (G), 2450h PID Tolerance, 2451h PID Integral Gain (Ki), and 2454h PID
Derivative Gain (Kd).
By default, the PID loop is assumed to be controlling a single output which will increase/decrease as
the feedback over/undershoots the target. However, some systems may require a push-pull
response where one output comes on when over target, and the other when under. Object 2457h
PID Control Response allows the user to select the response profile as needed from Table 14.
Value Meaning
0
Single Output
1
On When Over Target
2
On When Below Target
Table 14 – PID Control Response Options
The PID algorithm used is shown below, with names in red being the object variables. The result
PIDOutput
K
is written to the read-only mappable object 2460h
PID Output Field Value
and is
interpreted as a percentage value with 1 decimal place resolution. It can be used as the control
source for another function block, i.e. one of the analog outputs.
T
= Loop_Update_Rate*0.001
P_Gain =
G
I_Gain =
Ki
*T/
Ti
D_Gain =
Kd
*T/
Td
Note: If Ti is zero, I_Gain = 0
Error
k
= Target – Feedback
ErrorSum
k
= ErrorSum
k-1
+ Error
k
P
k
= Error
k
* P_Gain
I
k
= ErrorSum
k
* I_Gain
D
k
= (Error
k
-Error
k-1
) * D_Gain
PIDOutput
k
= P
k
+ I
k
+ D
k
Figure 11 – PID Control Algorithm