Table of Contents
Imperix relies on the increasingly popular OPC UA industrial protocol to remotely control and monitor its power electronic controllers over Ethernet. To do so, the B-Board PRO and B-Box RCP controllers embed an OPC UA server to communicate with the in-house monitoring software imperix Cockpit. One of the advantages of using an open standard such as OPC UA is that it enables users to use third-party clients to visualize data and send commands.
This page is aimed at users who wish to implement a custom OPC UA client to interact with an imperix controller and provides guidance on how to connect to and exchange data with the OPC UA server embedded in imperix controllers.
What is OPC UA?
OPC Unified Architecture (UA) is an open communication standard developed by the OPC Foundation targeting industrial automation. This Ethernet-based protocol allows clients to remotely control OPC UA compatible devices from various vendors. OPC UA is designed to be a secure industrial communication and supports signed and encrypted communication as well as user authentication.
Moreover, thanks to the openness of OPC UA, a multitude of resources and libraries are available online, allowing the user to build his own client. Here are a few of them:
- Official tools and SDK from Unified Automation: High Perf C99, ANSI C, C++, .NET C#, Java, Delphi
- MATLAB Industrial Communication Toolbox, also covered on our product note
- open62541: open-source C implementation
- Freeopcua Python: with a simple GUI client example made using PyQT 5
Monitoring an imperix controller using OPC UA
Imperix Cockpit, the official monitoring software to remotely control imperix products, relies on OPC UA for most of the communication with the B-Box RCP and B-Board PRO. Consequentially, third-party clients may perform the same actions, including:
- read and write the user variables (probe and tunable parameters) at a frequency up to 100 Hz
- enable or disable the PWM outputs
- get the device status (is the code running, did a fault occur, what is the CPU load, etc)
- read the generated log messages
Connecting to the imperix OPC UA server
Imperix uses the default OPC UA port 4840, meaning that the OPC UA endpoint URL to connect to a B-Box or B-Board controller is
Imperix system variables
Below are documented the read-only “system” OPC UA node variables that can be of use to the user. They provide configuration and status information about the target. These system node variables are stored in the namespace 1 and are available at all times (contrary to user code variables described later).
|The loaded ACG license status
|The loaded CPP license status
CPU load [%]
|User CPU load. Returns 0 when the user code is stopped
|Returns “B-Board” or “B-Box”
|“Offline”: The user code is stopped
“Blocked”, “Operating” or “Fault” when the user code is running
|The automatically assigned IP address
|The device hostname
Loaded code MD5
|The MD5 hash of the loaded user code file
Loaded code date
|The last modification date of the loaded user code file
Loaded code name
|The name of the loaded user code file
|Returns the log messages generated by the user code system (BBOS). It uses the following format:
[I]User code started (BBOS v3.7 build 2203211046)
|The device’s MAC address
|The default static IP. It is always 192.168.222.22
Static IP 2
|The user-configured static IP
|Display status similar to the B-Box screen.
“Initializing…”, “Discovering…” or “Synchronizing…”: the device is in its starting phase
“Ready.”: the user code can be started
“Starting…”: the user code is being started
“Running.”: a user code is running
All other messages are error messages
|The chip temperature in degrees Celsius
User CPU state
|“Running” or “Offline”
|Returns the user-created log messages generated using the LOG block. It uses the following format:
|The firmware version of the device
The following methods allow the user to interact with the target (start the code, enable the PWM outputs) or to change system parameters (hostname, IP).
|Change the target hostname
Change static IP 2
|new static IP
|Change the target static IP 2. The static IP 1 is always 192.168.222.22
|Enable the PWM outputs
|Disable the PWM outputs
|<variable name>, <DAC channel>, <device ID>, <gain>, <offset>
|Connect a user variable to an analog output of the target, similar to the DAC module of Cockpit
|Start the loaded user code.
|Stop the loaded user code.
User-created OPC UA variables
Making an OPC UA GUI client using MATLAB
To use MATLAB as an OPC UA client, the user may read the Industrial Communication Toolbox tutorial. This Add-On may be combined with MATLAB App Designer to build an HMI GUI for imperix power converters such as the one shown in the illustration on this page.