Control via PROFINET IO
6.2 PROFINET IO Diagnosis
S7-Function Blocks
For reading of diagnosis data from a PROFINET IO device the function block SFB 54 (RALRM) is
used. It is best to call this function in OB82 (Diagnosis alarm-OB).
The call is as shown in the following:
CALL SFB 54 , DBx
MODE
:= INT
(Input)
F_ID
:= DWORD (Input)
MLEN
:= INT
(Input)
NEW
:= BOOL
(Output)
STATUS
:= DWORD
(Output)
ID
:= DWORD (Output)
LEN
:= INT
(Output)
TINFO
:= ANY
(I/O)
AINFO
:= ANY
(I/O)
To the function block SFB 54 a data block (DBx here) has to be added. The data block is
automatically generated when the function block is called.
Parameter
Meaning
MODE
Operating mode of this SFB
0
only parameter
NEW
and
LEN
are written
1
all output parameters are rewritten
2
all output parameters are rewritten, if
F_ID
has triggered the alarm
F_ID
logical start address of the selected PROFINET IO component
(refer to note “ID” in chapter 6.1)
MLEN
maximum length of the bytes to be read in
AINFO,
the actually received length of the data is specified in
LEN
NEW
= 1: a new alarm has been received
STATUS
error description (see online help of S7)
ID
logic start address of the PROFINET IO component, that has received an alarm
(The I/O identifier is contained in Bit 15:
0: input address;
1: output address)
LEN
length of the received alarm information
TINFO
administrative information
AINFO
alarm information (see table 5 in chapter 6.2.1)
Page 66 of 105
Manual • Doc. No.: C.2921.21 / Rev. 1.6
CANopen-PN