SFC 13
SFC 13
5HDGLQJ'LDJQRVWLF'DWDRID'36ODYHZLWK6)&'3150B'*6ODYH'LDJQRVWLFV
Slave Diagnostics
Each DP slave provides slave diagnostic data structured in accordance with EN 50 170 Volume 2,
PROFIBUS. To read out this diagnostic data, you require SFC 13 "DPNRM_DG".
Refer to the following table for the basic structure of the slave diagnostic data and to the manuals of
the DP slaves for further information.
Byte Meaning
0 Station status 1
1 Station status 2
2 Station status 3
3 Master station number
4 Vendor ID (high byte)
5 Vendor ID (low byte)
6 ... Further slave-specific diagnostic information
Description
With SFC 13 "DPNRM_DG" (read diagnostic data of a DP slave), you read the current diagnostic data
of a DP slave in the format specified by EN 50 170 Volume 2, PROFIBUS. The data that has been
read is entered in the destination area indicated by RECORD following error-free data transfer.
You start the read job by assigning 1 to the input parameter REQ in the SFC 13 call.
System Software for S7-300/400 System and Standard Functions Volume 1/2
Reference Manual, 05/2010, A5E02789976-01 303
6)&VIRU'LVWULEXWHG,2VRU352),1(7,2
5HDGLQJ'LDJQRVWLF'DWDRID'36ODYHZLWK6)&'3150B'*6ODYH'LDJQRVWLFV
Function
The read job is executed asynchronously, in other words it requires several SFC 13 calls. The status
of the job is indicated by the output parameters RET_VAL and BUSY, also refer to Meaning of the
Parameters REQ, RET_VAL and BUSY with Asynchronous SFCs.
6\VWHP6RIWZDUHIRU66\VWHPDQG6WDQGDUG)XQFWLRQV9ROXPH
5HIHUHQFH0DQXDO$(
6)&VIRU'LVWULEXWHG,2VRU352),1(7,2
5HDGLQJ'LDJQRVWLF'DWDRID'36ODYHZLWK6)&'3150B'*6ODYH'LDJQRVWLFV
Note
You must make sure that the actual parameters of RECORD match in all calls belonging to a job.
A job is uniquely identified by the LADDR input parameter.
Note
The amount of data read in a DP slave depends on its diagnostic status.
System Software for S7-300/400 System and Standard Functions Volume 1/2
Reference Manual, 05/2010, A5E02789976-01 305
6)&VIRU'LVWULEXWHG,2VRU352),1(7,2
5HDGLQJ'LDJQRVWLF'DWDRID'36ODYHZLWK6)&'3150B'*6ODYH'LDJQRVWLFV
Error Information
How to evaluate the error information of the RET_VAL parameter is explained in Evaluating Errors
with the Output Parameter RET_VAL. This chapter also contains the general error information for the
SFCs. The error information specific to SFC 13 is a subset of the error information for SFC 59
"RD_REC," see Reading a Data Record with SFC 59 "RD_REC"
6\VWHP6RIWZDUHIRU66\VWHPDQG6WDQGDUG)XQFWLRQV9ROXPH
5HIHUHQFH0DQXDO$(