Skip to main content

SF_Equivalent

Tip

The version of the function block as described here corresponds to the latest version of the function block in Version list of function blocks.

Applicable safety standards

SF_Equivalent is a certified PLCopen function block. For detailed information about applied standards, see "PLCopen – Technical Committee 5 – Safety Software".

Important

The requirements listed in the standards must be fulfilled by the user.

Interface description

This function block links two equivalent SAFEBOOL inputs (both NO or NC) to a SAFEBOOL output under discrepancy time monitoring. This FB should not be used stand-alone since it has no restart interlock. It is required to connect the output to other safety related functionalities.

Table 14. VAR_INPUT

Name

Data Type

Initial Value

Description, parameter values

Activate

BOOL

FALSE

General input parameters

S_ChannelA

SAFEBOOL

FALSE

Variable

Input A for logical connection

FALSE: Contact A open

TRUE: Contact A closed

S_ChannelB

SAFEBOOL

FALSE

Variable

Input B for logical connection

FALSE: Contact B open

TRUE: Contact B closed

DiscrepancyTime

TIME

T#0ms

Constant

Maximum monitoring time for discrepancy state of both inputs

The DiscrepancyTime caution note must be observed.



DiscrepancyTime

For developers in Extended Level: The DiscrepancyTime input has to be set to a constant value. This means that the value must not be changed for the calls.

Table 15. VAR_OUTPUT

Name

Data Type

Initial Value

Description, parameter values

Ready

BOOL

FALSE

General output parameters

S_EquivalentOut

SAFEBOOL

FALSE

Safety-related output

FALSE: At least one input signal = "FALSE" or status change outside of the watchdog time.

TRUE: Both input signals are "active" and status change within watchdog time

Error

BOOL

FALSE

General output parameters



Figure 51. Function block: SF_Equivalent
Function block: SF_Equivalent


Functional description

This function block links two equivalent SAFEBOOL inputs (both NO or NC) to a SAFEBOOL output under discrepancy time monitoring. The two A and B channels are interdependent. The output of the function block shows the evaluation result of both channels.

If the channel signal changes from TRUE to FALSE, the output immediately switches off (FALSE) for safety reasons.

Discrepancy time monitoring: The discrepancy time is the maximum period during which both inputs may have different states without the function block detecting an error. Discrepancy time monitoring starts when the status of an input changes. The function block detects an error when both inputs have different states once the discrepancy time has elapsed.

Both inputs must be switched symmetrically. This means that monitoring is performed for both inputs for switching from TRUE to FALSE as well as for switching from FALSE to TRUE.

Table 16. Logic table of inputs/outputs

Inputs

Outputs

Activate

S_ChannelNCS

S_ChannelNO

DiscrepancyTime

Ready

S_EquivalentOut

Error

DiagCode

FALSE

FALSE

TRUE

Not started

FALSE

FALSE

FALSE

0000

TRUE

FALSE

FALSE

Not started

TRUE

FALSE

FALSE

8001

TRUE

TRUE

FALSE

Started

TRUE

FALSE

FALSE

8004

TRUE

TRUE

FALSE -> TRUE

Started

TRUE

TRUE

FALSE

8000

TRUE

TRUE

TRUE

Not started

TRUE

TRUE

FALSE

8000

TRUE

TRUE

TRUE -> FALSE

Started

TRUE

FALSE

FALSE

8005

TRUE

TRUE -> FALSE

FALSE

Started

TRUE

FALSE

FALSE

8001

TRUE

FALSE

FALSE -> TRUE

Started

TRUE

FALSE

FALSE

8014

TRUE

FALSE -> TRUE

TRUE

Started

TRUE

TRUE

FALSE

8000



Tip

In the logic table, an arrow (->) stands for a transition. TRUE -> FALSE means that the value of the variable has changed from TRUE to FALSE.

Status diagram

Figure 52. Status diagram: SF_Equivalent
Status diagram: SF_Equivalent


Tip

Note: The transition from any state to the Idle state, initiated by Activate = FALSE, is not shown. In every case, these transitions have the highest priority.

Figure 53. Timing diagram 1: SF_Equivalent
Timing diagram 1: SF_Equivalent


Error detection

The function block monitors the discrepancy time between channel Channel A and channel Channel B, when switching to TRUE as well as switching to FALSE.

Error behavior

S_EquivalentOut is set to FALSE. Error is set to TRUE. DiagCode displays the error status. There is no Reset defined as an input coupled with the reset of an error. As soon as a Set of input values with the correct S_EquivalentOut is present, Error is FALSE again.

FB-Specific Error and Status Codes

Table 17. FB-specific error codes

DiagCode

Statue Name

Status description and output setting

16#C001

Error 1

Discrepancy time expired in status 8004

Ready = TRUE

S_EquivalentOut = FALSE

Error = TRUE

16#C002

Error 2

Discrepancy time expired in status 8014

Ready = TRUE

S_EquivalentOut = FALSE

Error = TRUE

16#C003

Error 3

Discrepancy time expired in status 8005

Ready = TRUE

S_EquivalentOut = FALSE

Error = TRUE



Table 18. FB-specific status codes

DiagCode

Statue Name

Status description and output setting

16#0000

Idle

The function block is not active (basic state).

Ready = FALSE

S_EquivalentOut =FALSE

Error = FALSE

16#8001

Init

The block has been activated.

Ready = TRUE

S_EquivalentOut = FALSE

Error = FALSE

16#8000

Safety Output Enabled

The inputs are switched to TRUE in the equivalent mode

Ready = TRUE

S_EquivalentOut = TRUE

Error = FALSE

16#8004

Wait for Channel B

Channel A has been switched to TRUE; wait for channel B; discrepancy timer started.

Ready = TRUE

S_EquivalentOut = FALSE

Error = FALSE

16#8014

Wait for Channel A

Channel B has been switched to TRUE; wait for channel A; discrepancy timer started.

Ready = TRUE

S_EquivalentOut = FALSE

Error = FALSE

16#8005

From Active Wait

One channel has been switched to FALSE; wait for the other channel to be switched to FALSE, discrepancy timer started.

Ready = TRUE

S_EquivalentOut = FALSE

Error = FALSE