16-5
16 Other Functions
CP2E CPU Unit Software User’s Manual(W614)
16-1 PID Temperature Control
16
16-1-3 Application Example
• The Temperature Sensor Unit’s temperature input PV is stored in CIO 2.
• The control output is the transistor output used to control the heater through the SSR using time-pro-
portional control.
• The PIDAT sampling cycle is 1 second.
• Control cycle: 20 s
• When W0.00 turns ON, autotuning is immediately executed and PID control is started with the PID
constants calculated by autotuning.
The CP1W-TS001 Temperature Sensor Unit is used with an input type of K -200 to 1300°C (set the
rotary switch to 0). The decimal values -200 to 1300°C are converted to signed hexadecimal data (FF38
to 0514 hex) and stored in CIO 2 in the Input Area.
However, the PIDAT instruction can only handle unsigned hexadecimal data as the PV. The value is
thus converted from the range FF38 to 0514 to the PIDAT instruction input range of 0000 to 1FFF hex
(0 to 8191) using the APR instruction.
Ladder Programming Example for an Input Range of -200 to 1300°C for a K
Thermocouple
PIDAT
S
D600
C
D100
D
D200
TPO
S
D200
C
D300
D
100.00
RSET
100.00
W1.00
W1.00
W0.00
C:D100 &1966
C+1:D101 &1
C+2:D102 &1
C+3:D103 &1
C+4:D104 &100
C+5:D105 #0002
C+6:D106 #0595
C+7:D107 #0000
C+8:D108
C+9:D109
C+10:D110 #0005
C+11:D111
C+40:D140
C:D300 #0315
C+1:D301 &2000
C+2:D302 &0
C+3:D303 &0
C+4:D304
C+6:D306
APR
S
2
C
D500
D
D600
C:D500 #0800
C+1:D501 -200
C+2:D502 #0000
C+3:D503 +1300
C+4:D504 #1FFF
#0000
#8000
Pulse output
Work Area
Work Area
PV
Scale PV to
within #0000 to
#1FFF hex
MV
MV
Specify 16-bit signed data (bit 11: ON, bit 10: OFF)/Number
of coordinates in data table: 1 (bits 0 to 7: #00 hex)
Minimum manipulated variable input: -200 decimal
(#FF38 hex)
Minimum value in PID input range: #0000 hex
Maximum manipulated variable input: 1300 decimal
(#0514 hex)
Maximum value in PID input range: #1FFF hex
Set value: 160ËšC (set as calculated value: 1966)
Proportional band: 0.1%
Integral time: 0.1 s
Derivative time: 0.1 s
Sampling period: 1 s
Reverse operation (bit 00: OFF)/PID constants updated each
time a sample is taken while the input condition is ON (bit 01:
ON)/2-PID parameter α = 0.65 (bits 04 to 15: #000 hex)
Input/Output: 13 bits (bits 00 to 03, 08 to 11: #5 hex)/Integral
and derivative constants: Time designation (bits 04 to 07: #9
hex)/Manipulated variable limit control: No (bit 12: OFF)
AT execution (bit 15: ON)/AT Calculation Gain = 1.00
(bits 0 to 11: #000 hex)
Limit-cycle Hysteresis = 0.05% (approximately 0.8ËšC)
When autotuning is completed, the content of D109 is automatically overwritten
by #0000 hex and the calculated PID constants are input to D101 to 103.
Manipulated variable range: 13 bits (bits 0 to 3: #5 hex)/
Input type: Manipulated variable (bits 4 to 7: #1 hex),
always read input (bits 8 to 11: #3 hex)/Output limit
disabled (bits 12 to 15: #0 hex)
Control cycle: 20.00 s
No upper output limit
No lower output limit
~
~