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
+16-12Lines changed: 16 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ Here is a detailed guide in video format if you are a visual learner.
42
42
- 24 VDC Power Supply (x2)
43
43
### Software
44
44
- The [Arduino PLC IDE](https://www.arduino.cc/pro/software-plc-ide) (including Arduino PLC IDE Tools)
45
-
-[Portenta Machine Control - PLC IDE Activation](https://docs.arduino.cc/tutorials/portenta-machine-control/plc-ide-setup-license)
45
+
-[Portenta Machine Control - PLC IDE Activation](https://store-usa.arduino.cc/products/plc-key-portenta-machine-control?queryID=undefined&selectedStore=us)
46
46
47
47
## Instructions
48
48
@@ -62,7 +62,7 @@ After downloading the [PLC IDE](https://www.arduino.cc/pro/software-plc-ide), op
62
62
63
63

64
64
65
-
We need a license for this product to be used with the PLC IDE that we can buy directly from the [Arduino store](https://store-usa.arduino.cc/products/plc-key-portenta-machine-control), it will include a**product key** needed to activate the device.
65
+
A license is needed for this product to be used with the PLC IDE, you can buy it directly from the [Arduino store](https://store-usa.arduino.cc/products/plc-key-portenta-machine-control), and it will include the**product key** to activate the device.
66
66
67
67
Connect the PMC to the computer using a micro USB cable, the board needs to run a specific program (runtime) in order to interact with the **PLC IDE**. To flash it, select the device serial port and click on download.
68
68
@@ -77,13 +77,13 @@ Now, in the upper left corner, click on the **Connect** button and wait for the
77
77
78
78

79
79
80
-
The device will show its activation status, in this case, **No License** as is the first time we are using it with the PLC IDE. To activate it, paste the **product key** you bought in the highlighted box and click on **Activate**.
80
+
The device will show its activation status, in this case, **No License** as it is the first time using it with the PLC IDE. To activate it, paste the **product key** you bought in the highlighted box and click on **Activate**.
81
81
82
82

83
83
84
84
After that, the status should say **OK**, and now you are ready to start programming the Portenta Machine Control with the PLC IDE.
85
85
86
-
If want to learn more about the PLC IDE first setup, continue reading this [detailed guide](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#6-license-activation-with-product-key-portenta-machine-control).
86
+
To learn more about the PLC IDE first setup, continue reading this [detailed guide](https://docs.arduino.cc/software/plc-ide/tutorials/plc-ide-setup-license/#6-license-activation-with-product-key-portenta-machine-control).
87
87
88
88
#### Modbus TCP - Server
89
89
For the Modbus TCP configuration, on the **resources tab** go to the **Ethernet** section. As noticed, the Modbus TCP Slave mode is always enabled, so you don't have to make any changes.
IPAddress ip(10, 0, 0, 157); // Portenta IP address
105
+
IPAddress ip(10, 0, 0, 157); // PMC IP address
106
106
IPAddress dns(10, 0, 0, 1); // gateway IP address
107
107
IPAddress gateway(10, 0, 0, 1); // gateway IP address
108
108
IPAddress subnet(255, 255, 255, 0);
@@ -113,7 +113,11 @@ void setup()
113
113
```
114
114

115
115
116
-
Now, create the variable that will be shared with the temperature sensor data in the network. For this, we go to **status variables** and click on **Add**, we give it a name, in this case: `temp_send`, change the variable address to `25000`, and the type to `REAL`.
116
+
Now, create the variable that will be shared with the temperature sensor data in the network. For this, we go to **status variables** and click on **Add**. Configure it as follows:
@@ -151,7 +155,7 @@ Upload the runtime for Opta™ by selecting its serial port and clicking on the
151
155
152
156
Once the runtime is flashed, with your Opta™ connected to your router, search for its IP address on the router configurations.
153
157
154
-
On the PLC IDE, navigate to **On-line > Set up communication**, activate and then open the **ModbusTCP** properties, add the Opta™ IP address, then click "OK".
158
+
On the PLC IDE, navigate to **On-line > Set up communication**, activate and then open the **ModbusTCP** properties. Add the Opta™ IP address, then click "OK".

215
219
216
-
Finally, define the Opta™ outputs behavior in function of the temperature read from the Portenta Machine Control. For this, we go to the **resources tab > Relay Outputs** and we give a variable name to each relay, in this case, call them `relay_1`, 2, 3 and 4 respectively.
220
+
Finally, define the Opta™ outputs behavior in function of the temperature read from the Portenta Machine Control. For this, go to the **resources tab > Relay Outputs** and give a variable name to each relay, in this case, call them `relay_1`, 2, 3 and 4 respectively.
217
221
218
222

219
223
220
-
The same with the LED outputs, LED1, 2, 3 and 4.
224
+
The same with the LED outputs, `LED1`, 2, 3 and 4.
221
225
222
226

223
227
@@ -227,7 +231,7 @@ Now, go to the main code in the Project tab. Create a variable by right-clicking
227
231
228
232
In the code editor, match the local variable with the shared one sent by the Portenta Machine Control.
229
233
230
-
And once stored locally, design the logic to control the outputs as you want. In this case, four different temperature levels will be set to control each output with the temperature rise respectively. Copy and paste the following script into the **main code** section.
234
+
Once stored locally, design the logic to control the outputs as you want. In this case, four different temperature levels will be set to control each output with the temperature rise respectively. Copy and paste the following script into the **main code** section.
0 commit comments