Skip to content

Commit 50b1273

Browse files
committed
User manual RTU content update w/ Graphics
1 parent eae5098 commit 50b1273

File tree

3 files changed

+8
-20
lines changed

3 files changed

+8
-20
lines changed

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/user-manual/content.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,25 +1434,15 @@ You should see the four onboard LEDs of the Opta™ device turn on and off, as s
14341434

14351435
![Onboard LEDs of an Opta™ device controlled by a Portenta Machine Control device via Modbus TCP](assets/rtu-blink.gif)
14361436

1437-
The following example shows how to establish Modbus RTU communication between two Portenta Machine Control devices. Since Portenta Machine Control supports half-duplex and full-duplex modes, each mode requires a different wiring setup.
1437+
The following example shows how to establish Modbus RTU communication between **two Portenta Machine Control devices**. Since Portenta Machine Control supports half-duplex and full-duplex modes, each mode requires a different wiring setup.
14381438

14391439
We will begin showing **Full-Duplex mode** example following the connection diagram below between two Portenta Machine Control devices:
14401440

1441-
TODO Update image with two PMC in full-duplex wiring
1441+
![Modbus RTU (Full-Duplex) between two Portenta Machine Control](assets/modbus-full-rtu-pmcs.png)
14421442

1443-
![Modbus RTU (Full-Duplex) between two Portenta Machine Control](assets/modbus-rtu.png)
1444-
1445-
The following script assigns a Portenta Machine Control as a Client device, which sends four coils to the Server Portenta Machine Control.
1443+
The following script assigns a Portenta Machine Control as a Client device, which sends four coil values to the Portenta Machine Control assigned as a Server.
14461444

14471445
```arduino
1448-
/*
1449-
Portenta's Machine Control Modbus RTU Client Example
1450-
Name: portenta_machine_control_modbus_rtu_client_led_control.ino
1451-
Purpose: Demonstrates controlling Modbus RTU coils using a
1452-
Portenta Machine Control device.
1453-
@author Arduino PRO Content Team
1454-
@version 1.0 01/10/23
1455-
*/
14561446
// Include the necessary libraries
14571447
#include <Arduino_PortentaMachineControl.h>
14581448
#include <ArduinoRS485.h>
@@ -1530,13 +1520,13 @@ void loop() {
15301520
}
15311521
```
15321522

1533-
Because the Portenta Machine Control is operating in Full-Duplex mode, the following line is essential and must be included within the code to enable Full-Duplex mode:
1523+
Because the Portenta Machine Control is operating in **Full-Duplex mode**, the following line of code is essential and must be included within the code to enable Full-Duplex mode:
15341524

15351525
```arduino
15361526
MachineControl_RS485Comm.setFullDuplex(true);
15371527
```
15381528

1539-
The Server Portenta Machine Control uses the script below, which translates received coils into corresponding Digital Outputs. It will blink four Digital Outputs accordingly in a timely manner.
1529+
The Server Portenta Machine Control uses the script below, which translates received coil values into corresponding Digital Outputs. It will blink four Digital Outputs accordingly in a timely manner.
15401530

15411531
```arduino
15421532
// Include the necessary libraries
@@ -1642,17 +1632,15 @@ With this, we have two Portenta Machine Control devices, each assigned as a Clie
16421632

16431633
Alternatively, to establish communication between two Portenta Machine Control with Modbus RTU in **Half-Duplex mode**, the following wiring setup is required:
16441634

1645-
TODO Update image with two PMC in half-duplex wiring
1646-
1647-
![Modbus RTU (Half-Duplex) between two Portenta Machine Control](assets/modbus-rtu.png)
1635+
![Modbus RTU (Half-Duplex) between two Portenta Machine Control](assets/modbus-half-rtu-pmcs.png)
16481636

1649-
Previous examples can be used in half-duplex mode, and it requires only one minor change in the following line:
1637+
Previous examples can be used in half-duplex mode, and it requires only one minor change in the following line of code:
16501638

16511639
```arduino
16521640
MachineControl_RS485Comm.setFullDuplex(false);
16531641
```
16541642

1655-
The line can be updated to disable *Full-Duplex* mode or to ignore the corresponding process by commenting the line. Thus, with the complementary wiring setup and code changes, two devices will begin communicating with Modbus RTU in half-duplex mode.
1643+
The line can be updated to disable *Full-Duplex* mode or to ignore the corresponding process by commenting the line. Thus, with the complementary wiring setup and minor code changes, two devices will begin communicating with Modbus RTU in half-duplex mode.
16561644

16571645
#### Modbus TCP
16581646

0 commit comments

Comments
 (0)