VAR_INPUT
//input variables
CBO : BOOL := false; //component binary output to plc
Diagnosis : BOOL := false; //activates diagnosis mode
DiagValue : BOOL := false; //value for diagnosis
Negate : BOOL := false; //negates the input
Lock : BOOL := false; //output is locked
SafePosition : BOOL := false; //safe position when locked
END_VAR
VAR_OUTPUT
//output variables
BO : BOOL := false;
[B] State : BYTE := 0; //Status to Visu
StateBits AT State : STRUCT
Diagnosis : BOOL;
DiagValue : BOOL;
Negate : BOOL;
res4 : BOOL;
res5 : BOOL;
res6 : BOOL;
res7 : BOOL;
res8 : BOOL;
END_STRUCT; [/B]
LockState : BOOL := false; //lock active
END_VAR