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
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1236,6 +1236,8 @@ Modbus RTU, generally operating in half-duplex mode, with its capability to hand
1236
1236
1237
1237
***The Portenta Machine Control has onboard termination resistors; its RS-485 interface can be configured as a half or full duplex.***
1238
1238
1239
+
#### Using a Portenta Machine Control & Opta™
1240
+
1239
1241
The example below shows how to enable Modbus RTU communication between a Portenta Machine Control device and an Opta™ device. For wiring both devices, follow the diagram below:
1240
1242
1241
1243

@@ -1434,7 +1436,9 @@ You should see the four onboard LEDs of the Opta™ device turn on and off, as s
1434
1436
1435
1437

1436
1438
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.
1439
+
#### Using two Portenta Machine Controls
1440
+
1441
+
The following example shows how to establish Modbus RTU communication between **two Portenta Machine Control devices**. We will replicate a similar behavior of blinking four LEDs on Opta™ using the Digital Output port of the Portenta Machine Control. Since Portenta Machine Control supports half-duplex and full-duplex modes, each mode requires a different wiring setup.
1438
1442
1439
1443
We will begin showing **Full-Duplex mode** example following the connection diagram below between two Portenta Machine Control devices:
1440
1444
@@ -1578,6 +1582,7 @@ void setup() {
1578
1582
//At startup set all channels to OPEN
1579
1583
MachineControl_DigitalOutputs.writeAll(0);
1580
1584
1585
+
// Set 7th Digital Output channel ON to show the port has been correctly configured
1581
1586
MachineControl_DigitalOutputs.write(7, HIGH);
1582
1587
1583
1588
// Configure coils for controlling the onboard LEDs
@@ -1634,13 +1639,13 @@ Alternatively, to establish communication between two Portenta Machine Control w
1634
1639
1635
1640

1636
1641
1637
-
Previous examples can be used in half-duplex mode, and it requires only one minor change in the following line of code:
1642
+
Previous examples can be used in half-duplex mode, but it wil require one minor change in the following line of code:
1638
1643
1639
1644
```arduino
1640
1645
MachineControl_RS485Comm.setFullDuplex(false);
1641
1646
```
1642
1647
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.
1648
+
By modifying this line, *Full-Duplex mode* is deactivated, or the line can be commented out to bypass this setting altogether. This minor code tweak and the appropriate wiring enable the two units to communicate using Modbus RTU in half-duplex mode.
0 commit comments