3. Instruction Set
API
Mnemonic Operands Function
88 D
PID
PID control
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
PID : 9 steps
DPID: 17 steps
SS2
SX2
SS2
SX2
SS2
SX2
Operands:
S
1
: Set value (SV) S
2
: Present value (PV) S
3
: Parameter setting (for 16-bit instruction, uses
20 consecutive devices, for 32-bit instruction, uses 21 consecutive devices) D: Output value
(MV)
Explanations:
1. This instruction is specifically for PID control. PID operation will be executed only when the
sampling time is reached. PID refers to “proportion, integration and derivative”. PID control is
widely applied to many mechanical, pneumatic and electronic equipment.
2. After all the parameters are set up, PID instruction can be executed and the results will be
stored in D. D has to be unlatched data register. (If users want to designate a latched data
register area, please clear the latched registers to 0 in the beginning of user program.
Program Example:
1. Complete the parameter setting before executing PID instruction.
2. When X0 = ON, the instruction will be executed and the result will be stored in D150. When
X0 = OFF, the instruction will not be executed and the previous data in D150 will stay intact.
3. Timing chart of the PID operation (max. operation time is approx. 80us)
A + B
B B B B
A+B A+B
#1
#2
Scan cycle Scan cycle
Sampling time (Ts) Sampling time (Ts)
Note: #1 The time for equation calculation during PID operation (approx. 72us)
#2 The PID operation time without equation calculation (approx. 8us)