FB_BAFAnalogSignalStandard

FB_BAFAnalogSignalStandard 1:

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

VAR_INPUT

uiId                 : UINT;
bStartExecution      : BOOL;
bStopExecution       : BOOL;

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

bStartExecution: Starts the instance of the analog signal.

bStopExecution: Stops the instance of the analog signal.

VAR_OUTPUT

uiErrorId                    : UINT;
iErrorParameter              : INT;
eExecutionState              : E_BAF_ExecutionState;
iAnalogRawValue              : INT;
lrAnalogScaledValue          : LREAL;
bThresholdSwitch1Value       : BOOL;
bThresholdSwitch1RisingEdge  : BOOL;
bThresholdSwitch1FallingEdge : BOOL;
bThresholdSwitch2Value       : BOOL;
bThresholdSwitch2RisingEdge  : BOOL;
bThresholdSwitch2FallingEdge : BOOL;
bReplacementValueUsed        : 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 analog signal.

iAnalogRawValue : The raw-value of the analog signal.

lrAnalogScaledValue: The scaled value of the analog signal.

bThresholdSwitch1Value: The current value of the threshold switch 1.

bThresholdSwitch1RisingEdge: If the threshold switch 1 becomes true, this output is for one PLC cycle true.

bThresholdSwitch1FallingEdge: If the threshold switch 1 becomes false, this output is for one PLC cycle true.

bThresholdSwitch2Value: The current value of the threshold switch 2.

bThresholdSwitch2RisingEdge: If the threshold switch 2 becomes true, this output is for one PLC cycle true.

bThresholdSwitch2FallingEdge: If the threshold switch 2 becomes false, this output is for one PLC cycle true.

bReplacementValueUsed: Indicates if the replacement value is used.