In the user program of an S7-300 or S7-400 CPU with integrated PN interface, how can you read out the current topology of the PROFINET IO system connected?
You can read out the neighbor information of ports with SFB52 "RDREC" using data record number 802A (hex). In this way, you determine the topology data of the PROFINET IO nodes. You can evaluate and process this data in the user program.
A description and sample program for parameterizing the SFB52 "RDREC" are available below for downloading.
38566021_NET_topology_SFB52_e.pdf ( 471 KB )
The sample program is a STEP 7 project that contains the complete hardware configuration including the user program of an S7-300 station. The STEP 7 project is available for downloading as a ZIP file.
Extract the "PNIO_SFB52.zip" file into a separate directory. The STEP 7 project is unpacked automatically with all its subdirectories. You can then use the SIMATIC Manager to open and process the extracted STEP 7 project.
PNIO_SFB52.zip ( 512 KB )
Detailed information on the topic of detecting PROFINET Topologies and activating of IO devices with S7-1500 CPUs is available in Entry ID 90924135.
LLDP, Link Layer Discovery Protocol