102BTechnology instructions
9.2 PID control
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
329
Parameter and type
Data type
Description
Input_PER
IN
Word
Analog process value (optional). Default value: W#16#0
You must also set sPid_Cmpt.b_Input_PER_On = TRUE.
ManualEnable
IN
Bool
Enables or disables the manual operation mode. Default value: FALSE
On the edge of the change from FALSE to TRUE, the PID controller
switches to manual mode, State = 4, and sRet.i_Mode remains
unchanged.
On the edge of the change from TRUE to FALSE, the PID controller
switches to the last active operating mode and State = sRet.i_Mode.
ManualValue
IN
Real
Process value for manual operation. Default value: 0.0
Reset
IN
Bool
Restarts the controller. Default value: FALSE
If Reset = TRUE, the following applies:
Inactive operating mode
Input value = 0
Integral part of the process value = 0
Intermediate values of the system are reset (PIDParameter is
retained)
ScaledInput
OUT
Real
Scaled process value. Default value: 0.0
Output
1
OUT
Real
Output value. Default value: 0.0
Output_PER
1
OUT
Word
Analog output value. Default value: W#16#0
Output_PWM
1
OUT
Bool
Output value for pulse width modulation. Default value: FALSE
SetpointLimit_H
OUT
Bool
Setpoint high limit. Default value: FALSE
If SetpointLimit_H = TRUE, the absolute upper limit of the setpoint is
reached. Default value: FALSE
SetpointLimit_L
OUT
Bool
Setpoint low limit. Default value: FALSE
If SetpointLimit_L = TRUE, the absolute lower limit of the setpoint is
reached. Default value: FALSE
InputWarning_H
OUT
Bool
If InputWarning_H = TRUE, the process value reached or exceeded the
upper warning limit. Default value: FALSE
InputWarning_L
OUT
Bool
If InputWarning_L = TRUE, the process value reached the lower
warning limit. Default value: FALSE
State
OUT
Int
Current operating mode of the PID controller. Default value: 0
Use sRet.i_Mode to change the mode.
State = 0: Inactive
State = 1: Pretuning
State = 2: Manual fine tuning
State = 3: Automatic mode
State = 4: Manual mode
Error
OUT
DWord
Error message Default value: DW#16#0000 (no error)
1
The outputs of the Output, Output_PER, and Output_PWM parameters can be used in parallel.