Description
Original instructions
Function Description
The SAFETY_MONITOR_V2 allows data processed by the safety monitor to be obtained. It is only used for diagnostics and cannot be used to control the AS-Interface bus or its blocks.
The SAFETY_MONITOR_V2 meets the following safety standards:
The SAFETY_MONITOR_V2 DFB can manage up to 48 devices and supports either sorting according to OSSDs (Output Signal Switch Devices) 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, it is recommend to run the SAFETY_MONITOR_V2 in the MAST task.
Only program only 1 instance of SAFETY_MONITOR_V2 in your project.
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
EBOOL
Input variable 0
I1
EBOOL
Input variable 1
I2
EBOOL
Input variable 2
I3
EBOOL
Input variable 3
Output_Sorted
BOOL
  • Bit = 1: Diagnostics sorted according to OSSDs (no pre-processing)
  • Bit = 0: Diagnostics of all devices
The following table describes the input/output parameters:
Parameter
Type
Description
Enable
EBOOL
  • Bit = 1: Activates DFB (cold start)
    Setting this bit to 1 executes the DFB, enabling information to be processed.
    Information can only be processed if Enable = 1
  • Bit = 0: Deactivates 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
EBOOL
Bit = 1: Detected DFB or safety bus error
(At least 1 slave inoperative).
Note:
  • For a detected DFB error, (Enable = 0 and Dfb_err = 1))
    A detected DFB error invalidates the safety project data.
  • For a detected bus error, (Enable = 1 and Dfb_err = 0))
    In the event of a detected device error in the safety project, the incorrect addresses are 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
EBOOL
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 re-initialize and all internal data of the DFB will be set to 0.
Timeout
INT
Time-out during data exchange
If the DFB does not receive a correct data set before this time elapses, the following takes place:
  • Transmission is aborted
  • DFB deactivated
  • Error output is 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 that 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 a 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 an inoperative safety device.
Device.Device_noCom
ARRAY[0..47] OF BOOL
Device not communicating
Each index corresponds to the index of a safety device that is not communicating on the AS-Interface bus.
Device.Device_allocation
ARRAY[0..47] OF INT
Device receiving instruction
Each index corresponds to the index of a safety device. An integer value corresponding to the processing loop is assigned to the safety device.
  • 1= 1st OSSD
  • 2 = 2nd OSSD
  • 3 = Pre-processing (only appears in the event of a detected 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 types of detected errors:
  • 90 hex: The response sent by the Monitor is invalid.
  • 91 hex: Data exchange has been canceled by the user.
  • 92 hex: The exchange has been canceled due to time-out, the DFB is unable to receive data.