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-modbus-rtu-plc-ide/content.md
@@ -109,7 +110,7 @@ The previous illustration resembles a setup consisting of two Portenta Machine C
109
110
110
111
Both configuration can be used to establish a Modbus RTU based communication. The Modbus RTU communication network can be scaled up by integrating additional protocol compatible devices as Portenta Machine Control or Opta™.
111
112
112
-
If we are connecting a Portenta Machine Control and an Opta™, the setup show below can help you understand the overall connection.
113
+
If we are connecting a Portenta Machine Control and an Opta™, the setup shown below can help you understand the overall connection.
113
114
114
115

115
116
@@ -152,7 +153,7 @@ If you decide to disable Modbus RTU for the Portenta Machine Control, you can se
152
153
153
154
The General Modbus Node allows to add information regarding the devices compatible with the Modbus messaging service.
154
155
155
-

156
+

156
157
157
158
It will require you to fill in basic information under the `General` tab and parameters to manage under the `Parametrization` tab. The basic information consists of:
158
159
@@ -171,7 +172,7 @@ The Modbus Custom Editor allows you to define a Modbus node with set of pre-defi
171
172
172
173
To open the Modbus Custom Editor window, go to `Tools -> Run Modbus Custom Editor` on PLC IDE.
173
174
174
-

175
+

175
176
176
177
It is a useful feature to have frequently deployed device configuration stored that is compatible with Modbus protocol.
177
178
@@ -203,17 +204,17 @@ Alternative values can be used per requirements if needed.
203
204
204
205
The subsequent image displays the `Status variables (volatile)` window. Within this window, we will define the `cnt` variable, specifying its access address and data type for Modbus RTU transmission.
205
206
206
-

207
+

207
208
208
209
The `cnt` status variable uses the following parameters:
209
210
210
211
* Address: 25000 (dec) / 0x61A8 (hex)
211
212
* Name: cnt
212
213
* PLC type: INT
213
214
214
-
Upon finalizing the settings, go to `Resources -> Opta` and select the corresponding port, subsequently beginning the `Manual sketch download` process. Navigate to `On-line -> Set up Communication` and activate Modbus RTU, ensuring that the elevated USB port number designated for the Portenta Machine Control is selected.
215
+
Upon finalizing the settings, go to `Resources -> Portenta Machine Control` and select the corresponding port, subsequently beginning the `Manual sketch download` process. Navigate to `On-line -> Set up Communication` and activate Modbus RTU, ensuring that the elevated USB port number designated for the Portenta Machine Control is selected.
215
216
216
-

217
+

217
218
218
219
Proceed with `On-line -> Connect` to set up a connection with the Portenta Machine Control server. If everything is set up correctly, we will see a message in the bottom right of the PLC IDE software that says it is connected.
219
220
@@ -233,7 +234,7 @@ END_IF;
233
234
234
235
The role of the Portenta Machine Control server is to continually count until it hits `2750`, then reset. To transfer this counting task to the Portenta Machine Control, you can either select `Download PLC code` or simply hit `F7`. Once everything is in place, a successful upload will look like the image shown below.
235
236
236
-

237
+

237
238
238
239
Upon completing these steps, you will have effectively set up a Portenta Machine Control device to function as a Modbus RTU Server. The following section will guide you on how to configure another Portenta Machine Control as a Modbus RTU Client.
239
240
@@ -258,11 +259,11 @@ To establish communication with the pre-configured Modbus RTU Server Portenta Ma
258
259
259
260
Use the configuration model applied to the Modbus RTU Server Portenta Machine Control for these settings. The important detail to consider is the Modbus address. Make sure this address corresponds with that of the server Portenta Machine Control or any other compatible device, in case more nodes are added. The setup should resemble the image provided:
260
261
261
-

262
+

262
263
263
264
After setting up the Modbus node for the client Portenta Machine Control,we need to specify the Modbus function responsible for retrieving the counter (`cnt`) data from the server Portenta Machine Control. Right-click on `PMC_RTU_1` or any other name you set with, to see the 'Add' option, which will bring forth a device catalog window showcasing all available Modbus functions:
264
265
265
-

266
+

266
267
267
268
To retrieve the counter data from the server Portenta Machine Control, select the 'Modbus FC-04 (Read Input Registers)' function. Configure the 'General' tab with the following parameters to ensure correct data access:
268
269
@@ -274,17 +275,17 @@ Next, you will need to designate a variable to hold the counter data captured fr
274
275
275
276
The following image shows a visual representation of the anticipated configuration:
276
277
277
-

278
+

278
279
279
280
In this tutorial's demonstration, the client Portenta Machine Control is configured to use WIP
280
281
281
282
The image below shows how it should look within the PLC IDE interface:
282
283
283
-

284
+

284
285
285
286
The OBJECT also needs labels to reference it later in the main PLC code. A table displaying the variable names designated for OBJECT can be seen below:
286
287
287
-

288
+

288
289
289
290
The main program below will be used to fetch counter data, control OBJECTS, and manage corresponding OBJECTS. A successful Modbus TCP communication will process previous tasks accordingly.
290
291
@@ -296,7 +297,7 @@ The `counter` variable serves as a global reference for the client Portenta Mach
296
297
297
298
Once you have successfully compiled and downloaded the main PLC code, the interface for the client Portenta Machine Control should mirror the image provided below:
298
299
299
-

300
+

300
301
301
302
Finally, Portenta Machine Control is now ready as a Modbus RTU Client.
302
303
@@ -308,7 +309,7 @@ Set both Portenta Machine Control devices running with the corresponding main PL
308
309
309
310
The following short clip shows a briefly expected behavior of the example project.
0 commit comments