Omron CP1E-N@@D@-@ Computer Hardware User Manual


 
2-267
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Data Control Instructions
2
PIDAT
Sample program
Interrupting PID Control to Perform Autotuning
At the rising edge of CIO 0.00 (OFF to ON), the work area in D211 to
D240 is initialized according to the parameters (shown below) set in
D200 to D208. After the work area has been initialized, PID control is
executed and the manipulated variable is output to CIO 20.
While CIO 0.00 is ON, PID control is executed at the sampling period
intervals according to the parameters set in D200 to D210. The manip-
ulated variable is output to CIO 20.
The PID constants used in PID calculations will not be changed even if
the proportional band (P), integral constant (Tik), or derivative con-
stant is changed after CIO 0.00 turns ON.
At the rising edge of W 0.0 (OFF to ON), SETB(532) turns ON bit 15 of
D209 (C+9) and starts autotuning. When autotuning is completed, the
calculated P, I, and D constants are written to C+1, C+2, and C+3. PID
control is then restarted with the new PID constants.
PIDAT
10
D200
20
0.00
S
C
D
W0.0
SETB
D209
#000F
C:D200
C+1:D201
C+2:D202
C+3:D203
C+4:D204
C+5:D205
C+6:D206
C+7:D207
C+8:D208
C+9:D209
C+10:D210
C+11:D211
C+40:D240
Set value: 300
Proportional band: 10.0%
Integral time: 120.0 s
Derivative time: 40.0 s
Sampling period: 0.5 s
PID
calculation
Parameters
PV:
CIO 10
MV output: CIO 20
Reverse operation (bit 00: 0), PID constant change enable setting = OFF
(bit 01: 0), set value = manipulated variable output 50% (bit 03: 1), 2-PID
parameter = 0.65 (bits 04 to 15: 000 hex)
AT Command Bit OFF (bit 15: 0),
AT Calculation Gain = 1.00 (bits 00 to 11: 000 hex)
CIO 0.00
PID control starts
Calculated PID
constants are set.
W0.00
Bit 15 of D209
PV
SV
Time
MV
Time
to
012C
0064
04B0
0190
0032
0000
0494
0000
0000
0000
0000
Work area
Manipulated variable output range: 12 bits (bits 00 to 03: 4 hex),
Integral/derivative constant: time designation (bits 04 to 07: 9 hex)
Input range: 12 bits (bits 08 to 11: 4 hex),
Manipulated variable output limit control disabled (bit 12: 0)
Limit-cycle Hysteresis = 0.20%
PID starting integral manipulated variable designation = start from same
integral manipulated value as manipulated variable output designation
(bit 14: 0 and bit 13: 0)
PID control PID control
AT executing