Skip to content

Commit 3414671

Browse files
committed
User manual content update
1 parent 50b1273 commit 3414671

File tree

1 file changed

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

1 file changed

+8
-3
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,8 @@ Modbus RTU, generally operating in half-duplex mode, with its capability to hand
12361236

12371237
***The Portenta Machine Control has onboard termination resistors; its RS-485 interface can be configured as a half or full duplex.***
12381238

1239+
#### Using a Portenta Machine Control & Opta™
1240+
12391241
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:
12401242

12411243
![Portenta Machine Control and Opta™ Modbus RTU wiring](assets/modbus-rtu.png)
@@ -1434,7 +1436,9 @@ You should see the four onboard LEDs of the Opta™ device turn on and off, as s
14341436

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

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.
14381442

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

@@ -1578,6 +1582,7 @@ void setup() {
15781582
//At startup set all channels to OPEN
15791583
MachineControl_DigitalOutputs.writeAll(0);
15801584
1585+
// Set 7th Digital Output channel ON to show the port has been correctly configured
15811586
MachineControl_DigitalOutputs.write(7, HIGH);
15821587
15831588
// Configure coils for controlling the onboard LEDs
@@ -1634,13 +1639,13 @@ Alternatively, to establish communication between two Portenta Machine Control w
16341639

16351640
![Modbus RTU (Half-Duplex) between two Portenta Machine Control](assets/modbus-half-rtu-pmcs.png)
16361641

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:
16381643

16391644
```arduino
16401645
MachineControl_RS485Comm.setFullDuplex(false);
16411646
```
16421647

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.
16441649

16451650
#### Modbus TCP
16461651

0 commit comments

Comments
 (0)