modbus-ethernet through arduino ethernet shield
Over TCP/IP implementation for Arduino Ethernet shield
Original : https://github.com/epsilonrt/modbus-ethernet
Author : epsilonrt
Published On : 20220221
Last commit : 20230528
This content was created with the assistance of ChatGPT, an artificial intelligence language model developed by OpenAI.
1. Overview
This library enables Arduino to communicate via the Modbus protocol. Modbus is a master-slave protocol used in industrial automation and can also be applied in other areas like home automation. The current version of the library supports Arduino acting as a slave and supports Modbus over TCP.
2. Library Types
- Modbus-Arduino: Base library
- Modbus-Serial: Modbus Serial RTU library
- Modbus-Ethernet: Modbus TCP library (for standard Ethernet Shield)
- Modbus-EtherCard: Modbus TCP library (for ENC28J60 chip)
- Modbus-Esp8266AT: Modbus IP library (for ESP8266 chip with AT firmware)
3. Usage
The repository contains four examples accessible from the Arduino interface. Key sections of the examples provide explanations related to Modbus.
4. License
Licensed under the BSD New License.
Modbus is a widely used communication protocol in the field of industrial automation. Here's a brief overview of the Modbus protocol:
1. Origin
Modbus was developed by Modicon in 1979 for use with its programmable logic controllers (PLCs).
2. Protocol Type
The original Modbus was developed as a serial communication protocol and operates as a master/slave protocol. This means there's one master controlling the Modbus data transactions, communicating with multiple slave devices.
3. Data Model
Modbus supports various data types, distinguished by addresses. The main data types include Coils, Discrete Inputs, Holding Registers, and Input Registers.
4. Communication Modes
Modbus can communicate in two modes: RTU (Remote Terminal Unit) and ASCII (American Standard Code for Information Interchange). The RTU mode transmits data in binary format, while the ASCII mode transmits data using ASCII characters.
5. Extensibility
The Modbus protocol can be extended over TCP/IP networks, allowing communication with devices located remotely. This extended version is known as Modbus TCP.
6. Licensing
Modbus is an open standard protocol, free to use without any restrictions.
Modbus TCP is an extension of the Modbus protocol, designed for communication over TCP/IP networks. Here's a brief background on Modbus TCP:
1. Client/Server Principle
Modbus-TCP operates based on the client/server principle. Here, the master acts as the client, and the slaves act as servers. Thus, the Modbus master sends requests to the slave servers and receives responses.
2. TCP/IP Network
Modbus TCP applies the standard Modbus protocol over TCP/IP networks, allowing Modbus communication over the internet and local networks.
3. Port Number
By default, Modbus TCP communicates using port 502.
4. Scalability
Modbus TCP is designed for communication with multiple devices within a network, allowing communication with multiple slave devices.
5. Reliability
TCP/IP is a reliable communication protocol, automatically correcting any errors that might occur during data transmission. Thus, Modbus TCP ensures reliable data communication.
Thank you for reading.