A. Technical appendix
A−12
Festo P.BE−CPX−FB13−EN en 0811c
Siemens S7 SFB 52 and 53
New function module SFB 52 in STL for writing a data record:
STL Explanation
CALL ”RDREC” , DB100
REQ :=TRUE Request to read
ID :=B#16#256 Logical address of the field bus node
(see mask Properties DP slave" in HW Config)
INDEX :=17 Data record number
MLEN :=10 max. length of the data record information
to be read in byte
VALID :=M200.0 1 = new data record received and valid
BUSY :=M200.1 1 = reading in process
ERROR :=M200.2 1 = fault in reading
STATUS :=MD202 Access identifier or fault code
LEN :=MW220 Length of the read data record information
RECORD :=P#M230.0 BYTE 10 Target range for the read data record and max. data
record length
Fig.A/4: Example program for reading out the diagnostic memory status
New function module SFB 53 in STL for writing a data record:
STL Explanation
CALL ”WRREC” , DB101
REQ :=TRUE Request to write
ID :=B#16#256 Logical address of the field bus node
(see mask Properties DP slave" in HW Config)
INDEX :=17 Data record number
LEN :=8 max. length of the data record information to be transferred
in bytes
DONE :=M200.0 1 = data record has been transferred
BUSY :=M200.4 1 = reading in process
ERROR :=M200.5 1 = fault in reading
STATUS :=MD206 Access identifier or fault code
RECORD :=P#M230.0 BYTE 10 Source range for the data record and max. data record
length to be written
Fig.A/5: Example program for transmitting the diagnostic memory status