Skip to main content

SF_Antivalent

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_Antivalent 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 antivalent SAFEBOOL inputs (NO/NC pair) 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 19. VAR_INPUT

Name

Data Type

Initial Value

Description, parameter values

Activate

BOOL

FALSE

See General Rules for Safety-Related Function Blocks

S_ChannelNC

SAFEBOOL

FALSE

Variable

NC means Normally Closed.

Input for NC connection

FALSE: Contact NC open

TRUE: Contact NC closed

S_ChannelNO

SAFEBOOL

TRUE

Variable

NO means Normally Open.

Input for NO connection

FALSE: Contact NO open

TRUE: Contact NO 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 20. VAR_OUTPUT

Name

Data Type

Initial Value

Description, parameter values

Ready

BOOL

FALSE

General output parameters

S_AntivalentOut

SAFEBOOL

FALSE

Safety-related output

FALSE: At least one input signal is "not active" 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

DiagCode

WORD

16#0000

Diagnostic codes



Tip

"Antivalent" means that during normal operation, the two inputs are in opposite states at the same time. This is sometimes called "complementary" or "non-equivalent".

Figure 54. Function block: SF_Antivalent
Function block: SF_Antivalent


Functional description

This function block processes two antivalent SAFEBOOL inputs to a SAFEBOOL output under discrepancy time monitoring. Both inputs are interdependent. The output of the function block shows the evaluation result of both channels.

If S_AntivalentOut = TRUE and one of the safety-oriented inputs changes, then the output immediately switches to FALSE.

Discrepancy time monitoring: The discrepancy time is the maximum time span in which both inputs may have the same state (this means that either both inputs are TRUE or both are FALSE) without the FB detecting an error. Discrepancy time monitoring starts when the status of an input changes. The function block detects an error when both inputs have the same values once the discrepancy time has elapsed.

The inputs must be switched symmetrically. This means that monitoring is performed both for switching the inputs to TRUE and FALSE.

Table 21. Logic table of inputs/outputs

Inputs

Outputs

Activate

S_ChannelNC

S_ChannelNO

DiscrepancyTime

Ready

S_AntivalentOut

Error

DiagCode

FALSE

FALSE

TRUE

Not started

FALSE

FALSE

FALSE

16#0000

TRUE

FALSE

TRUE

Not started

TRUE

FALSE

FALSE

16#8001

TRUE

FALSE -> TRUE

TRUE

Started

TRUE

FALSE

FALSE

16#8004

TRUE

TRUE

TRUE -> FALSE

Started

TRUE

TRUE

FALSE

16#8000

TRUE

TRUE

FALSE

Not started

TRUE

TRUE

FALSE

16#8000

TRUE

TRUE

FALSE -> TRUE

Started

TRUE

FALSE

FALSE

16#800165

TRUE

TRUE -> FALSE

TRUE

Started

TRUE

FALSE

FALSE

16#8001

TRUE

FALSE

TRUE

Not started

TRUE

FALSE

FALSE

16#8001

TRUE

FALSE

TRUE -> FALSE

Started

TRUE

FALSE

FALSE

16#8014

TRUE

FALSE -> TRUE

FALSE

Started

TRUE

TRUE

FALSE

16#8000

TRUE

TRUE -> FALSE

FALSE

Started

TRUE

FALSE

FALSE

16#8005

TRUE

FALSE

FALSE -> TRUE

Started

TRUE

FALSE

FALSE

16#8001



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 55. Status diagram: SF_Antivalent
Status diagram: SF_Antivalent


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.

Typical timing diagrams

Figure 56. Time chart 1: SF_Antivalent.png
Time chart 1: SF_Antivalent.png


Figure 57. Time chart 2: SF_Antivalent.png
Time chart 2: SF_Antivalent.png


Error detection

The function block monitors the discrepancy time between Channel NO and Channel NC.

Error behavior

The S_AntivalentOut output is set to FALSE. Error is set to TRUE. DiagCode displays the error states. 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_AntivalentOut is present, Error is FALSE again.

FB-Specific Error and Status Codes

Table 22. FB-specific error codes

DiagCode

Statue Name

Status description and output setting

16#C001

Error 1

Discrepancy time expired in status 16#8004

Ready = TRUE

S_AntivalentOut = FALSE

Error = TRUE

16#C002

Error 2

Discrepancy time expired in status 16#8014

Ready = TRUE

S_AntivalentOut = FALSE

Error = TRUE

16#C003

Error 3

Discrepancy time expired in status 16#8005

Ready = TRUE

S_AntivalentOut = FALSE

Error = TRUE



Table 23. 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_AntivalentOut =FALSE

Error = FALSE

16#8001

Init

An activation has been detected by the block and the block is now activated.

Ready = TRUE

S_AntivalentOut = FALSE

Error = FALSE

16#8000

Safety Output Enabled

The inputs are switched to active in the antivalent mode.

Ready = TRUE

S_AntivalentOut = TRUE

Error = FALSE

16#8004

Wait for NO

ChannelNC has been switched to TRUE; wait until ChannelNO is switched to FALSE; discrepancy timer started.

Ready = TRUE

S_AntivalentOut = FALSE

Error = FALSE

16#8014

Wait for NC

ChannelNO has been switched to FALSE; wait until ChannelNC is switched to TRUE; discrepancy timer started.

Ready = TRUE

S_AntivalentOut = FALSE

Error = FALSE

16#8005

From Active Wait

One channel has been switched to inactive; wait for the second channel to be switched to inactive as well.

Ready = TRUE

S_AntivalentOut = FALSE

Error = FALSE