FX Series Programmable Controlers Applied Instructions 5
5-102
5.9.8 PID (FNC 88)
Operation:
This instruction takes a current value (S
2
) and
compares it to a predefined set value (S
1
). The
difference or error between the two values is then
processed throu
g
h a PID loop to produce a
correction factor which also takes into account previous iterations and trends of the calculated
error. The PID process calculates a correction factor which is applied to the current output
value and stored as a corrected output value in destination device (D). The setup parameters
for the PID control loop are stored in 25 consecutive data re
g
isters S
3
+0 throu
g
h S
3
+24.
Points to note:
a) Ever
y
PID application is different. There will be a certain amount of “trial and error”
necessar
y
to set the variables at optimal levels.
b) The PID instruction is
only
available on FX and FX
2C
Main Processin
g
Units fitted with
CPU
versions 3.11 or greater
.
c) On FX
2N
MPUs a Pre-tunin
g
feature is available that can quickl
y
provide initial values for the
PID process. Refer to pa
g
e 10-28 for more details.
d) As 25 data re
g
ister are required for the setup parameters for the PID loop, the head address
of this data stack cannot be
g
reater than D975. The contents of this data stack are
explained later in this section. Multiple PID instructions can be pro
g
rammed, however
each PID loop must not have conflictin
g
data re
g
isters.
e) There are control limits in the PLC intended to help the PID controlled machines operate in
a safe manner. If it becomes necessar
y
to reset the Set Point Value (S
1
) durin
g
operation,
it is recommended to turn the PID command Off and restore the command after enterin
g
the
new Set Point Value. This will prevent the safet
y
control limits from stoppin
g
the operation
of the PID instruction prematurel
y
.
f) The PID instruction has a special set of error codes associated with it. Errors are identified
in the normal manner. The error codes associated with the PID loop will be fla
gg
ed b
y
M8067 with the appropriate error code bein
g
stored in D8067. These error devices are not
exclusive to the PID instruction so care should be taken to investi
g
ate errors properl
y
.
Please see chapter 6, ‘Dia
g
nostic Devices’ for more information.
g
) A full PID iteration does not have to be performed. B
y
manipulation of the setup parameters
P (proportional), I (Inte
g
ral) or D (derivative) loops ma
y
be accessed individuall
y
or in a user
defined/selected
g
roup. This is detailed later in this section.
Mnemonic Function
Operands
Program steps
S
1
S
2
S
3
D
PID
FNC 88
(PID
control loop)
re
g
ister each
Receives a data
input and
calculates a
corrective action
to a specified
level based on
PID control
D
Note: S
1
and S
2
use a sin
g
le
data re
g
ister
D
Note: S
3
uses 25
consecutive
data re
g
isters
D
Note: D
uses a sin
g
le
data re
g
ister
PID:
9 steps
X10
D 19D18PID
[ S1 ] [ S2 ] [ D ]
D 20 D 46
[ S3 ]