Skip to main content

SF_GuardMonitoring

Tip

The version of the function block as described here corresponds to the latest version of the function block in Version list of function blocks.

Applicable safety standards

SF_GuardMonitoring is a certified PLCopen function block. For detailed information about applied standards, see "PLCopen – Technical Committee 5 – Safety Software".

Important

The requirements listed in the standards must be fulfilled by the user.

Interface description

This FB monitors the relevant safety guard with a two-stage interlock. It is used to support the "guard without interlocking" function (guard door monitoring) in an application. There are two independent input parameters for two switches of the safety guard. These two independent input parameters are coupled with the time difference (MonitoringTime) to close the guard.

Table 33. VAR_INPUT

Name

Data Type

Initial Value

Description, parameter values

Activate

BOOL

FALSE

General input parameters

S_GuardSwitch1

SAFEBOOL

FALSE

Variable.

Guard switch 1 input.

FALSE: Guard open

TRUE: Guard closed.

S_GuardSwitch2

SAFEBOOL

FALSE

Variable.

Guard switch 2 input.

FALSE: Guard open

TRUE: Guard closed.

DiscrepancyTime

TIME

T#0ms

Constant.

Sets the monitored synchronous time between S_GuardSwitch1 and S_GuradSwitch2.

The DiscrepancyTime caution note must be observed.

S_StartReset

SAFEBOOL

FALSE

General input parameters

S_AutoReset

SAFEBOOL

FALSE

General input parameters

Reset

BOOL

FALSE

General input parameters



DiscrepancyTime

For developers in Extended Level: The DiscrepancyTime input has to be set to a constant value. This means that the value must not be changed for the calls.

Table 34. VAR_OUTPUT

Name

Data Type

Initial Value

Description, parameter values

Ready

BOOL

FALSE

General output parameters

S_GuardMonitoring

SAFEBOOL

FALSE

Output, for status indication of the guard.

FALSE: The guard is not active.

TRUE: S_GuardSwitch1 and S_GuardSwitch2 are TRUE and no error, and confirmation. The guard is active.

Error

BOOL

FALSE

General output parameters

DiagCode

WORD

16#0000

Diagnostic codes



Figure 69. Function block: SF_GuardMonitoring
Function block: SF_GuardMonitoring


Functional description: SF_GuardMonitoring

This function block requires two inputs which map the position of the safety guard with two switches: a discrepancy time input and a Reset input. If the safety guard has only one switch, then the S_GuardSwitch1 and S_GuardSwitch2 inputs can be bridged. The watchdog time is the maximum time within which the two switches must be closed for the safety guard to close. The Reset, S_StartReset and S_AutoReset inputs define how the function block is reset after the safety guard has been opened.

When the safety guard is opened, the two inputs S_GuardSwitch1 and S_GuardSwitch2 should switch to FALSE. The S_GuardMonitoring output switches to FALSE as soon as one of the two inputs S_GuardSwitch1 or S_GuardSwitch2 is set to FALSE. To close the safety guard, both inputs S_GuardSwitch1 and S_GuardSwitch2 have to switch to TRUE.

SF_GuardMonitoring monitors the symmetry of the switching process. The S_GuardMonitoring output remains FALSE if only one of the contacts has completed the open/close process.

The behavior of the S_GuardMonitoring output depends on the time difference of both switching inputs. The discrepancy time is monitored as soon as the value of the two inputs S_GuardSwitch1/S_GuardSwitch2 differs. If the discrepancy time has been exceeded but both inputs still differ, then the S_GuardMonitoring output remains FALSE. If the second respective S_GuardSwitch1/S_GuardSwitch2 input switches to TRUE within the discrepancy time, then the S_GuardMonitoring output is set to TRUE, with subsequent confirmation.

Caution

The S_StartReset and S_AutoReset inputs shall only be activated if it is ensured that no hazardous situation can arise when the S-PLC is started.

Status diagram

Figure 70. Status diagram: SF_GuardMonitoring
Status diagram: SF_GuardMonitoring


Tip

Note: The transition from any state to the Idle state, initiated by Activate = FALSE, is not shown. In every case, these transitions have the highest priority.

Typical timing diagrams

Figure 71. Timing diagram 1: GuardMonitoring
Timing diagram 1: GuardMonitoring


Figure 72. Timing diagram 2: SF_GuardMonitoring
Timing diagram 2: SF_GuardMonitoring


Error detection

External signals: SAFEBOOL inputs provide their own error detection. Mechanical setup combines that of an open and closed switch according to the EN 954 standard. Discrepancy time monitoring for the time delay between both mechanical switch reactions, according to the EN 954 standard.

An error is detected when the time delay between the first and the second S_GuardSwitch1/S_GuardSwitch2 input is greater than the value of the DiscrepancyTime input. The error output is set to TRUE.

The POU detects a static TRUE signal at the Reset input.

Error and reset behavior

The S_GuardMonitoring output is set to FALSE. If the two inputs S_GuardSwitch1 and S_GuardSwitch2 are bridged, then no error is detected. To exit the reset state, the Reset input has to be set to FALSE. To exit the discrepancy time error, both inputs S_GuardSwitch1 and S_GuardSwitch2 have to be set to FALSE.

FB-Specific Error and Status Codes

Table 35. FB-specific error codes

DiagCode

Statue Name

Status description and output setting

16#C001

Reset Error

Static reset detected in state 8003.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = TRUE

16#C011

Discrepancytime Error 1

Discrepancy time expired in state 8004

Ready = TRUE

S_GuardMonitoring = FALSE

Error = TRUE

16#C012

Discrepancytime Error 1

Discrepancy time expired in state 8014

Ready = TRUE

S_GuardMonitoring = FALSE

Error = TRUE



Table 36. FB-specific status codes (no error)

DiagCode

Statue Name

Status description and output setting

16#0000

Idle

The function block is not active (basic state).

Ready = FALSE

S_GuardMonitoring = FALSE

Error = FALSE

16#8000

Normal

Safety guard closed and safety status confirmed.

Ready = TRUE

S_GuardMonitoring = TRUE

Error = FALSE

16#8001

Init

The block has been activated.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8002

Open Guard Request

Complete switching sequence required.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8003

Wait for Reset

Wait for rising trigger edge to Reset.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8012

Guard opened

The guard is completely open.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8004

Wait for GuardSwitch 2

S_GuardSwitch1 was switched to TRUE; wait for S_GuardSwitch2; discrepancy timer started.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8014

Wait for GuardSwitch 1

S_GuardSwitch2 was switched to TRUE; wait for S_GuardSwitch2; discrepancy timer started.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE

16#8005

Guard Closed

The guard is closed. Wait for Reset if S_AutoReset = FALSE.

Ready = TRUE

S_GuardMonitoring = FALSE

Error = FALSE