News:

  • May 01, 2026, 07:44:35 PM

Login with username, password and session length

Author Topic: Ecom100 Modbus Communication Testing with Wireshark  (Read 44085 times)

sgsims

  • Hero Member
  • *****
  • Posts: 127
Ecom100 Modbus Communication Testing with Wireshark
« on: August 13, 2012, 08:38:42 AM »
I am trying to test an H0Ecom100 in a DL06 talking Modbus to a Cognex Reader (Dataman300)

I have all slave (Cognex Reader) set-up in the peer table and I have the I-Box Config (IB-710) along with a RX and WX Ibox (IB-740 & IB741)

Everything seems to work when looking in Direct Soft.  The success bit turns on after I trigger a communication and things are showing up in my target V-mem location in the PLC.  However things are not happening on the reader that I expect. 

Soooooo,  I was trying to use Wireshark to see if the Ecom is sending out the message as I intended.  when looking at the wireshark log I had one communication from the ecom that had all the Modbus labels..Function code...read coils etc. From that point on I couldn't see that modbus information in wireshark.  I could see the ecom sending out a comm called Broadcast.  but no destination IP for the reader.

I have the reader and the ecom plugged into a switch that is also plugged into my computer.  The


Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Ecom100 Modbus Communication Testing with Wireshark
« Reply #1 on: August 13, 2012, 11:07:30 AM »
The reason you are not seeing it on Wireshark is because your switch is doing its job. It is isolating the Ethernet packets. Switches are smart. They learn where packets go and remember. So, the packets coming from your H0-ECOM100 go to the switch port and the switch has learned that the only port it needs to repeat that to is the port connected to the Cognex Reader. In other words, your switch has learned that he doesn't have to repeat that packet on his port that your PC (with Wireshark) is connected to. Thus, Wireshark never sees the conversation happening between the H0-ECOM100 and the Cognex Reader.

In order to see the packets you will have to buy a switch that has "port mirroring" capability. I have a NetGear GS105E at my desk. It comes with software that you can force it to repeat packets on one port to another. This would allow you to set it up so that your PC could eavesdrop on the conversation between the H0-ECOM100 and the Cognex Reader.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: Ecom100 Modbus Communication Testing with Wireshark
« Reply #2 on: August 13, 2012, 07:23:00 PM »
The other thing you might try is using another master installed on your PC with the ID reader and see if the strange behavior is still present.  I like the Modbus master and slave utilities from Modsoft.co.uk, or the demo/lite version of DAQ Factory from Azeotech.com is free and comes with a pre-built MMI app that is basically turns it into a Modbus master utility.  You might like the Azeotech MMI software as well, it's pretty good.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.