Skip to main content

FB_ENVELOPE

Description Function Block

The FB_ENVELOPE is used to create an envelope curve from the value of InValue plus uiOffset and to check whether or not InValue violates this envelope curve each time the function block is called. If InValue reaches the range from - udiTargetValue to + udiTargetValue, then the time tTimeAfterInTarget starts to run. If InValue leaves this range and the time has not yet elapsed yet, then this time is reset. The time may start again when InValue reaches the range again. If InValue remains within the range, then the bSafeFunctionOut output is set to FALSE after the time tTimeAfterInTarget has elapsed. The bSafeFunctionOut output is set to FALSE at the latest after tMaxTime has expired.

This function block can normally be used, for example, for an SS1 or SS2 safety function.

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_ENVELOPE.png
Table 42. VAR_INPUT

Name

Data Type

Initial Value

Description, Parameter Values

bSafeFunction

SAFEBOOL

FALSE

For a falling edge, an envelope curve is created from the value of InValue plus uiOffset. At each call cycle of the function block, a check is performed to find out if InValue violates this envelope.

InValue

SAFELINT

0

Analog value which should be monitored when a delay or change occurs in the towards 0 within an envelope curve.

Permitted data types: UINT, INT, UDINT, DINT

udiTargetValue

SAVEUDINT

0

Time frame of InValue symmetric by 0 (- udiTargetValue <= InValue <= udiTargetValue)

Only a constant value is permitted (no variable)

uiOffset

SAFEUINT

0

Value which is added to the value of InValue and then forms the starting point of the envelope curve as a positive and negative value.

Only a constant value is permitted (no variable)

tTimeAfterInTarget

SAFETIME

TIME#0ms

Time after which the bSafeFunctionOut output is set to FALSE when InValue is located within the range - udiTargetValue and + udiTargetValue.

The time starts to run when InValue reaches the range between -udiTargetValue and + udiTargetValue. The time is reset when InValue leaves the range and tTimeAfterInTarget has not elapsed yet. The time is restarted when InValue reaches the range again.

Only a constant value is permitted (no variable)

tMaxTime

SAFETIME

TIME#0ms

Maximum time (in ms) after which the bSafeFunctionOut output is set to FALSE.

Only a constant value is permitted (no variable)



Table 43. VAR_OUTPUT

Name

Data Type

Initial Value

Description, Parameter Values

bSafeFunctionOut

SAFEBOOL

FALSE

Output with the safety function (delayed by time and monitored by envelope curve)

Set to FALSE when InValue remains within the envelope curve until tTimeAfterInTarget has elapsed or until tMaxTime has elapsed.

bError

SAFEBOOL

FALSE

TRUE: InValue incorrect (for example, above or below the envelope curve) or tMaxTime has elapsed

FALSE: No error has occurred.