×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 31895566, Entry date: 06/09/2015
(13)
Rate

How do you find out the status of the stations of a DP master system or of a PROFINET IO system?

  • Entry
  • Associated product(s)
You can use SFC51 "RDSYSST" to read out SSL parts lists or excerpts of SSL parts lists of a CPU.

The following configuration has been created in the example attached:


Fig. 01

In the user program (OB1), you use SFC51 "RDSYSST" to read out the system status list of the CPU.
When you call SFC51 "RDSYSST", at the input parameter SSL_ID you specify which system status list you want to read out. In this way you can read out the following data, for example:

  • Module IDs
  • Statuses of module LEDs or
  • Status of the stations of a DP master system or PROFINET IO system that is connected to the integrated DP or Industrial Ethernet interface of a CPU

There is an overview of all the SZL-IDs in the manual entitled "System Software for S7-300/400 System and Standard Functions" in Entry ID 1214574.

When you call SFC 51 "RDSYSST", at the INDEX input parameter you specify the number of the PROFIBUS DP master system or of the PROFINET IO system in HEX format. The number of the PROFIBUS DP master system or of the PROFINET IO system can be found in the Hardware Configuration (see Fig. 01).

Parameterization of the SFC51 "RDSYSST" differs according to the CPU used:

  1. CPU with integrated DP and Industrial Ethernet interface
  2. CPU with integrated DP interface without Industrial Ethernet interface

Sample parameterization for SFC51 "RDSYSST" in a PN/DP CPU


Fig. 02

Fig. 03

Enter SSL_ID=694 (hex) to determine the status of the stations of a DP master system or PROFINET IO system connected to a PN/DP CPU. You specify the memory area where the data of the system status list read out (diagnostics data) is to be stored. The memory area of diagnostics data is 258 bytes.

The length of 258 bytes is derived from the structure of Table 01.
 

Content Length Meaning
index 1 word 0: Central module
1-31: Remote module on the PROFIBUS DP master system
100-115: Remote module on the PROFINET IO system
status_0 BOOL Group information
1: At least one of the following status bits has the value 1
0: All the following status bits have the value 0
status_1 BOOL Status of Station 1
1: Station 1 failed (valid only for 694)
status_2 BOOL Status of Station 2
1: Station 2 failed (valid only for 694)
...
status_2047 BOOL Status of Station 2047
1: Station 2047 failed (valid only for 694)
Table 01

You can determine the status of a maximum of 2047 stations. 1 bit is required for each station in the memory area of the diagnostics data. Furthermore, another 1 bit is required for the group information, which means in the memory area of the diagnostics data you need 256 bytes for the status information of each station and 2 bytes for the index (information on the PROFIBUS DP master system or PROFINET IO system).

The following sample program contains the complete hardware configuration of an S7 station with the call of SFC51 "RDSYSST" in the user program.

SZL_Status_PNDP.zip (686 KB)

Sample parameterization for SFC51 "RDSYSST" in a CPU without integrated Industrial Ethernet interface

 


Fig. 04

Enter SSL_ID=292(hex) to determine the status of the stations of a DP master system that is connected to the integrated DP of a CPU without Industrial Ethernet interface. You specify the memory area where the data of the system status list read out (diagnostics data) is to be stored. The memory area of diagnostics data is 16 bytes.

The length of 16 bytes is derived from the structure of Table 02.
 

Content Length Meaning
status_0 1 byte Bit 0: Base units (INDEX=0) or Station 1
Bit 1: Expansion device or Station 2
...
Bit 7: Expansion device or Station 8
status_1 1 byte Bit 0: Expansion device or Station 9
Bit 1: Expansion device or Station 10
...
Bit 7: Expansion device or Station 16
status_2 1 byte Bit 0: Expansion device or Station 17
Bit 1: Expansion device or Station 18
...
Bit 7: Expansion device or Station 24
status_3 1 byte Bit 0: Expansion device or Station 25
Bit 1: Expansion device or Station 26
...
Bit 6: Expansion device in the S5 area or Station 31
Bit 7: Expansion device in the S5 area or Station 32
...
status_15 1 byte Bit 0: Expansion device in the S5 area or Station 121
Bit 1: Expansion device in the S5 area or Station 122
...
Bit 7: Expansion device in the S5 area or Station 128
Table 02

You can determine the status of a maximum of 128 stations. For each station, 1 bit is required in the memory area of the diagnostics data, which means in the memory area of the diagnostics data you need 16 bytes for the status information of each station.

The following sample program contains the complete hardware configuration of an S7 station with the call of SFC51 "RDSYSST" in the user program.

SZL_Status_DP.zip (257 KB)

The sample programs were created with STEP 7 V5.5. Copy the SZL_Status_PNDP.zip or SZL_Status_DP.zip file into a separate directory and then dearchive it in STEP 7. The STEP 7 project is then unpacked with all its subdirectories. You can then use the SIMATIC Manager to process the unpacked STEP 7 project.

 

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.