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/07.opta/opta-family/opta/tutorials/opta-modbus-rtu-plc-ide/assets/plcide_software_download.svg
- Wire with either specification for RS-485 connection (x3):
39
39
- STP/UTP 24-18AWG (Unterminated) 100-130Ω rated
40
40
- STP/UTP 22-16AWG (Terminated) 100-130Ω rated
41
41
42
42
### Software Requirements
43
43
44
-
-[Arduino PLC IDE Tools](https://www.arduino.cc/en/software#arduino-plc-ide)
45
-
-[Arduino PLC IDE software](https://www.arduino.cc/en/software#arduino-plc-ide)
44
+
-[Arduino PLC IDE Installer](https://www.arduino.cc/en/software#arduino-plc-ide)
46
45
- If you have an Opta™, you do not need any license key to activate your product. Go to section [__License Activation With Pre-Licensed Products (Opta™)__](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license#7-license-activation-with-pre-licensed-products-opta) to know more.
47
46
-[Opta™ Modbus RTU PLC IDE Project Example File](assets/ModbusRTU_Opta_Example.zip)
48
47
@@ -67,14 +66,14 @@ The following diagram illustrates a concise visualization of how Opta™ is conf
67
66
The entire procedure is divided into three distinct stages:
68
67
69
68
*__Modbus RTU Configuration__ is the foundational step in initializing the Opta™ device with Modbus RTU and other intrinsic properties.
70
-
71
-
The Modbus RTU role, Client or Server, is assigned to the Opta™ device during this stage. It includes the 'Baud rate' and 'Serial Mode' configurations, essential for Modbus RTU communication.
72
-
73
-
Based on the device setting within the Modbus RTU, either the 'Status variables' are delineated, or the Modbus node is defined to determine the communicating devices using this protocol.
69
+
70
+
The Modbus RTU role, Client or Server, is assigned to the Opta™ device during this stage. It includes the 'Baud rate' and 'Serial Mode' configurations, which are essential for Modbus RTU communication.
71
+
72
+
Based on the device setting within the Modbus RTU, either the 'Status variables' are delineated, or the Modbus node is defined to determine the communicating devices using this protocol.
74
73
75
74
*__PLC Program__, established after device setup, is based on Modbus RTU and additional features. A significant advantage of this phase is the elimination of intricate configurations or specific programming tied to Modbus RTU within the PLC code.
76
-
77
-
The procedure is designed for ease of use. By simply using predefined variables in the PLC code, the system handles data transfer through Modbus RTU. This approach benefits from the device's prior setup, minimizing repetitive tasks and promoting effective communication.
75
+
76
+
The procedure is designed for ease of use. By simply using predefined variables in the PLC code, the system handles data transfer through Modbus RTU. This approach benefits from the device's prior setup, minimizing repetitive tasks and promoting effective communication.
78
77
79
78
*__System Operation__ represents the anticipated outcome post the Modbus RTU configuration and the execution of the PLC program based on the developer's designed logic. Consequently, we can observe the device communicating with other devices through Modbus RTU.
80
79
@@ -88,16 +87,13 @@ We can now delve into the specifics after providing an overview of the entire pr
88
87
89
88
### Setting Up the Arduino PLC IDE
90
89
91
-
Access the Arduino PLC IDE software by following [Arduino PLC IDE official website](https://www.arduino.cc/pro/software-plc-ide). You will have to download two executable files for proper software installation:
90
+
To get the Arduino PLC IDE software, go to the [official software website of the Arduino PLC IDE](https://www.arduino.cc/pro/software-plc-ide) and choose to download the PLC IDE installer file. The software is named `Arduino PLC IDE Installer`.
92
91
93
-
-[Arduino PLC IDE Tools](https://www.arduino.cc/en/software#arduino-plc-ide)

95
93
96
-

94
+
The software requires **Windows 10** or a newer operating system version for the x64 architecture.
97
95
98
-
The **Arduino PLC IDE Tools** will provide all the required drivers, libraries, and cores for development, while the **Arduino PLC IDE** will install the IDE software.
99
-
100
-
Install the Arduino PLC IDE Tools before the Arduino PLC IDE to avoid potential problems related to old libraries and drivers.
96
+
The Arduino PLC IDE installer contains the IDE and all the required drivers, libraries, and cores. The continuing sections will help you install the Arduino PLC IDE software properly.
101
97
102
98
***For more details regarding Arduino PLC IDE setup, please take a look at [Arduino PLC IDE Setup and Board's License Activation](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-ide-setup-license) tutorial.***
103
99
@@ -129,9 +125,9 @@ The PLC IDE software provides the option to set Opta™ as either a Modbus RTU C
129
125
130
126
Opta™ set as a Modbus RTU Client will provide 'Baud Rate' and 'Serial Mode' settings. The baud rate is available from 600 b/s to 115200 b/s. The serial mode offers a set of options conformed with the following elements:
131
127
132
-
- Parity: No Parity, Even Parity, Odd Parity
133
-
- Data Bits: 8 Data Bits (Only option for Data Bits)
134
-
- Stop Bits: 1 - 2 Stop Bits
128
+
-**Parity**: No Parity, Even Parity, Odd Parity
129
+
-**Data Bits**: 8 Data Bits (Only option for Data Bits)
130
+
-**Stop Bits**: 1 - 2 Stop Bits
135
131
136
132
On the other hand, Opta™ set as a Modbus RTU Server requires an additional configuration called 'Slave Settings'. It will ask you to define the Modbus address with a range between `1 .. 247`.
137
133
@@ -179,9 +175,9 @@ The following sections will demonstrate how to set up each Opta™ according to
179
175
180
176
To set Opta™ as a Modbus RTU Server, navigate to the `RS485 SerialPort` tab in the PLC IDE's `Resources` panel. A window named `Modbus Configuration` will open, and we must select the `Modbus RTU Slave` option. For the tutorial example, we will use the following properties for server Opta™:
181
177
182
-
- Baud Rate: 19200 b/s
183
-
- Serial Mode: N,8,1 (No parity, 8 data bits, 1 stop bit)
184
-
- Slave settings (Modbus address): 10
178
+
-**Baud Rate**: 19200 b/s
179
+
-**Serial Mode**: N,8,1 (No parity, 8 data bits, 1 stop bit)
180
+
-**Slave settings (Modbus address)**: 10
185
181
186
182

187
183
@@ -193,9 +189,9 @@ The following image shows the `Status variables (volatile)` window. Here, we wil
193
189
194
190
The `cnt` status variable uses the following parameters:
195
191
196
-
* Address: 25000 (dec) / 0x61A8 (hex)
197
-
* Name: cnt
198
-
* PLC type: INT
192
+
***Address**: 25000 (dec) / 0x61A8 (hex)
193
+
***Name**: cnt
194
+
***PLC type**: INT
199
195
200
196
With these settings ready, you need to go to `Resources -> Opta`, select the corresponding port, and begin the `Manual sketch download` process. Then you need to go to `On-line -> Set up Communication` and activate Modbus RTU with the higher USB port number assigned for Opta™.
201
197
@@ -227,20 +223,20 @@ Upon completing these steps, you will have successfully configured an Opta™ de
227
223
228
224
To set Opta™ as a Modbus RTU Client, navigate to the `RS485 SerialPort` tab in the PLC IDE's `Resources` panel. The `Modbus Configuration` panel will open, and we must select the `Modbus RTU Master` option. For the tutorial example, we will use the following properties for client Opta™:
229
225
230
-
- Baud Rate: 19200 b/s
231
-
- Serial Mode: N,8,1 (No parity, 8 data bits, 1 stop bit)
226
+
-**Baud Rate**: 19200 b/s
227
+
-**Serial Mode**: N,8,1 (No parity, 8 data bits, 1 stop bit)
232
228
233
229

234
230
235
231
Alternative values can be used per requirements if needed.
236
232
237
233
To establish communication with a configured Modbus RTU Server on an Opta™ device, add a Modbus node by right-clicking the `RS485 SerialPort` tab in the `Resources` panel. After right-clicking, select the 'Add' option that appears. This action will allow you to introduce a 'Generic Modbus' node into the configuration. For this example, configure the node with the following parameters:
238
234
239
-
* Name: Opta_RTU_1
240
-
* Modbus address: 10
241
-
* Minimum polling time: 1 ms
242
-
* Address type: Modbus
243
-
* Swap words mode: Little-endian compliant (No words swapping)
235
+
***Name**: Opta_RTU_1
236
+
***Modbus address**: 10
237
+
***Minimum polling time**: 1 ms
238
+
***Address type**: Modbus
239
+
***Swap words mode**: Little-endian compliant (No words swapping)
244
240
245
241
For these settings, follow the configuration pattern used for the Modbus RTU Server Opta™. The most essential detail to set is the Modbus address. Ensure this address matches the one given to the server Opta™ or any other compatible device should you add more nodes. The setup should resemble the image provided:
246
242
@@ -252,9 +248,9 @@ Once you have established the Modbus node for the client Opta™, it is time to
252
248
253
249
To retrieve counter information from the server Opta™, select the 'Modbus FC-04 (Read Input Registers)' function. The 'General' tab needs to be configured with the following parameters to ensure correct data access:
254
250
255
-
* Start address: 25000
256
-
* Polling time: 0 ms (Continuous Read)
257
-
* Timeout: 1000 ms
251
+
***Start address**: 25000
252
+
***Polling time**: 0 ms (Continuous Read)
253
+
***Timeout**: 1000 ms
258
254
259
255

0 commit comments