Skip to content

Commit a7e7b7e

Browse files
committed
Tutorial content update post-review
1 parent 1e071cf commit a7e7b7e

File tree

1 file changed

+13
-17
lines changed
  • content/hardware/07.opta/opta-family/opta/tutorials/19.getting-started-with-modbus-tcp

1 file changed

+13
-17
lines changed

content/hardware/07.opta/opta-family/opta/tutorials/19.getting-started-with-modbus-tcp/content.md

+13-17
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In this tutorial, we will learn how to set up and use the Modbus TCP communicati
3232

3333
- Learn how to set up the workspace environment for Modbus TCP using Arduino IDE.
3434
- Learn how to use the Modbus TCP communication protocol between two Opta™ devices.
35-
- Learn how to verify that Opta™ has been correctly set up using an example that uses Modbus TCP communication.
35+
- Learn to verify that Opta™ has been correctly set up using a Modbus TCP communication example.
3636

3737
## Required Hardware and Software
3838

@@ -42,27 +42,27 @@ In this tutorial, we will learn how to set up and use the Modbus TCP communicati
4242
- 12 VDC / 1 A DIN rail power supply (x1)
4343
- [USB-C® cable](https://store.arduino.cc/products/usb-cable2in1-type-c) (x1)
4444
- Ethernet cable with RJ45 connectors - Cat5e, Cat6, Cat6e (x1)
45-
- Power cables for supply and load: Wires with a cross-sectional area ranging from 13.3 mm² to 21.2 mm², corresponding to AWG sizes 6 to 4
45+
- For the power supply and load: Use wires with cross-sectional areas between 13.3 mm² and 21.2 mm² (AWG sizes 6 to 4)
4646

4747
### Software Requirements
4848

4949
- [Arduino IDE 2.0+](https://www.arduino.cc/en/software) or [Arduino Web Editor](https://create.arduino.cc/editor)
50-
- If you choose an offline Arduino IDE, you must install the following libraries via the Library Manager: [**ArduinoRS485**](https://github.com/arduino-libraries/ArduinoRS485) and [**ArduinoModbus**](https://github.com/arduino-libraries/ArduinoModbus).
50+
- If you choose an offline Arduino IDE, you must install the following libraries via the IDE's Library Manager: [**ArduinoRS485**](https://github.com/arduino-libraries/ArduinoRS485) and [**ArduinoModbus**](https://github.com/arduino-libraries/ArduinoModbus).
5151
- [Modbus TCP example code](assets/Opta_Modbus_TCP_Example.zip)
5252

5353
## Modbus Protocol
5454

55-
Modbus is a widely used, open, and royalty-free serial communication protocol based on a client/server architecture. It is commonly known in industrial electronic devices, such as Building Management Systems (BMS) and Industrial Automation Systems (IAS).
55+
Modbus is a widely used, open, and royalty-free serial communication protocol based on a client/server architecture. It is commonly used in industrial electronic devices, such as Building Management Systems (BMS) and Industrial Automation Systems (IAS). BMS include HVAC control systems, lighting control systems, and fire alarm systems; IAS examples include manufacturing process control, robotic automation, and assembly line management.
5656

5757
Developed by Modicon (now Schneider Electric) in 1979, Modbus has become a standard communication protocol for industrial electronic devices, particularly those using programmable logic controllers (PLCs).
5858

59-
The Modbus protocol is frequently used to connect supervisory devices with Remote Terminal Units (RTUs) in Supervisory Control and Data Acquisition (SCADA) systems. Modbus ensures reliable communication between electronic devices through simple 16-bit messages with a Cyclic Redundant Checksum (CRC) for error-checking.
59+
The Modbus protocol is frequently used to connect supervisory devices with Remote Terminal Units (RTUs) in Supervisory Control and Data Acquisition (SCADA) systems. Modbus ensures reliable communication between electronic devices through simple 16-bit messages, including a Cyclic Redundancy Check (CRC) for error-checking.
6060

61-
For more information on the Modbus protocol, check out the [Modbus article](https://docs.arduino.cc/learn/communication/modbus) complying with Opta™.
61+
For more information on the Modbus protocol, check out this [Modbus article](https://docs.arduino.cc/learn/communication/modbus).
6262

6363
## Modbus TCP
6464

65-
The Modbus protocol is a messaging service that uses Client/Server or Controller/Peripheral communications. It keeps its data handling separate from its transmission method as an *application protocol*.
65+
The Modbus protocol is a messaging service that uses Client/Server or Controller/Peripheral communications. As an *application protocol*, it keeps its data handling separate from its transmission method.
6666

6767
**Modbus over TCP/IP**, commonly known as **Modbus TCP**, is a variant of the Modbus RTU protocol. It uses the TCP/IP interface over Ethernet for data transfer between compatible devices. Here are some key points about Modbus TCP:
6868

@@ -95,27 +95,25 @@ Install the latest versions of the following libraries required for Modbus TCP c
9595
- [**ArduinoModbus**](https://github.com/arduino-libraries/ArduinoModbus)
9696
- [**ArduinoRS485**](https://github.com/arduino-libraries/ArduinoRS485)
9797

98-
You can easily install them through the Library Manager in the Arduino IDE. The Library manager can be accessed using the **"ctrl + shift+ i"** shortcut, by going to **Tools > Manage Libraries...**, or by navigating the left panel of the Arduino IDE and selecting the third option from the top.
99-
100-
These two libraries are required for properly working Modbus TCP communication, as the [**ArduinoModbus**](https://github.com/arduino-libraries/ArduinoModbus) library depends on the [**ArduinoRS485**](https://github.com/arduino-libraries/ArduinoRS485) library.
98+
You can easily install the libraries through the Library Manager of the Arduino IDE. The IDE's Library manager can be accessed using the **ctrl+shif+i** shortcut, by navigating to **Tools > Manage Libraries...**, or by navigating to the IDE's left panel and selecting the Library Manager icon (third option from the top).
10199

102100
### Connecting the Opta™ Over Ethernet LAN
103101

104-
Set up the connection by attaching the Ethernet LAN (RJ-45) cable to both devices using the `ETH RJ45` port. The following image provides a connection diagram for both devices:
102+
Set up the connection by attaching the Ethernet LAN (RJ-45) cable to both devices using the `ETH RJ45` port. The image below shows how to connect both devices:
105103

106104
![Connecting two Opta™ devices via Ethernet cable with RJ45 connector](assets/opta-modbus-connection.png)
107105

108-
The setup in the diagram includes an optional Ethernet switch that connects and monitors both Opta™ devices using the Arduino IDE. This configuration with the Ethernet switch can be used for this tutorial, and it can be expanded to include other devices that support Modbus TCP.
106+
The setup in the image above includes an optional Ethernet switch that connects and monitors both Opta™ devices using the Arduino IDE. This configuration with the Ethernet switch can be used for this tutorial, but it can also be expanded to include other devices that support Modbus TCP.
109107

110108
### Code Overview
111109

112110
The following example aims to configure and use the Modbus TCP communication protocol over the Ethernet interface between two Opta™ devices.
113111

114112
Modbus is a well-known client-server protocol for its reliability. The Modbus client is responsible for sending requests, and the Modbus server provides the requested information when available. Multiple Modbus servers can be present, but only one Modbus client can be active.
115113

116-
In this example, one Opta™ device will be assigned as a client to handle writing coil values. A secondary Opta™ device will perform as a server, polling for Modbus TCP requests and returning the appropriate values. The status LED #1 output will be a visual indicator for the Opta™ server.
114+
One Opta™ device will be assigned as a client to handle writing coil values in this example. A secondary Opta™ device will perform as a server, polling for Modbus TCP requests and returning the appropriate values. The status LED 1 output will be a visual indicator for the Opta™ server.
117115

118-
You can access the complete example code below. Compile and upload each example to the appointed Opta™ as you follow along with the following sections.
116+
The complete code for both devices, the client and server, are shown below. Compile and upload each example to the appointed Opta™ as you follow along with the following sections.
119117

120118
#### Modbus TCP Client
121119

@@ -318,9 +316,7 @@ Once the Modbus TCP Client and Server code for each Opta™ device has been uplo
318316

319317
## Conclusion
320318

321-
This tutorial shows how to use the Arduino ecosystem's `ArduinoRS485` and `ArduinoModbus` libraries and the Arduino IDE to implement the Modbus TCP protocol between two Opta™ devices. These libraries are essential for allowing connections with Modbus TCP compliant devices.
322-
323-
With these examples, you can easily understand how to establish Modbus TCP communication between a Server and a Client using Opta™. This setup is scalable for connecting additional Modbus Server devices, such as another Opta™ or a Modbus TCP compatible module.
319+
This tutorial shows how to use the Arduino ecosystem tools to implement the Modbus TCP protocol between two Opta™ devices. With these examples, you can easily understand how to establish Modbus TCP communication between two Opta devices acting as a Server and a Client. This setup is scalable for connecting additional Modbus Server devices, such as another Opta™ or a Modbus TCP compatible module.
324320

325321
### Next Steps
326322

0 commit comments

Comments
 (0)