FP_PID_BASIC

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).

Parameters

Input/output

s_PidDut (PID_DUT_31)

Detailed explanation of parameters, please refer to PID_DUT_31

Remarks

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.

Error flags

sys_bIsOperationErrorHold (turns to TRUE and remains TRUE)

if the parameter settings are outside the permissible range

sys_bIsOperationErrorNonHold (turns to TRUE for one scan)

if the parameter settings are outside the permissible range

Example

POU header

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

LD body

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

ST body

IF (Automatic) then
    FP_PID_BASIC(s_PidDut := s_PidDut);
END_IF;

Modified on: 2022-05-13Feedback on this pagePanasonic hotline