You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/05.pro-solutions/solutions-and-kits/opta/tutorials/getting-started-with-modbus-rtu/content.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ difficulty: intermediate
5
5
tags:
6
6
- Getting started
7
7
- Modbus RTU
8
-
- RS-485
8
+
- RS485
9
9
author: 'José Bagur and Taddy Chung'
10
10
libraries:
11
11
- name: ArduinoRS485
@@ -23,18 +23,18 @@ hardware:
23
23
24
24
## Overview
25
25
26
-
Modbus is an open serial protocol derived from the client/server architecture initially developed and published by Modicon (now Schneider Electric) in 1979 for use with programmable logic controllers (PLCs); since 1979, Modbus has become a standard communications protocol in industrial electronic devices. The Opta™, with its industrial hardware and software capabilities and the Arduino ecosystem tools such as the Arduino IDE and its libraries, can implement this communications protocol. In this tutorial, we will learn how to implement this communications protocol over RS-485 between two Opta™ devices.
26
+
Modbus is an open serial protocol derived from the client/server architecture initially developed and published by Modicon (now Schneider Electric) in 1979 for use with programmable logic controllers (PLCs); since 1979, Modbus has become a standard communications protocol in industrial electronic devices. The Opta™, with its industrial hardware and software capabilities and the Arduino ecosystem tools such as the Arduino IDE and its libraries, can implement this communications protocol. In this tutorial, we will learn how to implement this communications protocol over RS485 between two Opta™ devices.
27
27
28
28
## Goals
29
29
30
-
- Learn how to use the Modbus RTU communications protocol over RS-485 between two Opta™ devices
30
+
- Learn how to use the Modbus RTU communications protocol over RS485 between two Opta™ devices
31
31
32
32
### Required Hardware and Software
33
33
34
34
### Hardware Requirements
35
35
36
-
-[Opta™](https://store.arduino.cc/pages/opta) with RS-485 support (x2)
37
-
- STP/UTP 24-18AWG(Unterminated)/22-16AWG(Terminated) 100-130Ω rated cable for RS-485 connection (x3)
36
+
-[Opta™](https://store.arduino.cc/pages/opta) with RS485 support (x2)
37
+
-Wires with similar specs: STP/UTP 24-18AWG(Unterminated)/22-16AWG(Terminated) 100-130Ω rated cable for RS485 connection (x3)
38
38
- 12VDC/1A DIN rail power supply (x1)
39
39
- USB-C® cable (x1)
40
40
@@ -60,15 +60,15 @@ First, let's ensure we have the latest Arduino IDE version installed on our comp
60
60
61
61
***`ArduinoModbus` library requires the `ArduinoRS485` library as the Modbus library is dependent on it; remember to install both libraries.***
62
62
63
-
### Connecting the Opta™ Over RS-485
63
+
### Connecting the Opta™ Over RS485
64
64
65
-
Now that we have the Arduino IDE configured and the libraries installed, let's connect both Opta™ devices via RS-485, as shown in the image below:
65
+
Now that we have the Arduino IDE configured and the libraries installed, let's connect both Opta™ devices via RS485, as shown in the image below:
66
66
67
-

67
+

68
68
69
69
### Code Overview
70
70
71
-
The objective of the example described below is to configure and use Modbus RTU communications protocol over RS-485 between two Opta™ devices, one acting as a Client and the other acting as a Server. The Client is responsible for writing and reading `Coil`, `Holding`, `Discrete Input`, and `Input` register values. The Server will poll for Modbus RTU requests and return values accordingly to each request. To help you understand better how the example works, we will briefly explain the essential parts of the code used in this tutorial.
71
+
The objective of the example described below is to configure and use Modbus RTU communications protocol over RS485 between two Opta™ devices, one acting as a Client and the other acting as a Server. The Client is responsible for writing and reading `Coil`, `Holding`, `Discrete Input`, and `Input` register values. The Server will poll for Modbus RTU requests and return values accordingly to each request. To help you understand better how the example works, we will briefly explain the essential parts of the code used in this tutorial.
0 commit comments