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/pmc-opta-modbus-tcp/content.md
+5-10Lines changed: 5 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -204,20 +204,15 @@ Go to the **sketch editor** and uncomment the library and setup function code li
204
204
In this case the following configurations are used:
205
205
206
206
```arduino
207
-
// Enable usage of EtherClass, to set static IP address and other
208
-
#include <PortentaEthernet.h>
209
-
arduino::EthernetClass eth(&m_netInterface);
210
-
211
207
void setup()
212
208
{
213
209
// 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);
218
214
// 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);
221
216
}
222
217
```
223
218

0 commit comments