Skip to content

Commit d0f1dac

Browse files
committed
User manual content update
1 parent 515d8f0 commit d0f1dac

File tree

4 files changed

+79
-31
lines changed

4 files changed

+79
-31
lines changed

content/hardware/07.opta/opta-family/opta/tutorials/01.user-manual/content.md

Lines changed: 79 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,11 +1213,13 @@ You should be able now to connect to your Opta™ using a central device. The Bl
12131213

12141214
## OPC Unified Architecture (OPC UA)
12151215

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.
12171217

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.
12191219

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.
12211223

12221224
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:
12231225

@@ -1231,6 +1233,8 @@ To set up the **OPC UA** server, upload the [**`opta_opcua_server`** example](ht
12311233

12321234
![Successful Compilation with Arduino IDE](assets/arduino-ide-compilation.png)
12331235

1236+
For running with the Arduino CLI tool, the following command can be used:
1237+
12341238
```bash
12351239
arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opta_opcua_server -u -p /dev/ttyACM0
12361240
```
@@ -1241,48 +1245,67 @@ arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opta_opcua_server
12411245

12421246
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.
12431247

1244-
Open a serial monitor to verify the status of the server and retrieve the devices 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**.
12451249

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+
![Server information with discovery URL - Arduino IDE](assets/opta-opc-ua-arduino-ide.gif)
12491255

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+
![Server information with discovery URL - Putty](assets/opta-opc-ua-cmd.gif)
1259+
1260+
The output information extracted is as follows and you should see similar to the following:
12511261

12521262
```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.
1257-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server Arduino Opta IP: 192.168.8.137
1258-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server Arduino Opta Variant: Arduino Opta WiFi
1259-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server stack: size = 16384 | free = 14936 | used = 1448 | max = 5124
1260-
[2024-06-21 02:30:19.000 (UTC+0000)] info/server o1heap: capacity: 261984 | allocated: 66784 | peak_allocated: 68896
1261-
[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)] info/eventloop Starting the EventLoop
1264+
[2024-12-11 22:19:08.000 (UTC+0000)] warn/server AccessControl: Unconfigured AccessControl. Users have all permissions.
1265+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server AccessControl: Anonymous login is enabled
1266+
[2024-12-11 22:19:08.000 (UTC+0000)] warn/server x509 Certificate Authentication configured, but no encrypting SecurityPolicy. This can leak credentials on the network.
1267+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Arduino Opta IP: 192.168.100.191
1268+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Arduino Opta Variant: Arduino Opta WiFi
1269+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server OptaController 0 expansion modules detected.
1270+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server stack: size = 16384 | free = 15400 | used = 984 | max = 4248
1271+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server o1heap: capacity: 327520 | allocated: 66784 | peak_allocated: 68896
1272+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405ADA4 ("application_unnamed_thread"), Stack size: 4248 / 16384
1273+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405C960 ("rtx_idle"), Stack size: 328 / 896
1274+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405D338 ("lwip_tcpip"), Stack size: 792 / 1200
1275+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405DB60 ("shared_event_queue"), Stack size: 392 / 2048
1276+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405D090 ("main"), Stack size: 2224 / 32768
1277+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405C91C ("rtx_timer"), Stack size: 104 / 768
1278+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2406AE40 ("USBevt"), Stack size: 136 / 256
1279+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Thread: 0x2405D250 ("stm32_emac_thread"), Stack size: 192 / 1024
1280+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server Heap size: 10393 / 90272 bytes
1281+
[2024-12-11 22:19:08.000 (UTC+0000)] warn/server Maximum SecureChannels count not enough for the maximum Sessions count
1282+
[2024-12-11 22:19:08.000 (UTC+0000)] info/network TCP | Listening on all interfaces
1283+
[2024-12-11 22:19:08.000 (UTC+0000)] info/network TCP 604424824 | Creating listen socket for "192.168.100.191" (with local hostname "192.168.100.191") on port 4840
1284+
[2024-12-11 22:19:08.000 (UTC+0000)] info/server New DiscoveryUrl added: opc.tcp://192.168.100.191:4840
1285+
[2024-12-11 22:19:14.000 (UTC+0000)] info/server Arduino Opta IP: 192.168.100.191
12651286
```
12661287
12671288
In this example, the output displays the IP address:
12681289
12691290
```bash
1270-
192.168.8.137
1291+
192.168.100.191
12711292
```
12721293
12731294
And indicate that the OPC UA server is running at:
12741295
12751296
```bash
1276-
opc.tcp://192.168.8.137:4840
1297+
opc.tcp://192.168.100.191:4840
12771298
```
12781299
1300+
You can now connect to the OPC UA server running on Opta.
1301+
12791302
### Connecting to the OPC UA Server
12801303
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 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.
12821305
12831306
### Using OPC UA GUI Client for Testing
12841307
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:
12861309
12871310
```bash
12881311
cd /tmp
@@ -1307,20 +1330,45 @@ python3 -m pip install --upgrade pyopenssl
13071330
python3 -m pip install --upgrade .
13081331
```
13091332
1310-
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:
13111334
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+
![OPC UA GUI client](assets/opta-opc-ua-gui.gif)
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+
```
13131361
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).
13151363
13161364
Add the following macros to enable memory and stack statistics:
13171365
13181366
```bash
13191367
"target.macros_add": [
1320-
...
1321-
+ "MBED_HEAP_STATS_ENABLED=1",
1322-
+ "MBED_STACK_STATS_ENABLED=1",
1323-
+ "MBED_MEM_TRACING_ENABLED=1"
1368+
  ...
1369+
+  "MBED_HEAP_STATS_ENABLED=1",
1370+
+  "MBED_STACK_STATS_ENABLED=1",
1371+
+  "MBED_MEM_TRACING_ENABLED=1"
13241372
]
13251373
```
13261374

0 commit comments

Comments
 (0)