Skip to content

[PXCT-108] PLC IDE: Documentation Resources Update for 1.0.7 Version #2371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ With this overview complete, we can now create an example.

### Setting Up the Arduino PLC IDE

To get the Arduino PLC IDE software, go to the [official software website ](https://www.arduino.cc/pro/software-plc-ide)and choose to download the PLC IDE installer file. The software is named **`Arduino PLC IDE Installer`**.
To get the Arduino PLC IDE software, go to the [official software website](https://www.arduino.cc/pro/software-plc-ide) and choose to download the PLC IDE installer file. The software is named **`Arduino PLC IDE Installer`**.

![Arduino PLC IDE Software Download Section](assets/plcide_software_download.png)

Expand Down Expand Up @@ -122,7 +122,7 @@ We highly recommend reviewing [this tutorial](https://docs.arduino.cc/tutorials/

#### Portenta Machine Control Basic Configuration

Identify the IP address assigned to each Portenta Machine Control device to establish Modbus TCP communication. Connecting the Portenta Machine Control to a computer via an RJ-45 cable and an Ethernet port with standard settings will automatically assign an IP address from an external *DHCP* server. Tools like this [scanner](https://angryip.org/) can be useful for locating these auto-assigned IP addresses.
Identify the IP address assigned to each Portenta Machine Control device to establish Modbus TCP communication. Connecting the Portenta Machine Control to a network infrastructure via an RJ-45 cable and an Ethernet port with standard settings will automatically assign an IP address from an external *DHCP* server. Tools like this [scanner](https://angryip.org/) can be useful for locating these auto-assigned IP addresses.

You can also assign a custom IP address to the Portenta Machine Control using the **Ethernet.begin()** method. This is helpful when you need specific addresses because of operational needs. To do this, we will use the sketch available in the `Resources` tab of the PLC IDE. The image below provides an overview of the setup options within the sketch.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -204,20 +204,15 @@ Go to the **sketch editor** and uncomment the library and setup function code li
In this case the following configurations are used:

```arduino
// Enable usage of EtherClass, to set static IP address and other
#include <PortentaEthernet.h>
arduino::EthernetClass eth(&m_netInterface);

void setup()
{
// Configure static IP address
IPAddress ip(10, 0, 0, 227); // Opta IP address
IPAddress dns(10, 0, 0, 1); // gateway IP address
IPAddress gateway(10, 0, 0, 1); // gateway IP address
IPAddress subnet(255, 255, 255, 0);
IPAddress ip(10, 0, 0, 227);
IPAddress dns(10, 0, 0, 1);
IPAddress gateway(10, 0, 0, 1);
IPAddress subnet(255, 255, 255, 0);
// If cable is not connected this will block the start of PLC with about 60s of timeout!
eth.begin(ip, dns, gateway, subnet);

Ethernet.begin(ip, dns, gateway, subnet);
}
```
![Network settings for Modbus TCP](assets/ip-setup-opta.png)
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 20 additions & 19 deletions content/software/plc-ide/tutorials/05.modbus-setup/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ The Arduino Portenta Machine Control (PMC) is a fully-centralized, low-power, in
In order to configure the Portenta Machine Control you will need to connect to the device through the Arduino PLC IDE.

1. Connect the device to the computer through USB
2. Click "Connect to the target" button on the PLC IDE
2. Click **Connect to the target** button on the PLC IDE

***The device needs to be activated with a license, check the steps on the [PLC IDE Set-up tutorial](./plc-ide-setup-license)***
***The device needs to be activated with a license, check the steps on the [PLC IDE Set-up tutorial](./plc-ide-setup-license).***

***Both Modbus RTU and Modbus TCP can run at the same time in parallel***

Expand All @@ -41,9 +41,9 @@ In order to configure the Portenta Machine Control you will need to connect to t

### Modbus RTU Configuration

Inside the Arduino PLC IDE navigate to the left side panel and click on the "Resources" tab.
Inside the Arduino PLC IDE navigate to the left side panel and click on the **Resources** tab.

To configure the Modbus communication click on the "RS485 Serialport" label, it will open a new window in the middle to customize:
To configure the Modbus communication click on the **RS485 Serialport** label, it will open a new window in the middle to customize:

![Arduino PLC IDE Resources panel, -> RS-485 settings](assets/PLC-IDE-ModBus.png)

Expand All @@ -54,15 +54,12 @@ Then you can attach some functions to the Generic Modbus item, they will appear
![Modbus catalog select new item](assets/modbusCatalog-add-prompt.png)

#### Mode
<br></br>

* Not used
* Modbus RTU Master
* Modbus RTU Slave

#### Baud Rate
<br></br>


Baud rate, options:
* 600
Expand All @@ -76,28 +73,26 @@ Baud rate, options:
* 115200

#### Serial Mode
<br></br>

| Name | Parity | data bits | stop bits |
| ------- | ----------- | --------- | ----------|
| N, 8, 1 | No parity | 8 | 1 |
| E, 8, 1 | Even parity | 8 | 1 |
| O, 8, 1 | Odd parity | 8 | 2 |
| N, 8, 2 | No parity | 8 | 2 |
| O, 8, 2 | Odd parity | 8 | 2 |
| **Name** | **Parity** | **data bits** | **stop bits** |
|----------|-------------|---------------|---------------|
| N, 8, 1 | No parity | 8 | 1 |
| E, 8, 1 | Even parity | 8 | 1 |
| O, 8, 1 | Odd parity | 8 | 2 |
| N, 8, 2 | No parity | 8 | 2 |
| O, 8, 2 | Odd parity | 8 | 2 |

#### Slave Settings
<br></br>

(Only available on slave mode)

* Modbus address
Address of the device: from 1 to 247. It can not be repeated within the same Modbus net.

#### Modbus Node Configuration
<br></br>

Once you have configured your device as a **Modbus Master** you can attach some blocks to configure it, you can see them while you have the **RS485 SerialPort** on the **Catalog Tile Window**
Once you have configured your device as a **Modbus Master** you can attach some blocks to configure it, you can see them while you have the **RS485 SerialPort** on the **Catalog Tile Window**:

![Modbus catalog](assets/modBusCatalog.png)

* Generic Modbus
Expand Down Expand Up @@ -127,11 +122,14 @@ Then you can attach some functions to the Generic Modbus item, they will appear
Settings:
* Name
* IP address
* Modbus address
* Minimum polling time
* Address type

## Modbus Parametrization

On the Generic
On the Generic:

![Generic Modbus Parametrization Tab](assets/modbusParametrization.png)

## Modbus Devices Functions (Modbus FC)
Expand All @@ -146,13 +144,16 @@ On the Generic
* Modbus FC-16: Write multiple registers

To configure the block you can click on it and it will show the configuration panel on the main window.

![Modbus item catalog](assets/genericModbus-catalog.png)

Inside each of the "devices" (functions) you can set its:

**General**
* Start address
* Polling time
* Time Out
* Oneshot variable

![Modbus item general configuration](assets/genericModbus-catalog-setting-general.png)

Expand Down
Loading