Skip to content

Commit 1a96623

Browse files
committed
Reverting content to fit to 1_0_3 PLC IDE ENV
1 parent 66b6e26 commit 1a96623

File tree

5 files changed

+164
-18
lines changed

5 files changed

+164
-18
lines changed
Loading

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-modbus-tcp-plc-ide/assets/pmc_plcide_hardware_connection_eth.svg

Lines changed: 86 additions & 0 deletions
Loading

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-modbus-tcp-plc-ide/assets/pmc_plcide_modbustcp_overview.svg

Lines changed: 57 additions & 0 deletions
Loading

content/hardware/05.pro-solutions/solutions-and-kits/portenta-machine-control/tutorials/pmc-modbus-tcp-plc-ide/content.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ hardware:
1919

2020
Portenta Machine Control is characterized by its industrial-grade hardware, which provides consistent performance and durability even in the most demanding conditions. A notable feature of its design is the provision of various connectivity options, emphasizing Modbus TCP via the RJ-45 port.
2121

22-
![General Modbus TCP System Model with Portenta Machine Control & PLC IDE](assets/pmc_plcide_modbustcp_overview.png)
22+
![General Modbus TCP System Model with Portenta Machine Control & PLC IDE](assets/pmc_plcide_modbustcp_overview.svg)
2323

2424
In this tutorial, you will learn how to set up Modbus TCP-based communication between two Portenta Machine Controls using the Arduino PLC IDE.
2525

@@ -35,7 +35,7 @@ In this tutorial, you will learn how to set up Modbus TCP-based communication be
3535

3636
- [Portenta Machine Control](https://store.arduino.cc/collections/pro-family) (x2)
3737
- Micro USB cable (x2)
38-
- RJ-45 LAN cable (x2)
38+
- RJ-45 LAN cable (x3)
3939
- Ethernet Switch (Recommended) (x1)
4040

4141
### Software Requirements
@@ -110,9 +110,9 @@ We will use two Portenta Machine Control devices and the PLC IDE to set up the M
110110

111111
The Ethernet LAN (RJ-45) cable makes a physical connection between both devices using the `ETH RJ45` port. The following image provides a connection diagram for both devices:
112112

113-
![General setup for two Portenta Machine Control devices with Ethernet Switch](assets/pmc_plcide_hardware_connection_eth.png)
113+
![General setup for two Portenta Machine Control devices with Ethernet Switch](assets/pmc_plcide_hardware_connection_eth.svg)
114114

115-
The setup uses an Ethernet switch that monitors Portenta Machine Control using the PLC IDE. This configuration not only links both Portenta Machine Control devices using the PLC IDE but also lets you employ a profile to observe information exchanges in real time. We recommend using an Ethernet switch for this tutorial to ensure optimal communication between devices and monitor in real-time.
115+
The setup incorporates an Ethernet switch that monitors Portenta Machine Control using the PLC IDE. This configuration not only links both Portenta Machine Control devices using the PLC IDE but also lets you employ a profile to observe information exchanges in real time. We recommend using an Ethernet switch for this tutorial to ensure optimal communication between devices and monitor in real-time.
116116

117117
### Workspace Pre-Configuration
118118

@@ -128,17 +128,19 @@ We highly recommend reviewing [this tutorial](https://docs.arduino.cc/tutorials/
128128
#### Portenta Machine Control Basic Configuration
129129
<br></br>
130130

131-
To establish Modbus TCP communication, identify the IP address assigned to each Portenta Machine Control device. When you connect the Portenta Machine Control to a computer using an RJ-45 cable via an Ethernet port with standard ethernet settings, it automatically obtains an IP address from the external *Dynamic Host Configuration Protocol (DHCP)* server. To locate these auto-assigned IP addresses, using tools like this [scanner](https://angryip.org/) can prove invaluable.
131+
To establish Modbus TCP communication, identify the IP address assigned to each Portenta Machine Control device. When you connect the Portenta Machine Control to a computer using an RJ-45 cable via an Ethernet port with standard ethernet settings, it automatically obtains an IP address from the external *Dynamic Host Configuration Protocol (DHCP)* server. To locate these auto-assigned IP addresses, utilizing tools like this [scanner](https://angryip.org/) can prove invaluable.
132132

133-
It is also possible to assign a custom IP address with desired properties to the Portenta Machine Control using the __Ethernet.begin()__ method. This approach is handy when specific addresses need to be designated due to particular operational criteria. To achieve this, we will employ the sketch located in the `Resources` tab of the PLC IDE. An attached image offers an overview of the setup possibilities within the sketch.
133+
It is also feasible to assign a custom IP address with desired properties to the Portenta Machine Control using the __Ethernet.begin()__ method. This approach is handy when specific addresses need to be designated due to particular operational criteria. To achieve this, we will employ the sketch located in the `Resources` tab of the PLC IDE. An attached image offers an overview of the setup possibilities within the sketch.
134134

135135
![Portenta Machine Control Manual IP Configuration](assets/pmc_plcide_ipconfig.png)
136136

137137
***The __Ethernet.begin(ip, dns, gateway, subnet)__ method will delay initialization for 60 seconds if either the RJ45 cable is not connected or the Ethernet properties, like the IP address, are misconfigured. This behavior can be modified with the __Ethernet.begin(NULL, ip, dns, gateway, subnet, connection_timeout)__ method by adjusting the `connection_timeout` argument. This parameter defines the timeout for establishing a Data Layer connection.***
138138

139-
The IP address set for the Portenta Machine Control is essential for establishing and developing in the Arduino PLC IDE environment. To pair with the Portenta Machine Control device, activate the Modbus RTU feature and select the highest secondary USB port number by navigating to `On-line -> Set up communication`.
139+
If opting to set the IP address for the Portenta Machine Control manually, it is also necessary to adjust the computer's Ethernet interface in the *IPv4* settings. The information input in the IPv4 configurations should correspond to the gateway settings. A stable connection to the Portenta Machine Control via the PLC IDE is pivotal for successful project execution. Below, an illustrative setup is depicted for the Windows 11 operating system:
140140

141-
TODO Update GIF animation
141+
![Windows IP Manual IP Configuration](assets/plcide_ip_manual_config.png)
142+
143+
The IP address set for the Portenta Machine Control is essential for establishing and developing in the Arduino PLC IDE environment. To pair with the Portenta Machine Control device, activate the Modbus TCP feature and enter its unique IP address by navigating to `On-line -> Set up communication`. To verify the link between the Portenta Machine Control and the development platform, execute the `ping <Portenta Machine Control IP Address>` command in a terminal.
142144

143145
![Arduino PLC IDE - Device Connection Procedure](assets/pmc_plcide_device_connection.gif)
144146

@@ -224,9 +226,9 @@ The subsequent image presents the `Status variables (volatile)` window. In this
224226

225227
The `cnt` status variable uses the following parameters:
226228

227-
* _Address_: 25000 (dec) / 0x61A8 (hex)
228-
* _Name_: cnt
229-
* _PLC type_: INT
229+
* Address: 25000 (dec) / 0x61A8 (hex)
230+
* Name: cnt
231+
* PLC type: INT
230232

231233
To get started with these configurations, navigate to `Resources -> Portenta Machine Control`, select the corresponding port, and begin the `Manual sketch download`. Afterward, go to `On-line -> Set up Communication` and activate the Modbus TCP using the designated IP address for the Portenta Machine Control.
232234

@@ -283,10 +285,10 @@ To configure the Portenta Machine Control as a Modbus TCP Client, access the 'Et
283285

284286
To begin communication with the configured Modbus TCP Server on the Portenta Machine Control, add a Modbus node by right-clicking the 'Ethernet' section within the 'Resources' panel. This action will reveal the 'Add' button. Clicking on it will allow you to introduce a 'Generic Modbus' node. For this example, set the node with the following specific parameters:
285287

286-
* _Name_: PMC_TCP_1
287-
* _IP address_: 192.168.1.2
288-
* _Minimum polling time_: 1 ms
289-
* _Address type_: Modbus
288+
* Name: PMC_TCP_1
289+
* IP address: 192.168.1.2
290+
* Minimum polling time: 1 ms
291+
* Address type: Modbus
290292

291293
The settings for these properties should mirror those for the Modbus TCP Server Portenta Machine Control. The IP address is the most vital configuration to take into account. Ensure that this address matches the one given to the server Portenta Machine Control or any other compatible devices if you add more nodes. The final configuration should resemble the image provided:
292294

@@ -298,9 +300,9 @@ When defining the Modbus node for the Client Portenta Machine Control, it is ess
298300

299301
To retrieve counter information from the server Portenta Machine Control, choose the 'Modbus FC-04 (Read Input Registers)' function. To ensure correct data access, set up the 'General' tab using the subsequent parameters:
300302

301-
* _Start address_: 25000
302-
* _Polling time_: 0 ms (Continuous Read)
303-
* _Timeout_: 1000 ms
303+
* Start address: 25000
304+
* Polling time: 0 ms (Continuous Read)
305+
* Timeout: 1000 ms
304306

305307
![Arduino PLC IDE - Portenta Machine Control Client Modbus Function of the Node](assets/pmc_plcide_client_modbusFunctionConfig.svg)
306308

@@ -313,6 +315,7 @@ The following image shows a visual representation of the expected configuration:
313315
The Modbus TCP Client Portenta Machine Control will use the following Ethernet properties for this example.
314316

315317
```arduino
318+
316319
void setup()
317320
{
318321
// Configure static IP address

0 commit comments

Comments
 (0)