Using Wireshark to Capture EtherCAT Network Packets

Updated Jan 2, 2018

Reported In

Hardware

  • NI-9144
  • Ethernet Cable

Software

  • LabVIEW Full
  • LabVIEW Real-Time Module

Driver

  • NI-Industrial Communications for EtherCAT

Programming Language

  • LabVIEW G

Other

Issue Details

  • I want to monitor network communication from my EtherCAT chassis
  • How can I use Wireshark to capture EtherCAT network packets when unexpected problems are happening?

Solution

  • It is possible to use Wireshark to capture EtherCAT network packets
  • To capture EtherCAT packets make sure we have the required tools and follow the steps below
  • Capturing Traffic
    1. Create a LabVIEW Project with the Real-Time controller and the EtherCAT Slave
    2. Run your EtherCAT VI to begin communication
    3. Open Wireshark and begin capture. You will see the ECAT packets transmitted over the network

Additional Information

  • Recommended Network configuration
    1. Configure the EtherCAT Master
    2. Connect the Wireshark PC ethernet adapter, EtherCAT slave IN port, and the EtherCAT Master adapters to the network hub/switch
    3. Connect the Host PC directly to the EtherCAT Master's Ethernet port as shown in Figure 1 below


Figure 1:  Network topology with network hub/switch, Wireshark PC, host PC, EtherCAT Master, and EtherCAT Slave

 

  1. If you only care about EtherCAT traffic, do not connect the hub/switch to any other network or network devices. It is preferable to leave the hub/switch only connected to the Wireshark PC, EtherCAT slave, and EtherCAT Master so that you have less traffic to look through, as shown in Figure 1. Connecting other devices to the EtherCAT network could also interfere with EtherCAT communication.
  2. Disable any firewalls that might prevent Wireshark from performing a full capture on all ports.

WAS THIS ARTICLE HELPFUL?

Not Helpful