Skip to content

Commit

Permalink
Cleanup: OPC UA is written as "OPC UA" (not "OPC/UA") (#21)
Browse files Browse the repository at this point in the history
Note: OPC UA is the acronym for OPC Unified Architecture, with OPC referring to the Open Platform Communications (Foundation).
  • Loading branch information
aentinger authored Sep 11, 2024
1 parent e40dc6f commit 07d76f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
[![Arduino Lint](https://github.com/bcmi-labs/Arduino_OPC_UA/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_OPC_UA/actions/workflows/arduino-lint.yml)
[![Sync Labels status](https://github.com/bcmi-labs/Arduino_OPC_UA/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_OPC_UA/actions/workflows/sync-labels.yml)

This library provides an implementation of [OPC/UA](https://en.wikipedia.org/wiki/OPC_Unified_Architecture) by porting the Fraunhofer [`open62541`](https://github.com/open62541/open62541) for the Arduino [Opta](https://www.arduino.cc/pro/hardware-arduino-opta/) `microPLC` family.
This library provides an implementation of [OPC UA](https://en.wikipedia.org/wiki/OPC_Unified_Architecture) by porting the Fraunhofer [`open62541`](https://github.com/open62541/open62541) for the Arduino [Opta](https://www.arduino.cc/pro/hardware-arduino-opta/) `microPLC` family.

Furthermore, the library supports automatic detection, configuration and exposure of up to two Arduino Opta Expansion Boards (i.e. Digital Expansion w/ mechanical relays [`D1608E`](https://store.arduino.cc/products/opta-ext-d1608e), Digital Expansion w/ solid-state relays [`D1608S`](https://store.arduino.cc/products/opta-ext-d1608e), Analog Expansion [`A0602`](https://store.arduino.cc/products/opta-ext-a0602)) via OPC UA.

### How-to-OPC/UA
### How-to-OPC UA
* Compile and upload [`examples/opcua_server`](examples/opcua_server/opcua_server.ino)
```bash
arduino-cli compile --fqbn arduino:mbed_opta:opta -v examples/opcua_server -u -p /dev/ttyACM0
Expand All @@ -30,7 +30,7 @@ $ cat /dev/ttyACM0
[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
[2024-06-21 02:30:19.000 (UTC+0000)] info/server New DiscoveryUrl added: opc.tcp://192.168.8.137:4840
```
* Connect to OPC/UA server using IP/port as printed by the Arduino Opta
* Connect to OPC UA server using IP/port as printed by the Arduino Opta
![image](https://github.com/bcmi-labs/Arduino_OPC_UA/assets/3931733/ac153e79-6648-4808-9c4f-17aaf4305d89)

### How-to-`opcua-client-gui`
Expand Down
14 changes: 7 additions & 7 deletions examples/opcua_server/opcua_server.ino
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void setup()
/* Try and obtain the current time via NTP and configure the Arduino
* Opta's onboard RTC accordingly. The RTC is then used inside the
* open62541 Arduino wrapper to obtain the correct timestamps for
* the OPC/UA server.
* the OPC UA server.
*/
EthernetUDP udp_client;
auto const epoch = opcua::NTPUtils::getTime(udp_client);
Expand Down Expand Up @@ -148,11 +148,11 @@ void setup()
/* Create a server listening on port 4840 (default) */
opc_ua_server = UA_Server_new();

/* Printing OPC/UA server IP and port. */
/* Printing OPC UA server IP and port. */
UA_LOG_INFO(UA_Log_Stdout, UA_LOGCATEGORY_SERVER,
"Arduino Opta IP: %s", Ethernet.localIP().toString().c_str());

/* Determine the Arduino OPC/UA hardware variant. */
/* Determine the Arduino OPC UA hardware variant. */
opcua::OptaVariant::Type opta_type;
if (!opcua::OptaVariant::get_opta_variant(opta_type)) {
UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "opcua::OptaVariant::get_opta_variant(...) failed");
Expand All @@ -167,7 +167,7 @@ void setup()
/* Configure analog solution to 12-Bit. */
analogReadResolution(12);

/* Define the Arduino Opta as a OPC/UA object. */
/* Define the Arduino Opta as a OPC UA object. */
opta_opcua = opcua::Opta::create(opc_ua_server, opta_type);
if (!opta_opcua) {
UA_LOG_ERROR(UA_Log_Stdout, UA_LOGCATEGORY_SERVER, "opcua::Opta::create(...) failed");
Expand Down Expand Up @@ -231,7 +231,7 @@ void setup()
opta_expansion_num = OPCUA_MAX_OPTA_EXPANSION_NUM;
}

/* Expose Arduino Opta expansion module IO via OPC/UA. */
/* Expose Arduino Opta expansion module IO via OPC UA. */
for(uint8_t i = 0; i < opta_expansion_num; i++)
{
ExpansionType_t const exp_type = OptaController.getExpansionType(i);
Expand All @@ -244,7 +244,7 @@ void setup()
else
exp_dig = opta_expansion_manager_opcua->create_digital_solid_state_expansion(i);

/* Expose digital/analog pins via OPC/UA. */
/* Expose digital/analog pins via OPC UA. */
for (uint8_t d = 0; d < OPTA_DIGITAL_IN_NUM; d++)
{
char analog_in_name[32] = {0};
Expand All @@ -268,7 +268,7 @@ void setup()
});
}

/* Expose mechanical relays via OPC/UA. */
/* Expose mechanical relays via OPC UA. */
for (uint8_t r = 0; r < OPTA_DIGITAL_OUT_NUM; r++)
{
char mech_relay_name[32] = {0};
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name=Arduino_OPC_UA
version=0.0.1
author=Arduino <[email protected]>
maintainer=Arduino <[email protected]>
sentence=Arduino port of the open62541 providing OPC/UA for Arduino Opta.
sentence=Arduino port of the open62541 providing OPC UA for Arduino Opta.
paragraph=This library is an Arduino port of open62541, an open source implementation of OPC UA (OPC Unified Architecture / IEC 62541) written in the C language.
category=Communication
architectures=mbed_opta
Expand Down

0 comments on commit 07d76f3

Please sign in to comment.