Skip to main content
Associate II
February 3, 2025
Question

Modbus over ethernet with multiple master at same time

  • February 3, 2025
  • 2 replies
  • 1583 views

Hi , I implemented modbus over ethernet on my NUCLEO-H723ZG mcu board. I could poll from modbus poll software. But when I try to poll from modbus poll from different devices at the same time , it is not able to poll.Couldn't connect.

2 replies

Ozone
Principal
February 3, 2025

There is very little information in your post, nobody can help you based upon that.

> Modbus over ethernet with multiple master at same time

I am not sure what this title is supposed to mean.
Modbus is specified as a single-master bus system.

> But when I try to poll from modbus poll from different devices at the same time , it is not able to poll.Couldn't connect.

Debug the low-level transmit routines, and record the actual bus transmissions with a separate tool (like Wireshark).
You need to know what exactly fails, and where.

CJ007Author
Associate II
February 3, 2025

Hello @Ozone  I tried to create an array of socket pointers in tcp stack and allowed connection of more than one master according to the size of array.Thus enabling multiple sockets in the pcbListen.  

Ozone
Principal
February 3, 2025

Not sure if you mean to connect your device as a slave to multiple masters at the same time.
And I'm not sure if and how Modbus master can deal with other master on the same network. I haven't dealt with Modbus for quite a while now ...

But the recommendation for debugging the low-level routines and run a network monitoring software still stands.
BTW, Wireshark has a Modbus profile, and you can easily filter out the relevant packages for your environment.

Visitor II
March 2, 2025

Hi @CJ007 I have been trying to implement modbus on my board but have been unsuccessful. I have the ethernet up and working, can you share how you made modbus work on it?