Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 User Manual

Product codes
6AV6651-7KA01-3AA4
Page of 364
 
PID is easy 
 
8.2 PID_Compact instruction 
Easy Book 
Manual, 03/2014, A5E02486774-AF 
173
 
8.2 
PID_Compact instruction 
The PID_Compact instruction provides a universal PID controller with integrated self-tuning 
for automatic and manual mode.  
Table 8- 3 
PID_Compact instruction 
LAD / FBD 
SCL 
Description 
 
"PID_Compact_1"( 
    Setpoint:=_real_in_, 
    Input:=_real_in_, 
    Input_PER:=_word_in_, 
    Disturbance:=_real_in_, 
 ManualEnable:=_bool_in_, 
    ManualValue:=_real_in_, 
    ErrorAck:=_bool_in_, 
 Reset:=_bool_in_, 
    ModeActivate:=_bool_in_, 
 Mode:=_int_in_, 
 ScaledInput=>_real_out_, 
    Output=>_real_out_, 
    Output_PER=>_word_out_, 
    Output_PWM=>_bool_out_, 
 SetpointLimit_H=>_bool_out_, 
 SetpointLimit_L=>_bool_out_, 
    
InputWarning_H=>_bool_out_, 
    
InputWarning_L=>_bool_out_, 
    State=>_int_out_, 
    Error=>_bool_out_, 
 ErrorBits=>_dword_out_); 
PID_Compact provides a PID controller with 
self-tuning for automatic and manual mode. 
PID_Compact is a PID T1 controller with 
anti-windup and weighting of the P- and D- 
component.  
 
1
  STEP 7 automatically creates the technology object and instance DB when you insert the instruction. The instance DB 
contains the parameters of the technology object. 
  In the SCL example, "PID_Compact_1" is the name of the instance DB. 
 
Table 8- 4 
Data types for the parameters 
Parameter and type 
Data type 
Description 
Setpoint 
IN 
Real 
Setpoint of the PID controller in automatic mode. (Default value: 0.0) 
Input 
IN 
Real 
A tag of the user program is used as the source of the process value. 
(Default value: 0.0) 
If you are using the Input parameter, you must set 
Config.InputPerOn = FALSE.  
Input_PER 
IN 
Word 
An Analog input is used as the source of the process value. (Default 
value: W#16#0) 
If you are using the Input_PER parameter, you must set 
Config.InputPerOn = TRUE.  
Disturbance 
IN 
Real 
Disturbance variable or pre-control value