Go Down

Topic: How to use Arduino Modbus Library (Read 117 times) previous topic - next topic


How do I use ArduinoModbus library to read/write other slave devices in the Network using modbusTCP . ?
No documentation or example programs are given anywhere

Thanks in advance


Jan 15, 2020, 05:43 am Last Edit: Jan 15, 2020, 07:14 am by noiasca
no examples?


no documentation?
For more information about this library please visit us at https://www.arduino.cc/en/ArduinoModbus/ArduinoModbus

how to react on postings:
- post helped: provide your final sketch, say thank you & give karma.
- post not understood: Ask as long as you understand the post
- post is off topic (or you think it is): Stay to your topic. Ask again.
- else: Ask again.


All the examples which i got was with modbusRTU.

In my case i am trying to write/read to a memory location of a slave modbus device using ModbusTCP.


I am using Arduino as Modbus Master on

I have a openplc software running on a raspberry pi on

I want to  do Modbus write/read from to ( Raspberry PI)


I have Used an Ethernet Shield and the communication is happening over Ethernet network.

I am not able to draw an analogy from Wifimodbus classes and functions to Ethernet modbus.

Any help is appreciated.

All I need is to write to a modbus slave device using Modbus running from Arduino.



I am a newbie with respect to Arduino programming.

I couldn't make much sense of this particular project.  Can you please elaborate as to what function I have to use to connect to a modbus slave with IP and which classes has all the Coil/register read/write operations ?

Go Up