PID processing
This FP instruction regulates a process (e.g. a heater) given a measured value (e.g. temperature) and a predetermined output value (e.g. 20°C).
Input/output
Detailed explanation of parameters, please refer to PID_DUT_31
The function calculates a PID algorithm whose parameters are determined in a data table in the form of an ARRAY with 30 elements that is entered at input s_PidDut.
if the parameter settings are outside the permissible range
if the parameter settings are outside the permissible range
All input and output variables used for programming this function have been declared in the POU header. The same POU header is used for all programming languages.
VAR
Automatic: BOOL:=TRUE;
PidDut: PID_DUT_31;
END_VAR
BODY
WORKSPACE
NETWORK_LIST_TYPE := NWTYPELD ;
ACTIVE_NETWORK := 0 ;
END_WORKSPACE
NET_WORK
NETWORK_TYPE := NWTYPELD ;
NETWORK_LABEL := ;
NETWORK_TITLE := ;
NETWORK_HEIGHT := 4 ;
NETWORK_BODY
B(B_VARIN,,Automatic,14,1,16,3,);
B(B_VARIN,,PidDut,14,2,16,4,);
B(B_F,FP_PID_BASIC!,,16,0,25,4,,?DEN?Ds_PidDut?As_PidDut?AENO);
L(1,0,1,4);
END_NETWORK_BODY
END_NET_WORK
END_BODY
IF (Automatic) then
FP_PID_BASIC(s_PidDut := s_PidDut);
END_IF;