SF_Antivalent block
Function block
This function block supports a monitoring function with regard to the antivalence of 2 safe signal inputs.
The function block compares 2 safe signal inputs of a sensor connected over 2 channels for antivalent signal states. Discrepancy time monitoring starts after the state of one of the signal inputs has changed (input parameter DiscrepancyTime).
During this time, the function block monitors whether a switching operation has taken place on the other signal input (switching function) and whether both signal inputs are switching symmetrically (switching symmetry).
If the signal switches for both signal inputs within the discrepancy time, then discrepancy time monitoring is ended. An error message is reported if the discrepancy time is exceeded.
The two signal inputs are interdependent. Therefore, either the signal input NC should be wired with a normally closed contact and the signal input NO with a normally open contact or vice versa.
The result of the comparison is indicated in function block enable output S_AntivalentOut. If signal input NC changes from SAFETRUE to SAFEFALSE and/or signal input NO changes from SAFEFALSE to SAFETRUE, then the enable output is immediately set to SAFEFALSE.
Interface
I/O |
Name |
Data type |
Initial value |
Description |
IN |
Activate |
BOOL |
FALSE |
|
IN |
S_ChannelNC |
SAFEBOOL |
SAFEFALSE |
Variable. NC stands for Normally Closed. Input for NC connection. SAFEFALSE: NC contact open. SAFETRUE: NC contact closed. |
IN |
S_ChannelNO |
SAFEBOOL |
SAFEFALSE |
Variable. NO stands for Normally Open. Input for normally open contact connection. SAFEFALSE: NO contact open SAFETRUE: NO contact closed |
IN |
DiscrepancyTime |
TIME |
#0ms |
Constant. |
OUT |
Ready |
BOOL |
FALSE |
|
OUT |
S_AntivalentOut |
SAFEBOOL |
SAFEFALSE |
Safety-related output SAFEFALSE: At least one input signal "not active" or a change in state outside the monitoring time. SAFETRUE: Both inputs indicate "active" and a state change within the monitoring time. |
OUT |
SafetyDemand |
BOOL |
FALSE |
|
OUT |
Error |
BOOL |
FALSE |
|
OUT |
DiagCode |
WORD |
16#0000 |
Function description
Function block SF_Antivalent supports a monitoring function with regard to the antivalence of 2 safe signal inputs.
This function block compares 2 safe signal inputs of a sensor connected over 2 channels for antivalent signal states. Discrepancy time monitoring starts after the state of one of the signal inputs has changed (input parameter DiscrepancyTime).
During this time, the function block monitors whether a switching operation has taken place on the other signal input (switching function) and whether both signal inputs are switching symmetrically (switching symmetry).
If the signal switches for both signal inputs within the discrepancy time, then discrepancy time monitoring is ended. An error message is reported if the discrepancy time is exceeded.
The two signal inputs are interdependent. Therefore, either the signal input NC should be wired with a normally closed contact and the signal input NO with a normally open contact or vice versa.
The result of the comparison is indicated in function block enable output S_AntivalentOut. If signal input NC changes from SAFETRUE to SAFEFALSE and/or signal input NO changes from SAFEFALSE to SAFETRUE, then the enable output is immediately set to SAFEFALSE.
Discrepancy time monitoring
During the discrepancy time, both signal inputs are permitted to have the same state. The function block does not detect this as an error.
Discrepancy time monitoring begins when the state of one of the signal inputs changes. The function block detects an error if both signal inputs have the same state after the discrepancy time elapses.
Switching states
Switching from SAFEFALSE to SAFETRUE as well as switching from SAFETRUEto SAFEFALSE is monitored for both signal inputs. For this reason, the signal inputs must be switched symmetrically.
Additional information
Typical timing diagrams
1) Startup sequence
2) Normal operation
1) Discrepancy time expiring
2) Normal operation
Error detection
The function block monitors the discrepancy time between channel NO and channel NC.
Error behavior
Output S_AntivalentOut is set to SAFEFALSE. An error is set to SAFETRUE. DiagCode displays the error conditions.
No reset is defined as an input coupled with resetting an error. If an error occurs in the inputs, a new set of inputs with the correct value must reset the error flag (example: If a switch is defective and replaced, using the switch again will result in a correct output).
Error and status messages
Function block specific error codes
DiagCode |
Name |
Description and output settings |
C010 |
Error 1 |
The discrepancy time has expired in state 8802. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
C020 |
Error 2 |
The discrepancy time has expired in state 8804. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
C030 |
Error 3 |
The discrepancy time has expired in state 8806. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
Function block specific codes (no error)
DiagCode |
Name |
Description and output settings |
0000 |
Idle |
The function block is not active (initial state). Ready = FALSE S_AntivalentOut = SAFEFALSE SafetyDemand = FALSE Error = FALSE |
8801 |
Init |
The function block detected an activation and is now enabled. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8000 |
Safety output enabled |
The inputs switch to the active state in the antivalent mode. Ready = TRUE S_AntivalentOut = SAFETRUE SafetyDemand = FALSE Error = FALSE |
8802 |
Wait for NO |
S_ChannelNC was switched to SAFETRUE - Wait until S_ChannelNO is switched to SAFEFALSE; discrepancy timer started. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8804 |
Wait for NC |
S_ChannelNO was switched to SAFEFALSE - Wait until S_ChannelNC is switched to SAFETRUE; discrepancy timer started. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8806 |
From active wait |
One channel has been switched to inactive; wait until the second channel is also switched to inactive. Ready = TRUE S_AntivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |