Online tech learner logo
Online Tech Learner
  • Please enable News ticker from the theme option Panel to display Post

MQTT OPC-UA, a Coreflux Flux Asset | by Hugo Vaz | Coreflux Blog

MQTT OPC-UA, a Coreflux Flux Asset | by Hugo Vaz | Coreflux Blog


The Purpose of this Flux Asset

Coreflux’s MQTT OPC UA is an asset centered around creating a bridge between a machine’s OPC UA data flow and MQTT, synchronizing data to and from broker and server, to effectively allow OPC-UA compatible devices to communicate with other Coreflux assets.

OPC-UA: Open Platform Communications, Unified Architecture

OPC-UA is a cross-platform, open-source, IEC62541 standard for data exchange from sensors to cloud applications developed by the OPC Foundation. In general terms, there are standardized data models available for dozens of industrial equipment types (dubbed “Companion Specifications”), published by the governing foundation. Multiple elements are handled, such as authentication, authorization, encryption, checksums, and multiple communication protocols are foreseen, across platforms.

The uniformization of OPC is, when looking at the field, in reality non-existent (despite the initial vision/intention having been sound). Different providers implement it according to their own interpretation of the base specifications. Due to different OPC UA implementations, Coreflux’s support of the OPC protocol will be limited.

This is one of many reasons we consider OPC standard (UA or DA) as a legacy system.

In order to properly implement the MQTT OPC UA flux asset, the following conditions must be ensured:

  • Guarantee you have the OPC server installed
  • The certificate of the OPC UA defined in the server

Once you press “Install”, you will be presented with the asset configuration window:

  • OPC UA server → The server of the OPC UA
  • TCP port of OPC UA → The port for the OPC UA server

After installation, the instance window for this asset installation will display the “Standby” status.

For proper functioning, the asset must be configured (see chapter 5).

To begin execution of the MQTT OPC Bridge Flux Asset, press the Play button, and if successful, the instance status will change to “Running”.

If for some reason the inputted configuration fails to execute (or permission to run is not confirmed by the system), the asset will try to enter a run state but return to a halted state when failing to do so, displaying an error popup (on the GUI Hub) or message (on the command-line Hub). If the asset is running, but you’re not seeing responses, see the section Troubleshooting.

With a version lower than v1.20 in the config file you can change the following attributes:

  • browseOPCServer → True browses all the variables in the OPC UA server
  • autoAcceptServerCertificate → True accept the certificate automatically
  • username → the username for the OPC UA server
  • password → the password for the OPC UA server
  • BaseTopicForBrowse → the topic to browse the variables locally

With a version lower than v1.20 you can find the config in the following file:


The top parameters can be changed via :

  • Name → An identification name for the tag
  • Writable → ToOpc writes down the tag only in the opc direction. ToMqtt writes only to the mqtt direction. ToAll writes down to both directions.
  • mqttTopic → The topic where it will be written
  • mqttQos → AtMostOnce — 0 / AtLeastOnce — 1 / ExactlyOnce — 2
  • mqttRetain → True for retain / false without retain
  • opcAdress → Node id string
  • opcNsIndex → Namespace index for the 2
  • Type → Opc UA type :

Please find us on our discord server for more information.

Join the Coreflux — Flux The System Discord Server!


Source link


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *