Communication
2.2 PROFINET communication
SIMOCODE pro - Communication
Function Manual, 11/2018, A5E40508495002A/RS-AC/003
77
2.2.15
Data records
Reading and writing data records in the STEP7 user program
With SFB 52 "RDREC," you read the data record with number INDEX from the
SIMOCODE pro V PN (GP) IO Device addressed by means of ID.
ID contains the logical address with which SIMOCODE pro V PN (GP) was configured in
STEP 7 HW Config.
Example:
SIMOCODE pro V PN (GP) was configured in STEP 7 HW Config with basic type 2
(I address 0 / O address 0).
You want to read data record 94 - measured values.
SFB "RDREC"
INDEX:
W#16#005E
Data record 94 - measured values (0x005E)
ID:
DW#16#0
Logical address 0
LEN:
W#16#00AC
Data record length 172 bytes (0x00AC)
With SFB 53 "WRREC," you read the data record with number INDEX into the SIMOCODE
pro V PN (GP) IO device addressed by means of ID.
ID contains the logical address with which SIMOCODE pro V PN (GP) was configured in
STEP 7 HW Config.
Example:
SIMOCODE pro V PN (GP) was configured in STEP 7 HW Config with basic type 2 (I
address 16 / O address 16).
You want to write data record 95 - service data/statistical data (data record length 148
bytes (0x0094)).
SFB "WRREC"
INDEX:
W#16#005F
Data record 95 - service data/statistical
data (0x005F)
ID:
DW#16#F
Logical address 16
LEN:
W#16#0094
Data record length 148 bytes (0x0094C)
Note
STEP 7 online help
You will find a detailed explanation of SFB 52 "RDREC" in the STEP 7 Online Help.
An overview of the data records is provided in Chapter PROFINET data records (Page 223).