SAFETY_MONITOR: Safety DFB
(Original Document)
Description of the Function
The SAFETY_MONITOR DFB allows data processed by the security monitor to be obtained. Its implementation is identical to that of a DIAG AS-i DFB: it can be programmed in any program module (Main, SR or section) in the Ladder (LD), Structured Text (ST) and Instruction List (IL) languages.
The SAFETY_MONITOR DFB is:
Additional parameters EN and ENO can be configured.
NOTE: This diagnostic DFB cannot be used in a user DFB.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL SAFETY_MONITOR_1 (IO := I0_Input , I1 := I1_Input, I2 := I2_Input, I3 := I3_Input, Enable := Enable_Output, Q0 :=Q0_Output,  Q1 :=Q1_Output, Q2 :=Q2_Output, Q3 :=Q3_Output, Error => Error_Output, Running => Running_Output)
Representation in ST
Representation:
CAL SAFETY_MONITOR_1 (IO := I0_Input , I1 := I1_Input, I2 := I2_Input, I3 := I3_Input, Enable := Enable_Output, Q0 :=Q0_Output,  Q1 :=Q1_Output, Q2 :=Q2_Output, Q3 :=Q3_Output, Error => Error_Output, Running => Running_Output)
Description of parameters
The following table describes the input parameters:
Parameter
Type
Description
I0
Input variable 0.
I1
EBOOL
Input variable 1.
I2
EBOOL
Input variable 2.
I3
EBOOL
Input variable 3.
The following table describes the input/output parameters:
Parameter
Type
Description
Enable
Activation of the DFB (Cold Start): if this bit is at "1", the DFB executes, otherwise it is deactivated. The information is only usable if Enable = 0.
Q0
EBOOL
Output variable 0.
Q1
EBOOL
Output variable 1.
Q2
EBOOL
Output variable 2.
Q3
EBOOL
Output variable 3.
The following table describes the output parameters:
Parameter
Type
Description
Error
This bit is set at "1" if a detected error appears: DFB error or security bus error (at least one slave is inoperative):
  • if it is a DFB error (enable = 0): see Dfb_error (≠ 0) for more information. In the case of a DFB error, the information on the security project is no longer valid.
  • it is a case of a security project error (Dfb_error = 0 and Enable = 1): see S1_ to find out the faulty slaves.
Running
EBOOL
This bit is set at "1" during execution of the DFB.
The following table describes the internal public variables:
Name
Type
Description
Abort
If this bit is at "0" in one cycle and at "1" in the next, all the changes between CPU and the security monitor are stopped and the DFB reinitializes.
All the internal data of the DFB are set at 0.
Timeout
Timeout of the data exchanges (time base of 100 ms).
If the DFB does not receive a correction before this period, the transaction is cancelled, the DFB is deactivated and the error bit is set at "1" (Dfb_stat and Dfb_err are updated).
Moni_err
EBOOL
This bit is at "1" if the monitor is faulty.
Out_1
EBOOL
This bit is at "1" if the OUT1 contact is closed.
Out_2
EBOOL
This bit is at "1" if the OUT2 contact is closed.
SI_ready
DINT
Each bit corresponds to the index of the security device which is in test or read status.
SI_off
DINT
Each bit corresponds to the index of the security device that is deactivated.
SI_error
DINT
Each bit corresponds to the index of the security device that is faulty.
Dfb_stat
INT
This is the state of the DFB; this variable allows the user to check the progress of the DFB.
Dfb_err
INT
This word gives the error type:
This word gives the detected error type:
  • 16#90; the reply sent by the monitor is invalid,
  • 16#91: the DFB has been deleted by the user,
  • 16#92: the exchange has stopped on a Timeout, the DFB cannot receive data.