Devices and modbus Communication

Thread Starter

King2

Joined Jul 17, 2022
163
Are laptops, ESP32, and Raspberry Pi considered Modbus devices? Can a laptop communicate with an RPI using Modbus TCP/IP via ethernet cable ?

I think Yes, they are all Modbus devices laptop and RPI can communicate via Modbus TCP/IP with ethernet cable?
ESP32 and laptop can communicate via Modbus RTU using RS485 ?
 

nsaspook

Joined Aug 27, 2009
16,272
Are laptops, ESP32, and Raspberry Pi considered Modbus devices? Can a laptop communicate with an RPI using Modbus TCP/IP via ethernet cable ?

I think Yes, they are all Modbus devices laptop and RPI can communicate via Modbus TCP/IP with ethernet cable?
ESP32 and laptop can communicate via Modbus RTU using RS485 ?
https://www.ni.com/en/shop/seamless...sory-system/the-modbus-protocol-in-depth.html
Modbus is an industrial protocol that was developed in 1979 to make communication possible between automation devices. Originally implemented as an application-level protocol intended to transfer data over a serial layer, Modbus has expanded to include implementations over serial, TCP/IP, and the user datagram protocol (UDP). This document provides an in-depth view of the protocol implementation.

Modbus is a protocol with several physical interfaces. In theory, a camp fire can be a Modbus device, using the physical interface of smoke signal encoding.
 

Jeff Mizener

Joined Aug 14, 2019
4
One of those things you mentioned is not a Modbus device until it is connected to a Modbus network and communicates with Modbus devices (such as the aforementioned campfire). If you have software running on a laptop which implements the Modbus (RTU - serial or TCP - Ethernet) protocol and talks to other Modbus devices, then your laptop/Raspberry Pi/ ESPXYZ is a Modbus device.
I have written software to talk to Modbus devices with a laptop both by TCP (over an Ethernet network) & RTU (using a USB-RS485 converter). I have done the same using a Raspberry Pi. The ESP32 or ESP8266 can be made into a Modbus device with the appropriate software. It will communicate using Modbus TCP over WiFi or, with the appropriate RS485 interface hardware, Modbus RTU.

It's worth mentioning that one of the easiest ways to get started with Modbus (RTU or TCP) is to install Node Red on your laptop or Raspberry Pi (but not on any ESP devices). From that point on, it is drag-and-drop and as soon as you know the register map of the device you want to talk to, you are off to the races.
 
Top