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/07.opta/opta-family/opta/tutorials/01.user-manual/content.md
+79-31Lines changed: 79 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -1213,11 +1213,13 @@ You should be able now to connect to your Opta™ using a central device. The Bl
1213
1213
1214
1214
## OPC Unified Architecture (OPC UA)
1215
1215
1216
-
This section explains using the [**OPC UA library**](https://github.com/arduino-libraries/Arduino_OPC_UA) designed for Opta. The library is based on the [**Fraunhofer open62541**](https://github.com/open62541/open62541) implementation of [**OPC UA**](https://en.wikipedia.org/wiki/OPC_Unified_Architecture), tailored specifically for the Opta family.
1216
+
This section explains using the [**OPC UA library**](https://github.com/arduino-libraries/Arduino_OPC_UA) designed for Opta. The library is based on the [**Fraunhofer open62541**](https://github.com/open62541/open62541) implementation of [**OPC UA**](https://en.wikipedia.org/wiki/OPC_Unified_Architecture), created specifically for the Opta family.
1217
1217
1218
-
The [**OPC Unified Architecture (OPC UA)**](https://en.wikipedia.org/wiki/OPC_Unified_Architecture) is an industrial communication protocol widely used in automation and Industrial Internet of Things (IIoT) systems. It provides a platform-independent and secure method for exchanging information between devices and systems. **OPC UA** supports features like custom data modeling, authentication, encryption, and scalable architecture, making it a preferred choice for modern industrial applications.
1218
+
The [**OPC Unified Architecture (OPC UA)**](https://en.wikipedia.org/wiki/OPC_Unified_Architecture) is an industrial communication protocol widely used in automation and Industrial Internet of Things (IIoT) systems.
1219
1219
1220
-
The [**open62541** library](https://github.com/open62541/open62541) is an open-source implementation of the **OPC UA** standard. It is lightweight, efficient, and written in C, making it ideal for embedded systems like the Opta. The library provides a flexible framework to create **OPC UA** servers and clients, ensuring compatibility with the standard while maintaining high performance.
1220
+
It provides a platform-independent and secure method for exchanging information between devices and systems. **OPC UA** supports features like custom data modeling, authentication, encryption, and scalable architecture, making it a preferred choice for modern industrial applications.
1221
+
1222
+
The [**open62541** library](https://github.com/open62541/open62541) is an open-source implementation of the **OPC UA** standard. It is lightweight, efficient and written in C, making it ideal for embedded systems like the Opta. The library provides a flexible framework to create **OPC UA** servers and clients, ensuring compatibility with the standard while maintaining high performance.
1221
1223
1222
1224
The [**OPC UA library**](https://github.com/arduino-libraries/Arduino_OPC_UA) supports secure communication and interoperability for industrial automation applications, with the capability to automatically detect, configure, and expose up to two Arduino Opta Expansion Boards via **OPC UA**. Supported expansion boards include:
1223
1225
@@ -1231,6 +1233,8 @@ To set up the **OPC UA** server, upload the [**`opta_opcua_server`** example](ht
1231
1233
1232
1234

1233
1235
1236
+
For running with the Arduino CLI tool, the following command can be used:
Next, connect the Opta to a network using its Ethernet port, ensuring that the network has a DHCP-enabled router or switch to assign an IP address to the device.
1243
1247
1244
-
Open a serial monitor to verify the status of the server and retrieve the device’s IP address. The output will include information about the server, including its discovery URL. Use the following command to view the serial output:
1248
+
Open a serial monitor to verify the status of the server and obtain the device's IP address. The output will include information about the server, including its **discovery URL**.
1245
1249
1246
-
```bash
1247
-
cat /dev/ttyACM0
1248
-
```
1250
+
The Arduino IDE Serial Monitor can be used to get information about the server or programs like [Putty](https://www.putty.org/) to open a Serial connection.
1251
+
1252
+
The following clip shows Opta running OPC UA server script and showing server information on the Serial Monitor:
1253
+
1254
+

1249
1255
1250
-
You should see output similar to the following:
1256
+
With [Putty](https://www.putty.org/), the following serial monitor shows the server information:
1257
+
1258
+

1259
+
1260
+
The output information extracted is as follows and you should see similar to the following:
1251
1261
1252
1262
```bash
1253
-
[2024-06-21 02:30:19.000 (UTC+0000)] info/eventloop Starting the EventLoop
1254
-
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server AccessControl: Unconfigured AccessControl. Users have all permissions.
1255
-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server AccessControl: Anonymous login is enabled
1256
-
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server x509 Certificate Authentication configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
[2024-06-21 02:30:19.000 (UTC+0000)] warn/server Maximum SecureChannels count not enough for the maximum Sessions count
1262
-
[2024-06-21 02:30:19.000 (UTC+0000)] info/network TCP | Listening on all interfaces
1263
-
[2024-06-21 02:30:19.000 (UTC+0000)] info/network TCP 604353888 | Creating listen socket for"127.0.0.1" (with local hostname "192.168.8.137") on port 4840
1264
-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server New DiscoveryUrl added: opc.tcp://192.168.8.137:4840
1263
+
[2024-12-11 22:19:08.000 (UTC+0000)] [32minfo/eventloop[0m Starting the EventLoop
1264
+
[2024-12-11 22:19:08.000 (UTC+0000)] [33mwarn/server[0m AccessControl: Unconfigured AccessControl. Users have all permissions.
1265
+
[2024-12-11 22:19:08.000 (UTC+0000)] [32minfo/server[0m AccessControl: Anonymous login is enabled
1266
+
[2024-12-11 22:19:08.000 (UTC+0000)] [33mwarn/server[0m x509 Certificate Authentication configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
In this example, the output displays the IP address:
1268
1289
1269
1290
```bash
1270
-
192.168.8.137
1291
+
192.168.100.191
1271
1292
```
1272
1293
1273
1294
And indicate that the OPC UA server is running at:
1274
1295
1275
1296
```bash
1276
-
opc.tcp://192.168.8.137:4840
1297
+
opc.tcp://192.168.100.191:4840
1277
1298
```
1278
1299
1300
+
You can now connect to the OPC UA server running on Opta.
1301
+
1279
1302
### Connecting to the OPC UA Server
1280
1303
1281
-
Once the server is running, use any OPC UA-compatible client to connect to the server using the IP address and port printed in the serial monitor output. This allows you to explore and interact with the device and any attached expansion boards.
1304
+
Once the server is running, use any OPC UAcompatible client to connect to the server using the IP address and port printed in the serial monitor output. This allows you to explore and interact with the device and any attached expansion boards.
1282
1305
1283
1306
### Using OPC UA GUI Client for Testing
1284
1307
1285
-
The **opcua-client-gui** tool can be used if you are interested in testing or further interaction. To install the tool, please use the following commands:
1308
+
The [**opcua-client-gui**](https://github.com/FreeOpcUa/opcua-client-gui) client can be used if you are interested in testing or further interaction. To install the tool, please use the following commands:
Launch the GUI and use it to connect to the OPC UA server running on the Arduino Opta.
1333
+
If you are on a Windows OS platform, please follow the next steps:
1311
1334
1312
-
### Detailed Memory Debugging
1335
+
1. Install [**WinPython**](https://winpython.github.io/) and install the version including **`pyqt5`**.
1336
+
2. Use `pip` to install **opcua-client**:
1337
+
1338
+
```bash
1339
+
pip install opcua-client
1340
+
```
1341
+
1342
+
It is recommended that the command be run within the WinPython Command Prompt downloaded with [winpython](https://winpython.github.io/).
1343
+
1344
+
3. Run via the script `pip` created: `YOUR_INSTALL_PATH\Python\Python35\Scripts\opcua-client.exe`
1345
+
1346
+
It will launch the GUI and connect to the OPC UA server running on the Opta using the discovery URL. You will be able to see similar results as in the following clip:
1347
+
1348
+

1349
+
1350
+
With this, Opta is now ready to handle the OPC UA protocol related issues using a simple [OPC UA GUI client](https://github.com/FreeOpcUa/opcua-client-gui).
1351
+
1352
+
### Memory Debugging Insight
1353
+
1354
+
Additional configuration is possible for developers requiring detailed heap and stack memory usage information. The `mbed_app.json` configuration file should be modified to include memory and stack statistics macros to enable this feature.
1355
+
1356
+
The `mbed_app.json` file is found within [**`ArduinoCore-mbed`**](https://github.com/arduino/ArduinoCore-mbed/tree/main) at:
1357
+
1358
+
```bash
1359
+
variants/OPTA/conf/mbed_app.json
1360
+
```
1313
1361
1314
-
Additional configuration is possible for developers requiring detailed debugging information about heap and stack memory usage. To enable this feature, the `mbed_app.json` configuration file should be modified to include memory and stack statistics macros.
1362
+
Or the location can be referenced [here](https://github.com/arduino/ArduinoCore-mbed/blob/main/variants/OPTA/conf/mbed_app.json).
1315
1363
1316
1364
Add the following macros to enable memory and stack statistics:
0 commit comments