Skip to main content

FB_SLI

Description Function Block

The FB_SLI function block is used to save the Position input with a rising edge at the bSLI input (latch position). As long as bSLI is set to TRUE, a check is performed to make sure that the position is located within the limits of latch position - udiLimitNeg and latch position + udiLimitPos. If this is the case, then the bSLIActive output is set to TRUE. If the position leaves the defined range, then bSLIActive is set to FALSE. The PositionDiff output gives the current difference between the position and the latch position. With the falling edge at bSLIActive, the PositionDiff output is also set to 0.

The udiLimitNeg and udiLimitPos inputs are UDINT values and are therefore always positive.

Tip

The availability of this function block depends on the FBSupportFlags of the ESI description file. These FBSupportFlags are evaluated as of CODESYS Safety for EtherCAT Safety Module 4.3.0.0. The usage of this function block is prevented if the device in question does not explicitly support this function block.

EL6900_SLI.png
Table 52. VAR_INPUT

Name

Data Type

Initial Value

Description, Parameter Values

bSLI

SAFEBOOL

FALSE

On a rising edge, the current value of the Position input is saved (latch position) and the deviation from the limit values is calculated.

Position

SAFELINT

0

Current position value

Saved with the rising edge at bSLI and compared with the saved position as long as bSLI remains set and the difference is output to PositionDiff.

Permitted data types: UINT, INT, UDINT, DINT

udiLimitPos

SAFEUDINT

0

Permitted deviation of the saved position (latch position) in the positive direction

The FB_SLI function block is not supported by the EL6900.

Only a constant value is permitted (no variable)

udiLimitNeg

SAFEUDINT

0

Permitted deviation of the saved position (latch position) in the negative direction

Must be 0 if the data type of PositionDiff is UINT or UDINT.

Only a constant value is permitted (no variable)



Table 53. VAR_OUTPUT

Name

Data Type

Initial Value

Description, Parameter Values

bSLIActive

SAFEBOOL

FALSE

Is TRUE if bSLI is set and PositionDiff is within the defined limits.

PositionDiff

SAFEINT

0

Difference position between the saved position (latch position) and the current position. If bSLIActive = FALSE, then PositionDiff is set to 0.

Permitted data types: UINT, INT, UDINT, DINT.

bError

SAFEBOOL

FALSE

TRUE: PositionDiff is less than udiLimitNeg or greater than diLimitPos.

FALSE: No error has occurred.