Description
(Original Document)
Function description
The SAFETY_MONITOR_V2 DFB allows data processed by the safety monitor to be obtained. It cannot be used to control the AS-i bus or its blocks.
The DFB can manage up to 48 devices and supports either sorting according to OSSDs or the display of all devices.
It can be programmed in any program module (Main, SR or section).
It is dedicated to a single safety monitor.
Additional parameters EN and ENO can be configured.
Rules
For reasons of performance, we recommend running the SAFETY_MONITOR_V2 in the MAST task.
We strongly recommend programming only 1 instance of SAFETY_MONITOR_V2 in your project.
The following conditions are mandatory in order to run SAFETY_MONITOR_V2:
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL SAFETY_MONITOR_V2_Instance (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, Output_Sorted:=Sorted, Error=>Error_Output, Running=>Running_Output)
Representation in ST
Representation:
SAFETY_MONITOR_V2_Instance (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, Output_Sorted:=Sorted, 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
Output_Sorted
  • Bit = 1: Diagnostics sorted according to OSSDs (no preprocessing)
  • Bit = 0: Diagnostics of all devices
The following table describes the input/output parameters:
Parameter
Type
Description
Enable
  • Bit = 1: Activate DFB (cold start)
    Setting this bit to 1 will execute the DFB, enabling information to be processed.
    Information can only be processed if Enable = 1
  • Bit = 0: Deactivate DFB.
    The bit is set to 0 by the DFB at time-out.
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
Bit = 1: DFB or safety bus fault
(At least 1 slave faulty).
Note:
  • DFB error (Enable = 0 and Dfb_err = 1))
    A DFB error will invalidate safety project data.
  • Bus error (Enable = 1 and Dfb_err = 0))
    In the event of a device error in the safety project, the faulty addresses will be displayed in the public ARRAY variable Device.Device_error.
Running
EBOOL
Bit = 1: DFB running
Internal Public variables
The following table describes the internal public variables:
Name
Type
Description
Abort
If this bit is set to 0 in one cycle and to 1 in the next cycle, all exchanges between the CPU and the Safety Monitor will be aborted. The DFB will reinitialize and all internal data of the DFB will be set to 0.
Timeout
Time-out during data exchange
If the DFB does not receive a correct data set before this time elapses,
  • transmission will be aborted,
  • the DFB deactivated and
  • the Error output will be set to 1 (Dfb_stat and Dfb_err are updated).
Moni_err
EBOOL
Bit = 1: Monitor error
Out_1
EBOOL
Bit = 1: 1. OSSD (OUT1) activated
Out_2
EBOOL
Bit = 1: 2. OSSD (OUT2) activated
Device.Device_ready
ARRAY[0..47] OF BOOL
Device ready
Each index corresponds to the index of the safety device which is ready but still in test mode or waiting for another condition such as local acknowledgment, the activation of the Start button, etc.
Device.Device_off
ARRAY[0..47] OF BOOL
Device deactivated
Each index corresponds to the index of the deactivated safety device.
Note: Deactivated devices (including NOPs) set to FALSE are also transmitted as Device_off!
Device.Device_error
ARRAY[0..47] OF BOOL
Device error
Each index corresponds to the index of the faulty safety device.
Device.Device_noCom
ARRAY[0..47] OF BOOL
Device not communicating
Each index corresponds to the index of the safety device which is not communicating on the AS-i bus.
Device.Device_allocation
ARRAY[0..47] OF INT
Device receiving instruction
Each index corresponds to the index of the safety device. An integer value corresponding to the processing loop is assigned to the safety device.
  • 1 = 1st OSSD
  • 2 = 2nd OSSD
  • 3 = Preprocessing (only appears in the event of an error; at all other times, 0 is displayed.)
  • 4 = Both OSSDs
Note: This information is only transmitted if Output_Sorted is set to 0!
Dfb_stat
STRING
DFB processing status in plain text
Dfb_err
INT
Indicates the following error types:
  • 16#90: The response sent by the Monitor is invalid.
  • 16#91: Data exchange has been aborted by the user.
  • 16#92: The exchange has been aborted due to time-out, the DFB is unable to receive data.