Skip to main content

SF_SafetyRequest (FB)

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_SafetyRequest 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

The SF_SafetyRequest function block represents the interface between the user program and the system environment. It provides the interface to a general actuator (for example, a safety drive or a safety valve) to set it to the safe state.

SF_SafetyRequest_Example.png
Table 73. VAR_INPUT

Name

Data Type

Initial Value

Description, parameter values

Activate

BOOL

FALSE

General input parameters

S_OpMode

SAFEBOOL

FALSE

Variable.

Requested mode to the connected peripheral.

FALSE: Safe mode is requested.

TRUE: Operating mode (not safe) is requested

S_Acknowledge

SAFEBOOL

FALSE

Variable

Confirmation of the connected peripheral.

FALSE: Operating mode (not safe)

TRUE: Safe state

MonitoringTime

TIME

T#0s

Constant.

Monitoring of the response time between the request of a safety function (S_OpMode to FALSE) and the actuator acknowledgement (S_Acknowledge switches to TRUE)

The MonitoringTime caution note must be observed.

Reset

BOOL

FALSE

General input parameters



MonitoringTime

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

Table 74. VAR_OUTPUT

Name

Data Type

Initial Value

Description, parameter values

Ready

BOOL

FALSE

General output parameters

S_SafetyActive

SAFEBOOL

FALSE

Confirmation of the safe state

FALSE: Not a safe state

TRUE: Safe state

S_SafetyRequest

SAFEBOOL

FALSE

Request to set the peripheral in the safe state

FALSE: Safe mode is requested.

TRUE: Non-safe mode is requested

Error

BOOL

FALSE

General output parameters

DiagCode

WORD

16#0000

Diagnostic codes



Figure 99. Function block: SF_SafetyRequest
Function block: SF_SafetyRequest


Functional description

This function block represents the interface between the safety-oriented system and the connected safe peripheral. This means that the safety functions of the connected safe peripheral are available in the user program (application). However, there are only 2 binary signals to control the safe state of the connected peripheral (i.e. one signal for the request and one signal for the receipt of the acknowledgement).

Important

The safety function is performed independently by the connected safe peripheral. The SF_SafetyRequest function block only initiates the request for this, monitors it, and sets the output if the connected safe peripheral acknowledges the safe state. This is indicated by the S_SafetyActive output. The function block does not define the parameters of the connected safe peripherals. These should be defined by the safe peripheral itself. SF_SafetyRequest switches the connected safe peripheral from operating mode to safe mode.

Status diagram

Figure 100. Status diagram: SF_SafetyRequest
Status diagram: SF_SafetyRequest


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 101. Timing diagram: SF_SafetyRequest
Timing diagram: SF_SafetyRequest


Error detection

The function block detects if the actuator does not enter the safe mode within the monitoring time.

The function block detects when the acknowledgement signal is lost, although the request is still active.

The function block detects a static Reset signal.

External device errors: There are no external errors because there are no error bits/error information provided by the connected safe peripheral.

Error behavior

In case of an error event, the S_SafetyActive output is set to FALSE.

An error must be acknowledged with a rising trigger edge at the Reset input. To continue with the function block after this Reset, the S_OpMode request has to be set to TRUE.

FB-Specific Error and Status Codes

Table 75. FB-specific error codes

DiagCode

Statue Name

Status description and output setting

16#C002

Acknowledge Lost

Switching off the acknowledgement in the safe state

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = TRUE

16#C003

Monitoring Time Elapsed

The S_OpMode request could not be processed during the watchdog time.

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = TRUE

16#C004

Reset Error 2

Static reset detected in status 16#C002 (acknowledgement lost)

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = TRUE

16#C005

Reset Error 3

Static reset detected in status 16#C003 (watchdog time expired)

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = TRUE



Table 76. FB-specific status codes

DiagCode

Statue Name

Status description and output setting

16#0000

Idle

The function block is not active (basic state).

Ready = FALSE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = FALSE

16#8000

Safe Mode

Peripheral (actuator) is in safe mode.

Ready = TRUE

S_SafetyActive =TRUE

S_SafetyRequest = FALSE

Error = FALSE

16#8001

Init

Status after Activate was set to TRUE or after rising trigger edge at Reset.

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = FALSE

16#8002

Operation Mode

Operating mode without acknowledgement of safe mode.

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = TRUE

Error = FALSE

16#8012

Wait for Confirmation OpMode

Operating mode with acknowledgement of safe mode

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = TRUE

Error = FALSE

16#8003

Wait for Confirmation

Wait for acknowledgement of the drive (system interface)

Ready = TRUE

S_SafetyActice = FALSE

S_SafetyRequest = FALSE

Error = FALSE

16#8005

Wait for OpMode

Error was acknowledged. Nevertheless, S_OpMode has to be set to TRUE before the function block can be initialized.

Ready = TRUE

S_SafetyActive = FALSE

S_SafetyRequest = FALSE

Error = FALSE