SF_Equivalent block
Function block
This function block supports a monitoring function with regard to the equivalence of 2 safe signal inputs.
Interface
I/O |
Name |
Data type |
Initial value |
Description |
IN |
Activate |
BOOL |
FALSE |
|
IN |
S_ChannelA |
SAFEBOOL |
SAFEFALSE |
Variable. Input A for logic operation. SAFEFALSE: Contact A open SAFETRUE: Contact A closed |
IN |
S_ChannelB |
SAFEBOOL |
SAFEFALSE |
Variable. Input B for logic operation. SAFEFALSE: Contact B open SAFETRUE: Contact B closed |
IN |
DiscrepancyTime |
TIME |
#0ms |
Constant. Maximum monitoring time for discrepancy state of both inputs. |
OUT |
Ready |
BOOL |
FALSE |
|
OUT |
S_EquivalentOut |
SAFEBOOL |
SAFEFALSE |
Safety-related output SAFEFALSE: At least one input signal = FALSE or state change 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
This function block compares 2 safe signal inputs of a sensor connected over 2 channels for equivalent 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 ends. An error message is reported if the discrepancy time is exceeded.
The two signal inputs are interdependent. Therefore, both signal inputs should be wired either with normally closed contacts or with normally open contacts.
The result of the comparison is indicated on function block enable output S_EquivalentOut. If signal input A changes from SAFETRUE to SAFEFALSE and/or signal input B changes from SAFETRUE to SAFEFALSE, then enable output S_EquivalentOut is immediately set to SAFEFALSE.
Discrepancy time monitoring
During the discrepancy time, both signal inputs are permitted to have different states. 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 then detects an error if both signal inputs have different states 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) Start
2) Normal operation
1) Discrepancy time expiring
2) Normal operation
Error detection
The function block monitors the discrepancy time between channel A and B both when switching to TRUE and when switching to FALSE.
Error behavior
S_EquivalentOut is set to FALSE. Error is set to TRUE. DiagCode displays the error conditions. Reset is not defined as an input coupled with resetting an error. If an error occurs in the inputs, a new set of inputs with correct S_EquivalentOut must result in resetting 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 |
Discrepancy time in state 8802 has expired. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
C020 |
Error 2 |
Discrepancy time in state 8804 has expired. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
C030 |
Error 3 |
Discrepancy time in state 8806 has expired. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = FALSE Error = TRUE |
Function block-specific status codes (no error)
DiagCode |
Name |
Description and output settings |
0000 |
Idle |
Function block is not active (initial state). Ready = FALSE S_EquivalentOut = SAFEFALSE SafetyDemand = FALSE Error = FALSE |
8801 |
Init |
The function block detected an activation and is now enabled. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8000 |
Safety output enabled |
The inputs switch to TRUE in equivalence mode. Ready = TRUE S_EquivalentOut = SAFETRUE SafetyDemand = FALSE Error = FALSE |
8802 |
Wait for Channel B |
Channel A was switched to TRUE - Waiting for channel B; discrepancy timer started. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8804 |
Wait for Channel A |
Channel B was switched to TRUE - Waiting for channel A; discrepancy timer started. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |
8806 |
From active wait |
One channel was switched to FALSE - Wait until the second channel is switched to FALSE; discrepancy timer started. Ready = TRUE S_EquivalentOut = SAFEFALSE SafetyDemand = TRUE Error = FALSE |