-

PROFIsafe_F_Addr_Diagnostic_Upstream

TypeFunction block
DescriptionThe function block is used to diagnose upstream F-connections.

The FB can be used as an alternative to the corresponding F-diagnostic variables F_ADDR_[nnnnn]_ACK_REQ_DEV (acknowledgement required) or FD_ADDR_[nnnnn]_PASS_OUT_DEV. (For the variables, nnnnn corresponds to the F-address.)

The FB reads the output interface data of the local F-Device instance and shows them as 16 bit value at its output formal parameter F_Diag_Status. This way, a required acknowledgement can be indicated. Via the input formal parameter F_Diag_Control, the 16 bit input interface data of the local F-Device instance can be written and thus controlled. This way, acknowledging of diagnostic messages is possible.

The FB can only be used in the user program if no F-diagnostic variables are parameterized in the Safety PLC (observe the section "Notes" below).

The function block is activated by a rising edge Activate = FALSE > TRUE. If an error occurs during the execution of the function block, Error is set to TRUE. The DiagCode output indicates the current FB status.
Block Icon
Notes
  • Important: The use of the FB described here and the corresponding system variables for F-diagnostics are mutually exclusive!

    The function block can only be used in the safety-related application program if no F- diagnostic variables are parameterized in the Safety PLC. This applies regardless of the protocol used. As soon as one PROFIsafe F-diagnostic function block is activated, the use of the diagnostic system variables is blocked and they can no longer be used, even if the function block is deactivated again. In order to be able to use the diagnostic system variables again, the function blocks must be deactivated and the user program must be rewritten onto the controller. If at least one system variable has been parameterized for F-diagnostics and a function block is active at the same time, the function block goes into the error state. An error code is output at DiagCode and the function block remains in the error state until the user program is reloaded onto the controller.

  • At the FB, no F-address of the upstream F-Device needs to be specified as the FB always knows the F-Device instance assigned to it. The reason is that there is only one instance of the local F-Device configured in the Safety PLC, whose F-address can be re-parameterized at runtime.
  • Function blocks of this type have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
ParametersInput

Activate

F_Diag_Control

Outputs

Ready

F_Address_Out

F_Diag_Status

Error

DiagCode
Diagnostic codes The DiagCode output indicates the current FB status. While an error is indicated, this is the error code.

Table with diagnostic codes