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/portenta-machine-control/tutorials/user-manual/content.md
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1434,15 +1434,15 @@ You should see the four onboard LEDs of the Opta™ device turn on and off, as s
1434
1434
1435
1435

1436
1436
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.
1438
1438
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:
1440
1440
1441
1441
TODO Update image with two PMC in full-duplex wiring
1442
1442
1443
1443

1444
1444
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.
1446
1446
1447
1447
```arduino
1448
1448
/*
@@ -1530,13 +1530,13 @@ void loop() {
1530
1530
}
1531
1531
```
1532
1532
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:
1534
1534
1535
1535
```arduino
1536
1536
MachineControl_RS485Comm.setFullDuplex(true);
1537
1537
```
1538
1538
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.
1540
1540
1541
1541
```arduino
1542
1542
// Include the necessary libraries
@@ -1638,19 +1638,21 @@ void loop() {
1638
1638
}
1639
1639
```
1640
1640
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:
1642
1644
1643
1645
TODO Update image with two PMC in half-duplex wiring
1644
1646
1645
1647

1646
1648
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:
1648
1650
1649
1651
```arduino
1650
1652
MachineControl_RS485Comm.setFullDuplex(false);
1651
1653
```
1652
1654
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.
0 commit comments