Siemens Simatic S7-300 CPU 31xC Series Installation And Operating Instructions Manual page 199

Hide thumbs Also See for Simatic S7-300 CPU 31xC Series:
Table of Contents

Advertisement

Example of reading out S7 diagnostic data with SFC 59 "RD REC"
Here you will find an example of how to use SFC 59 in the STEP 7 user program to read
S7 diagnostics data records for a DP slave. The process of reading the slave diagnostics is
similar to SFC 13.
Assumptions regarding the STEP 7 user program
Exceptions for this STEP 7 user program:
• Diagnostic data for the input module at address 200
• Data record 1 is to be read out.
• Data record 1 is to be stored in DB 10.
STEP 7 user program
STL
CALL SFC 59
REQ
:=TRUE
IOID
:=B#16#54
LADDR
:=W#16#200
RECNUM
:=B#16#1
RET_VAL :=MW2
BUSY
:=MO.0
RECORD
:=P# DB10.DBX 0.0 BYTE 240
Note:
Data is only returned to the target area if BUSY is reset to 0 and if no negative RET_VAL has
occurred.
Diagnostic addresses
At a CPU 31x-2, you assign diagnostic addresses for PROFIBUS DP. Verify in your
configuration that the DP diagnostic addresses are assigned once to the DP master and
once to the DP slave.
CPU 31x-2 as sender
S7-300, CPU 31xC and CPU 31x: Installation
Operating Instructions, Edition 08/2004, A5E00105492-05
Debugging functions, diagnostics and troubleshooting
Description
//Request to read
//Identifier of the address area, here the I/O input
//Logical address of the module
//Data record 1 is to be read
//An error code is output if an error occurs
//Read operation not finished
//DB 10 is target area for the read data record 1
CPU 31x-2 as receiver
PROFIBUS
Diagnostic address
10.7 Diagnostics of DP CPUs
is to be read.
H
10-23

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-300 cpu 312cSimatic s7-300 cpu 313c-2 dpSimatic s7-300 cpu 314c-2 ptpSimatic s7-300 cpu 314c-2 dpSimatic s7-300 cpu 312Simatic s7-300 cpu 31 series ... Show all

Table of Contents