OPC UA (Unified Architecture) extends the great success of the OPC communication protocol for data acquisition, information modeling (object-oriented), and communication between plant and applications (client-server) reliably and securely. OPC UA is based on a service-oriented approach defined by the IEC 62451 standard.

Opex62541 wraps the basic functions of OPC UA client and server.


The purpose of the following sections is to provide a guided tour of using this library in simple applications.

First, we will explain the most important features and the manual way to use the library (such as configuration, connectivity, data modeling, and execution).

And finally, we will show automatic methods to configure and integrate the library with the elixir module.


This section shows how the life cycle of an OPC UA client and server should be executed. We will see configuration and connectivity topics.


Next, we will focus on adding a more robust security layer. We will show you the security modes we support and how to configure them.


We will discuss the interaction between an OPC UA client or server and a network, i.e., on the server-side, how to become visible to clients, and on the client-side, how to scan the network to identify a server. In this section, we will configure a Local Discovery Server (LDS), register a server in it, and retrieve information.

Information Manipulation

We will explore how the information is modeled in OPC UA, the methods to add the model to the server, and how clients can extract the data. Topics such as Address space, Nodes, Monitored Items, etc., will be covered.

Elixir Integration

Finally, we will discuss a callback-based interface that facilitates the configuration and integration between the server or client and an elixir module.


Opex62541 is an Elixir wrapper for the open62541 library (C Code). Therefore, two middlewares (opc_ua_client.c and opc_ua_server.c) were made to execute open62541 API functions based on stdio messages, this communication between Elixir and C middleware is established by creating a port (Erlang's Port Module), which allows possible errors in the C code to be contained.