Skip to content

Commit 937cfc6

Browse files
committed
Opta PMC Modbus TCP tutorial resources update & content minor patch
1 parent 940a1bf commit 937cfc6

File tree

7 files changed

+5
-10
lines changed

7 files changed

+5
-10
lines changed

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

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,15 @@ Go to the **sketch editor** and uncomment the library and setup function code li
204204
In this case the following configurations are used:
205205

206206
```arduino
207-
// Enable usage of EtherClass, to set static IP address and other
208-
#include <PortentaEthernet.h>
209-
arduino::EthernetClass eth(&m_netInterface);
210-
211207
void setup()
212208
{
213209
// Configure static IP address
214-
IPAddress ip(10, 0, 0, 227); // Opta IP address
215-
IPAddress dns(10, 0, 0, 1); // gateway IP address
216-
IPAddress gateway(10, 0, 0, 1); // gateway IP address
217-
IPAddress subnet(255, 255, 255, 0);
210+
IPAddress ip(10, 0, 0, 227);
211+
IPAddress dns(10, 0, 0, 1);
212+
IPAddress gateway(10, 0, 0, 1);
213+
IPAddress subnet(255, 255, 255, 0);
218214
// If cable is not connected this will block the start of PLC with about 60s of timeout!
219-
eth.begin(ip, dns, gateway, subnet);
220-
215+
Ethernet.begin(ip, dns, gateway, subnet);
221216
}
222217
```
223218
![Network settings for Modbus TCP](assets/ip-setup-opta.png)

0 commit comments

Comments
 (0)