Skip to content

Commit 2710d6b

Browse files
committed
Tutorial content fitment update
1 parent 0bc51eb commit 2710d6b

File tree

3 files changed

+38
-52
lines changed

3 files changed

+38
-52
lines changed

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-modbus-rtu-plc-ide/assets/plcide_software_download.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-modbus-rtu-plc-ide/content.md

Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ libraries:
77
url: https://www.arduino.cc/reference/en/libraries/arduinomodbus
88
difficulty: intermediate
99
tags:
10-
- Getting-started
11-
- ModbusRTU
10+
- Modbus RTU
1211
software:
1312
- plc-ide
1413
hardware:
@@ -35,7 +34,7 @@ In this tutorial, you will discover how to establish Modbus RTU communication be
3534
### Hardware Requirements
3635

3736
- [Portenta Machine Control](https://store.arduino.cc/collections/pro-family) (x2)
38-
- USB-C® cable (x2)
37+
- [Micro USB cable](https://store.arduino.cc/products/usb-2-0-cable-type-a-micro) (x2)
3938
- Wire with either specification for RS-485/RS-422 connection (x3):
4039
- STP/UTP 24-18AWG (Unterminated) 100-130Ω rated
4140
- STP/UTP 22-16AWG (Terminated) 100-130Ω rated
@@ -44,8 +43,7 @@ In this tutorial, you will discover how to establish Modbus RTU communication be
4443

4544
### Software Requirements
4645

47-
- [Arduino PLC IDE Tools](https://www.arduino.cc/en/software#arduino-plc-ide)
48-
- [Arduino PLC IDE software](https://www.arduino.cc/en/software#arduino-plc-ide)
46+
- [Arduino PLC IDE Installer](https://www.arduino.cc/en/software#arduino-plc-ide)
4947
- If you have a Portenta Machine Control, you will need a unique PLC IDE License key for your device. Get your license key [here](https://store.arduino.cc/products/plc-key-portenta-machine-control). Go to section [__License Activation with Product Key (Portenta Machine Control)__](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license#6-license-activation-with-product-key-portenta-machine-control) to know more.
5048
- [Portenta Machine Control Modbus RTU PLC IDE Project Example File](assets/ModbusRTU_PMC_Example.zip)
5149

@@ -69,13 +67,13 @@ The entire procedure is divided into three distinct stages:
6967

7068
* __Modbus RTU Configuration__ serves as the initial step, wherein we configure the Portenta Machine Control device with Modbus RTU and other inherent properties.
7169

72-
In this phase, the role of the Portenta Machine Control device as either a Client or Server within Modbus RTU is specified. It includes settings such as 'Port type', 'Baud rate', and 'Serial Mode', which are crucial for the communication protocol.
70+
In this phase, the role of the Portenta Machine Control device as either a Client or Server within Modbus RTU is specified. It includes settings such as *Port type*, *Baud rate*, and *Serial Mode*, which are crucial for the communication protocol.
7371

74-
Depending on the device's role within Modbus RTU, we either outline the 'Status variables' or define the Modbus node to identify the devices communicating under this protocol.
72+
Depending on the device's role within Modbus RTU, we either outline the 'Status variables' or define the Modbus node to identify the devices communicating under this protocol.
7573

76-
* __PLC Program__, is created post-device configuration, integrating Modbus RTU and other functionalities. An essential aspect of this stage is removing the need for detailed Modbus RTU configurations within the PLC code.
74+
* __PLC Program__ is created as a post-device configuration, integrating Modbus RTU and other functionalities. An essential aspect of this stage is removing the need for detailed Modbus RTU configurations within the PLC code.
7775

78-
The setup is user-friendly. The system autonomously manages Modbus RTU data exchange by referencing predefined variables in the PLC code. Such an approach leverages the device's initial configuration, reducing redundancy and ensuring efficient communication.
76+
The setup is user-friendly. The system autonomously manages Modbus RTU data exchange by referencing predefined variables in the PLC code. Such an approach leverages the device's initial configuration, reducing redundancy and ensuring efficient communication.
7977

8078
* __System Operation__ showcases the expected results after Modbus RTU setup and the PLC program's execution based on the developer's logic. As an outcome, the device can be seen communicating with its counterparts via Modbus RTU.
8179

@@ -89,16 +87,13 @@ With this broader perspective, we are ready to delve into the details.
8987

9088
### Setting Up the Arduino PLC IDE
9189

92-
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`.
9391

94-
- [Arduino PLC IDE Tools](https://www.arduino.cc/en/software#arduino-plc-ide)
95-
- [Arduino PLC IDE](https://www.arduino.cc/en/software#arduino-plc-ide)
92+
![Arduino PLC IDE Software Download Section](assets/plcide_software_download.png)
9693

97-
![Arduino PLC IDE Software Download Section](assets/plcide_software_download.svg)
94+
The software requires **Windows 10** or a newer operating system version for the x64 architecture.
9895

99-
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.
100-
101-
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.
10297

10398
***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.***
10499

@@ -124,7 +119,7 @@ The Portenta Machine Control has integrated RS-485 120 Ω differential cable ter
124119

125120
### Workspace Pre-Configuration
126121

127-
Some considerations must be considered beforehand to properly enable and use Modbus RTU on Portenta Machine Control using PLC IDE for appropriate Modbus RTU operation. The following subsections will briefly explain such aspects.
122+
Before properly enabling and using Modbus RTU on Portenta Machine Control, some considerations must be considered before using PLC IDE for appropriate Modbus RTU operation. The following subsections will briefly explain such aspects.
128123

129124
***It is recommendable to check out [this tutorial](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-ide-setup-license#3-project-setup) to familiarize with Arduino PLC IDE environment.***
130125

@@ -138,13 +133,13 @@ Portenta Machine Control can be initialized further in the process if additional
138133

139134
#### Modbus RTU Client and Server Mode
140135

141-
The PLC IDE software allows setting the Portenta Machine Control as either a Modbus RTU Client, Server or none of the previous modes. It also provides a *Port type* option to set to use RS-485 (For Half-Duplex mode) or RS-422 (For Full-Duplex mode) interface. The option is configurable under `RS485 SerialPort` listed within the `Resources` tab. The provided instructions are set to use the RS-485 interface, Half-Duplex mode.
136+
The PLC IDE software allows the Portenta Machine Control to be set as either a Modbus RTU Client, Server or none of the previous modes. It also provides a *Port type* option to use the RS-485 (Half-duplex mode) or RS-422 (Full-duplex mode) interface. The option is configurable under `RS485 SerialPort` listed within the `Resources` tab. The provided instructions are set to use the RS-485 interface, Half-Duplex mode.
142137

143138
The Portenta Machine Control 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:
144139

145-
- Parity: No Parity, Even Parity, Odd Parity
146-
- Data Bits: 8 Data Bits (Only option for Data Bits)
147-
- Stop Bits: 1 - 2 Stop Bits
140+
- **Parity**: No Parity, Even Parity, Odd Parity
141+
- **Data Bits**: 8 Data Bits (Only option for Data Bits)
142+
- **Stop Bits**: 1 - 2 Stop Bits
148143

149144
Alternatively, the Portenta Machine Control 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`.
150145

@@ -184,32 +179,32 @@ To create a live handshake verification procedure between two Portenta Machine C
184179

185180
Using the counter data from the 'Modbus RTU Server Portenta Machine Control', the 'Modbus RTU Client Portenta Machine Control' manages the programmable digital I/Os and digital outputs. Each Portenta Machine Control is assigned a simple task using the abovementioned elements. You will learn to configure the Modbus RTU role for each Portenta Machine Control device using the sections dedicated to each role.
186181

187-
You may access the entire example project [here](assets/ModbusRTU_PMC_Example.zip) if you want to test it immediately. Every setting and component is ready to be assembled and uploaded to the corresponding Portenta Machine Control.
182+
If you want to test it immediately, you may access the entire example project [here](assets/ModbusRTU_PMC_Example.zip). Every setting and component is ready to be assembled and uploaded to the corresponding Portenta Machine Control.
188183

189184
The following sections will demonstrate how to set up each Portenta Machine Control according to its function in a Modbus RTU connection.
190185

191186
#### Modbus RTU Server Portenta Machine Control
192187

193188
To configure the Portenta Machine Control as a Modbus RTU Server, navigate to the `RS485 SerialPort` tab in the `Resources` panel within the PLC IDE. It will open a `Modbus Configuration` window where you should choose the `Modbus RTU Slave` setting. For the tutorial example, we will employ the following properties for the server Portenta Machine Control:
194189

195-
- Port type: `RS485`
196-
- Baud Rate: 19200 b/s
197-
- Serial Mode: N,8,1 (No parity, 8 data bits, 1 stop bit)
198-
- Slave settings (Modbus address): 10
190+
- **Port type**: `RS485`
191+
- **Baud Rate**: 19200 b/s
192+
- **Serial Mode**: N,8,1 (No parity, 8 data bits, 1 stop bit)
193+
- **Slave settings (Modbus address)**: 10
199194

200195
![Arduino PLC IDE - Portenta Machine Control Server Modbus Configuration](assets/pmc_plcide_server_modbus.png)
201196

202197
Alternative values can be used per requirements if needed.
203198

204-
The subsequent image displays the `Status variables (volatile)` window. We will define the `counter_stack` variable within this window, specifying its access address and data type for Modbus RTU transmission.
199+
The subsequent image displays the `Status variables (volatile)` window. In this window, we will define the `counter_stack` variable, specifying its access address and data type for Modbus RTU transmission.
205200

206201
![Arduino PLC IDE - Portenta Machine Control Server Status Variable](assets/pmc_plcide_server_statVar.png)
207202

208203
The `counter_stack` status variable uses the following parameters:
209204

210-
* Address: 25000 (dec) / 0x61A8 (hex)
211-
* Name: cnt
212-
* PLC type: INT
205+
* **Address**: 25000 (dec) / 0x61A8 (hex)
206+
* **Name**: cnt
207+
* **PLC type**: INT
213208

214209
After finishing the settings, go to `Resources -> Portenta Machine Control` and select the corresponding port, beginning the `Manual sketch download` process. Navigate to `On-line -> Set up Communication` and activate Modbus RTU, ensuring that the elevated USB port number designated for the Portenta Machine Control is selected.
215210

@@ -267,21 +262,21 @@ Upon completing these steps, you will have effectively set up a Portenta Machine
267262

268263
To configure the Portenta Machine Control as a Modbus RTU Client, navigate to the `RS485 SerialPort` tab in the `Resources` section of the PLC IDE. This action will reveal the `Modbus Configuration` panel, where you should choose the `Modbus RTU Master` setting. For the tutorial example, set the client Portenta Machine Control with these specifications:
269264

270-
- Port type: `RS485`
271-
- Baud Rate: 19200 b/s
272-
- Serial Mode: N,8,1 (No parity, 8 data bits, 1 stop bit)
265+
- **Port type**: `RS485`
266+
- **Baud Rate**: 19200 b/s
267+
- **Serial Mode**: N,8,1 (No parity, 8 data bits, 1 stop bit)
273268

274269
![Arduino PLC IDE - Portenta Machine Control Client Modbus Configuration](assets/pmc_plcide_client_modbus.png)
275270

276271
Alternative values can be used per requirements if needed.
277272

278273
To establish communication with the pre-configured Modbus RTU Server Portenta Machine Control, add a Modbus node by right-clicking the `RS485 SerialPort` tab within the `Resources` section. Once ready, you will see an 'Add' option. Use this to insert a 'Generic Modbus' node. For this example, configure the node with the following parameters:
279274

280-
* Name: PMC_RTU_1
281-
* Modbus address: 10
282-
* Minimum polling time: 1 ms
283-
* Address type: Modbus
284-
* Swap words mode: Little-endian compliant (No words swapping)
275+
* **Name**: PMC_RTU_1
276+
* **Modbus address**: 10
277+
* **Minimum polling time**: 1 ms
278+
* **Address type**: Modbus
279+
* **Swap words mode**: Little-endian compliant (No words swapping)
285280

286281
Use the configuration model applied to the Modbus RTU Server Portenta Machine Control for these settings. The vital detail to consider is the Modbus address. Ensure this address corresponds with the server Portenta Machine Control or any other compatible device in case more nodes are added. The setup should resemble the image provided:
287282

@@ -299,7 +294,7 @@ To retrieve the counter data from the server Portenta Machine Control, select th
299294

300295
![Arduino PLC IDE - Modbus Functions](assets/pmc_plcide_modbus_functions.png)
301296

302-
Next, you will need to assign a variable to hold the counter data captured from the server Portenta Machine Control. Go to the `Input Reg.` tab in the Modbus function configuration menu to do this. Create a variable named `counter_rec` to store the data sent via the protocol.
297+
Next, you will need to assign a variable to hold the counter data captured from the server Portenta Machine Control. Go to the Modbus function configuration menu's `Input Reg.` tab to do this. Create a variable named `counter_rec` to store the data sent via the protocol.
303298

304299
The following image shows a visual representation of the anticipated configuration:
305300

@@ -373,15 +368,15 @@ Finally, Portenta Machine Control is now ready as a Modbus RTU Client.
373368

374369
You can access the complete example project [here](assets/ModbusRTU_PMC_Example.zip). You can download the compressed file, extract it, and use the pre-configured example project for your Portenta Machine Control devices.
375370

376-
Set both Portenta Machine Control devices running with the corresponding main PLC code with the hardware setup explained in [this section](#hardware-setup).
371+
Set both Portenta Machine Control devices to run with the corresponding main PLC code, with the hardware setup explained in [this section](#hardware-setup).
377372

378373
The following short clip briefly shows the expected behavior of the example project.
379374

380375
![Example Project Result](assets/pmc_plcide_rtu_example_result.gif)
381376

382377
The server Portenta Machine Control (on the right side) will:
383378

384-
- Execute a binary counter with digital outputs working as visual indicators within an 8-bit boundary.
379+
- Execute a binary counter with digital outputs as visual indicators within an 8-bit boundary.
385380
- Increase the shared Modbus counter variable each time the 8-bit binary counter completes a cycle.
386381
- Adjust the binary counter's speed by modifying buffer variables according to the desired values.
387382

@@ -397,6 +392,6 @@ In this tutorial, you have learned to configure the workspace environment to wor
397392

398393
### Next Steps
399394

400-
Now that you have learned to implement the Modbus RTU between Portenta Machine Control devices using Arduino PLC IDE, try adding additional Modbus RTU-compatible devices and creating a Modbus RTU communication network.
395+
Now that you have learned to implement the Modbus RTU between Portenta Machine Control devices using Arduino PLC IDE try adding additional Modbus RTU-compatible devices and creating a Modbus RTU communication network.
401396

402-
Further, explore the possibilities by combining the Portenta Machine Control device's onboard features with the Modbus RTU communication network and deploy it as an enhancement solution for industrial management systems.
397+
Further, the possibilities can be explored by combining the Portenta Machine Control device's onboard features with the Modbus RTU communication network and deploying it to enhance industrial management system solutions.

0 commit comments

Comments
 (0)