Obtaining Diagnostic Data
Obtaining Diagnostic Data
Obtaining Diagnostic Data
Switch Siemens
PLC
Our intention is to tap into all traffic that the Siemens PLC can see.
This is achieved by mirroring all traffic at the Ethernet port on the Siemens
PLC.
Managed Switch
1 2 3 4 5 6 7 8
Refer to the managed switch manual to configure the switch so that all traffic
on Port 2 is mirrored onto Port 1. (Highlighted in Orange)
Page 1
Managed Switch
1 2 3 4 5 6 7 8
PC running Siemens
Wireshark PLC
Disconnect the PLC from the network and connect it to port 2 of the managed
switch.
Now all traffic on Port 2 (PLC) will be mirrored on Port 1 (Wireshark PC).
Managed Switch
Device Device Device
1 2 3 4 5 6 7 8
Switch
Now complete the network by connecting the rest of the network to the
managed switch, Ports 3-8 can be used for this purpose.
Page 2
1.2 Collecting Wireshark Data
The following should appear, click start on the adapter that is connected to the
Managed Switch.
Page 3
You should see something like the following after capture has stopped.
Page 4
1.3 Analyzing PROFINET Protocol
Filters can be applied to the wireshark capture, typing pndcp into the filter text
box and pressing apply will filter all capture data to only show profinet io dcp
packets.
1. The controller will attempt to look for the PROFINET device using the
name given by the S7 project (Filter pndcp)
2. Try looking for Name of Station “xlyh” (No. Packet 158148)
3. The response can be seen in packet 158229
Trouble Shoot, if response packet cannot be found, this can indicate that
no gauge can be found, check S7 project and the Gauge both have the
correct device name.
If multiple responses to the packet can be seen then two Devices are
using the same name. Make sure that every device has a unique device
name.
Page 5
The response contains the IP address of the Gauge, this information is
used later by the PLC to check if the PLC needs to send the gauge a
request for it to change its IP address.
After a predetermined time, the PLC will send a broadcast message on the
network requesting a reply to who current has the ip address of “xlyh”
which has been setup in the Simantic S7 project. (10.155.26.44)
Packet number 174097 shows that the PLC is requesting who has
10.155.26.44.
Packet number 174102 shows that the Gauge is responding to the request
and stating that it is at IP address 10.155.26.44.
Page 6
Start of IP Hand Shake
If all 6 PNIO-CM messages are not OK, there likely are problems
Possible Problems
Odd PROFINET Controller Name, Refer to Instructions on Changing the
Profinet IO Line.docx
Page 7
CMInitiatorUDPRTPort should be 0x8892 or in the range 0xC000 –
0xFFFF
To rectify, use the at least gaugecode 1v3v8 which is more tolerant to non
PROFINET compliant controllers.
By applying data filter of the MAC Address of the Gauge, we can see all data
except broadcast data.
The example below shows filters the data by source and destination Mac
Adress.
The image above shows the data is valid and is running OK, All data sent and
received from the PLC states (Valid, Primary, Ok, Run)
Page 8