Skip to content

Commit eae5098

Browse files
committed
Modbus RTU PMCs content update
1 parent 77d8b61 commit eae5098

File tree

1 file changed

+10
-8
lines changed
  • content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/user-manual

1 file changed

+10
-8
lines changed

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,15 +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 next example shows how to establish Modbus RTU communication between two Portenta Machine Control devices. Since Portenta Machine Control supports half-duplex and full-duplex mode, each mode requires 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

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

14411441
TODO Update image with two PMC in full-duplex wiring
14421442

14431443
![Modbus RTU (Full-Duplex) between two Portenta Machine Control](assets/modbus-rtu.png)
14441444

1445-
The following script defines a Portenta Machine Control as a Client device, which sends 4 coils to the Server Portenta Machine Control.
1445+
The following script assigns a Portenta Machine Control as a Client device, which sends four coils to the Server Portenta Machine Control.
14461446

14471447
```arduino
14481448
/*
@@ -1530,13 +1530,13 @@ void loop() {
15301530
}
15311531
```
15321532

1533-
Because the Portenta Machine Control is operating in Full-Duplex mode, the following line is important to enable Full-Duplex mode:
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:
15341534

15351535
```arduino
15361536
MachineControl_RS485Comm.setFullDuplex(true);
15371537
```
15381538

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 timely manner.
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.
15401540

15411541
```arduino
15421542
// Include the necessary libraries
@@ -1638,19 +1638,21 @@ void loop() {
16381638
}
16391639
```
16401640

1641-
To establish communication between two Portenta Machine Control with Modbus RTU in Half-Duplex mode, following wiring setup is required:
1641+
With this, we have two Portenta Machine Control devices, each assigned as a Client and Server correspondingly, communicating with Modbus RTU in full-duplex mode.
1642+
1643+
Alternatively, to establish communication between two Portenta Machine Control with Modbus RTU in **Half-Duplex mode**, the following wiring setup is required:
16421644

16431645
TODO Update image with two PMC in half-duplex wiring
16441646

16451647
![Modbus RTU (Half-Duplex) between two Portenta Machine Control](assets/modbus-rtu.png)
16461648

1647-
Previous examples can be used in Half-Duplex mode and it requires only one minor change in the following line:
1649+
Previous examples can be used in half-duplex mode, and it requires only one minor change in the following line:
16481650

16491651
```arduino
16501652
MachineControl_RS485Comm.setFullDuplex(false);
16511653
```
16521654

1653-
The line can be updated to disable *Full-Duplex* mode or by commenting the line to ignore the corresponding process.
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.
16541656

16551657
#### Modbus TCP
16561658

0 commit comments

Comments
 (0)