FUNCTION_BLOCK MECHC_VIEW

An instance of this function block type encapsulates the View element for displaying the position of a workpiece along a single axis of motion, including a clamp for holding the workpiece in position. Alternatively, depending on the value of the CNV input, the workpiece may be depicted as moving along a conveyor with a gate or stopper at the end, whose position is given by the CLAMP input.

The type of workpiece displayed is determined by the value of the STYLE input. See the documentation of the VSTYLE data type for descriptions of the possible display styles.

The default value of the DIA input may be overridden when an instance of this function block type is used in an instance of the VIEW_PANEL resource type.

The semantics of the inputs and outputs of this FB type are as defined below.

EVENT_INPUT
    INIT WITH BKGD,LEN,DIA,DIR,CNV,STYLE,WKPC; (* Initialize *)
    REQ WITH POS,CLAMP,STYLE,WKPC; (* Update the display *)
END_EVENT
EVENT_OUTPUT
    INITO; (* Initialized *)
    CNF; (* Display Updated *)
    IND WITH FAULT; (* Change in FAULT status *)
END_EVENT
VAR_INPUT
    POS : UINT; (* Mechanism displacement,% *)
    STYLE : VSTYLE := RING; (* View style *)
    WKPC : COLOR := blue; (* Foreground Color *)
    CLAMP : UINT; (* Clamp or gate position,% *)
    CNV : BOOL; (* 0=Paint workpiece with clamp,1=Paint as conveyor with gate at end. *)
    BKGD : COLOR := blue; (* Background Color *)
    LEN : UINT; (* Length in Diameters *)
    DIA : UINT; (* Diameter *)
    DIR : VDIR; (* Orientation *)
END_VAR
VAR_OUTPUT
    FAULT : BOOL; (* 0=Normal,1=Fault *)
END_VAR