21: PID INSTRUCTION
21-14 « FC4A MICROSMART USER’S MANUAL »
Application Example
This application example demonstrates a PID control for a heater to keep the temperature at 200°C.
In this example, when the program is started, the PID instruction first executes auto tuning according to the designated AT
parameters, such as AT sampling period, AT control period, AT set point, and AT output manipulated variable, and also the
temperature data inputted to the analog input module. The control output remains on to keep the heater on until the tem-
perature reaches the AT set point of 150°C. Auto tuning determines PID parameters such as proportional gain, integral
time, derivative time, and control action.
When the temperature reaches 150°C, PID action starts to control the temperature to 200°C using the derived PID param-
eters. The heater is turned on and off according to the output manipulated variable calculated by the PID action. When the
heater temperature is higher than or equal to 250°C, an alarm light is turned on by the high alarm output.
The analog input module data is also monitored to force off the heater power switch and force on the high alarm light.
Operand Settings
Note 1: The output manipulated variable during auto tuning is a constant value. In this example, the AT output manipulated
variable is set to the maximum value of 100 (100%), so the control output (S2+6) remains on during auto tuning.
Note 2: When analog I/O module FC4A-L03AP1 is used for the PID instruction, select the binary data to make sure that the
process variable takes a value of 0 through 4095.
Operand Function Description Allocation No. (Value)
S1+3 Operation mode AT (auto tuning) + PID action D3 (1)
S1+4 Linear conversion Enable linear conversion D4 (1)
S1+5 Linear conversion maximum value 1300°C D5 (13000)
S1+6 Linear conversion minimum value 0°C D6 (0)
S1+10 Integral start coefficient 100% D10 (0)
S1+11 Input filter coefficient 70% D11 (70)
S1+12 Sampling period 500 ms D12 (50)
S1+13 Control period 1 sec D13 (10)
S1+14 High alarm value 250°C D14 (2500)
S1+15 Low alarm value 0°C D15 (0)
S1+19 AT sampling period 1.5 sec D19 (150)
S1+20 AT control period 3 sec D20 (30)
S1+21 AT set point 150°C D21 (1500)
S1+22 AT output manipulated variable 100% (Note 1) D22 (100)
S2+1 Auto/manual mode Auto mode M1 (OFF)
S2+2
Output manipulated variable limit
enable
Disable output manipulated variable limits M2 (OFF)
S2+3 Integral start coefficient disable Enable integral start coefficient (S1+10) M3 (OFF)
S2+4 High alarm output
ON: When temperature ≥ 250°C
OFF: When temperature < 250°C
M4
S2+6 Control output
Remains on during auto tuning;
Goes on and off according to the control
period (S1+13) and output manipulated vari-
able (S1+1) during PID action
M6
S3 Set point 200°C D100 (2000)
S4 Process variable
Analog input data of analog I/O module 1, ana-
log input channel 0; stores 0 through 4095
D760
Analog input operating status Stores 0 through 5 D761
Analog input signal type Type K thermometer D762 (2)
Analog input data type 12-bit data (0 to 4095) (Note 2) D763 (0)
D1 Manipulated variable Stores PID calculation result D102
PID start input Starts to execute the PID instruction I0
Monitor input
Starts to monitor the analog input module
data for high alarm and operating status
I1
Heater power switch Turned on and off by control output M6 Q0
High alarm light Turned on and off by high alarm output M4 Q1