FB_BAFDigitalSignalStandard

FB_BAFDigitalSignalStandard 1:

Function-block for controlling a Standard Digital Signal directly out of the PLC-program.

VAR_INPUT

uiId                     : UINT;
bStartExecution          : BOOL;
bStopExecution           : BOOL;
bSetCounterDirect        : BOOL;
udiSetCounterDirect      : UDINT;
bChangeOnDelay           : BOOL;
tChangeOnDelay           : TIME;
bChangeOffDelay          : BOOL;
tChangeOffDelay          : TIME;

uiId: Object id of the instance (see object id).

bStartExecution: Starts the instance of the digital signal.

bStopExecution: Stops the instance of the digital signal.

bSetCounterDirect: Sets the counter to the value of the input udiSetCounterDirect.

udiSetCounterDirect: See bSetCounterDirect.

bChangeOnDelay: Sets the time delay-on to the value of the input tChangeOnDelay.

tChangeOnDelay: See bChangeOnDelay.

bChangeOffDelay: Sets the time delay-off to the value of the input tChangeOffDelay.

tChangeOffDelay: See bChangeOffDelay.

VAR_OUTPUT

uiErrorId                : UINT;
iErrorParameter          : INT;
eExecutionState          : E_BAF_ExecutionState;
bRawValue                : BOOL;
bValue                   : BOOL;
udiCounter               : UDINT;
bRisingEdge              : BOOL;
bFallingEdge             : BOOL;
bEdgeChanged             : BOOL;
bClick                   : BOOL;
bLongClick               : BOOL;
bDoubleClick             : BOOL;

uiErrorId: Contains the error code of the last executed command (see Error codes).

iErrorParameter: Contains the specific parameter of the error code (see Error codes).

eExecutionState: Contains the actual execution state of the instance of the digital signal.

bRawValue: The raw value of the signal.

bValue: The output-state of the signal.

udiCounter: The counter value of the signal.

bRisingEdge: If the output bValue becomes true, this output is for one PLC cycle true.

bFallingEdge: If the output bValue becomes false, this output is for one PLC cycle true.

bEdgeChanged: If the output bValue changes, this output is for one PLC cycle true.

bClick: If a click (not a double click and not a long click) is detected, this output is for one PLC cycle true.

bLongClick: If a long click is detected, this output is for one PLC cycle true.

bDoubleClick: If a double click is detected, this output is for one PLC cycle true.