FUNCTION_BLOCK FACEPLATE


An instance of this function block type displays the process variable (PV) and output (OUT), and provides user input of the set point (SP), for a closed-loop controller. The values of these variables are treated as percent of full scale.

The LABEL input provides a top-centered label for the faceplate ( TANK LEVEL in this example).

The AUTO output provides for user control of the controller mode via the Auto/Manual radio buttons.

The input and output variables are defined as shown below.

See the TANK_MVCL system configuration for an example of the usage of an instance of this type.

VAR_INPUT
    LABEL : WSTRING := "   CONTROL FACEPLATE   ";
    BKGD : COLOR := COLOR#lightGray; (* Background color for bars *)
    COLORS : COLOR[3] := [yellow,blue,green]; (* SP,PV,XOUT colors *)
    W : UINT := 20; (* Indicator width *)
    H : UINT := 100; (* Indicator Height *)
    SPI : UINT := 50; (* Initial value for SP, 0-100% *)
    PV : UINT; (* Process Variable, 0-100% *)
    XOUT : UINT; (* Controller Output, 0-100% *)
END_VAR
VAR_OUTPUT
    AUTO : BOOL; (* 1=Auto,0=Manual *)
    SP : UINT; (* Set Point, 0-100% *)
END_VAR