Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the Engineering Environment, go to Edit > Devices > Channels and find the desired protocol inside the list.


MQTT protocol


In Nodes tab the primary station is configured in the syntax below:

Code Block
<BrokerURL> ; <port> ; [Username] ; [Password] ; [X509Certificate] ; [QoS]


Node configuration


Where, Username, Password, X509Certificate and QoS are optional.

In Points tab you need to configure the Topic in which your variable may publish or subscribe to messages (according to its AccessType). More information on each item is available in the MQTT driver documentation.


Points configuration


Mosquitto Client (without SparkPlugB)

...

In the Engineering Environment, go to Edit > Devices > Channels and find the desired protocol inside the list.


MQTT+Sparkplug B protocol.

In column ProtocolOptions, there are some fields that must be filled.

  • Type;
    • Application Node;
    • Scada IIoT Host;
    • EoN
  • ClientID;
  • TagProperties;


Channel configuration


More information on each item is available in the MQTT + SparkPlugB driver documentation. In Nodes tab the primary station is configured in the syntax below:

Code Block
<BrokerURL> ; <port> ; [Username] ; [Password] ; [X509Certificate] ; [SslProtocol] ; [WebSocket] ; [ScadaIIoTHostID]


Node configuration


The topics are configured using the following syntax.

Code Block
<GroupId>;<EdgeNodeId>;<DeviceId>;<QoS>


Point configuration


Using Third Party MQTT Clients – MQTT fx (SparkplugB)

...

Step 1: TMQTT Broker must be running (look for icon in Windows TaskBar).

TMQTT Broket icon


Step 2: In the Client, go to Extras > Edit Connections Profiles. In the opened Window you will fill the properties according to your Broker (e.g.: Broker Address and Broker Port). Then, click on connect.


Configure MQTT Fx client


Step 3: In subscribe Tab the Topic will follow the syntax below:

...

Note

It is worth mentioning that for an array Tag it is not required to point each element individually. The broker is smart enough to fetch all data by just receiving the main Tag element. The same happens for Tags with Template Datatypes.


Topics client is subscribed to


There are some other data that can exchange between the running project and TMQTT Broker. Some examples can be seen below.

...

Note

You must change the Payload Decoder to Sparkplug.


Exchanged data


Step 5: To correctly format the received data, copy the message and paste it in any JSON formatter (e.g.: https://jsonformatter.org/json-pretty-print). The result should be something like the code below.

...