FB_BAFDigitalSignalCounterKL1512

FB_BAFDigitalSignalCounterKL1512 1:

Function-block for controlling a Up/Down counter via KL1512 Digital Signal directly out of the PLC-program.

VAR_INPUT

uiId                 : UINT;
bStartExecution      : BOOL;
bStopExecution       : BOOL;
bSetCounterDirect    : BOOL;
udiSetCounterDirect  : UDINT;

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.

VAR_OUTPUT

uiErrorId            : UINT;
iErrorParameter      : INT;
eExecutionState      : E_BAF_ExecutionState;
udiCounter           : UDINT;

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.

udiCounter: The counter value of the signal.