SCADA MQTT



SCADA MQTT - Telemetry software:

MQTT SCADA

SCADA MQTT is the telemetry protocol used in the supervisory data acquisition software.
MQTT, Message Queuing Telemetry Transport, is a protocol that allows communication via telemetry with optimized bytes.

It is an OASIS standard for IoT.
Even in locations with little internet, bytes are optimized.
It can also be used safely.

Site: mqtt.org

The Internet of Things (IoT) has networking standards.
It can be over the Internet, via TCP, or other methods.

It has an simple ready example that can be used in the SCADA software:


SCADA MQTT example



Remote connection allows sending and receiving SCADA information in real time.
Telemetry is interesting for SCADA monitoring of information over long distances in real time.

Remote environments can send data through MQTT with good speed.
Few bytes are sent, optionally securely.
Each MQTT topic can send and receive SCADA numbers or texts.
The server can keep track of the stored topic data.
But each topic allows you to record various information in text mode.
The MQTT configuration software is like this: define which server, port, user and password.
Then just send or receive topics.

Topics are variables that contain the information you want in the SCADA software.
When writing or sending data, the name is used: publish.
When reading or receiving data, the name is used: subscribe.


SCADA MQTT example

MQTT broker

Server name is MQTT Broker.


The ones that receive or send the data, for example SCADA software or equipment, the name is MQTT Client.

The structure is like this:


MQTT structure


The servers, MQTT brokers, can be placed on local computers or in the cloud.

Reading and writing time in SCADA usually has a range according to the quality of the network.
Locations that have little internet may have a longer time interval. For example, interval between one and one minute.
It also depends on the SCADA data types.


Examples of telemetry in SCADA software:



SCADA MQTT example

Temperature of the environment or devices.
Level in water treatment. Devices on or off.
Pumps, motors, lights, equipment, etc.
Processes running, stopped, maintenance, etc.
Location, latitude and longitude.
In the SCADA software you can display the map in real time.

Equipment usage time. There are several versions of MQTT, which can be used in SCADA.
For example, MQTT-SN v1.2, MQTT 3.1, MQTT 3.1.1 or MQTT 5.

The texts, encoded in UTF-8, can be of any length, in the range from 0 to 65535 bytes.
The frame has the size of the text, two bytes, and the content of the text.
The smaller the data size, the better it is for transmission via TCP in the software.
Internets with low bandwidth can be used.

Access to information on the MQTT broker server may depend on the username and password.
The same server can have several information separated by users.

An example of a local server that can be installed is Mosquitto software.

Site mosquitto.org.

Some optional servers on Linux or Windows, it is defined in the mosquitto.conf file.
The TCP port can be chosen. In some cases it is 1883 or 8883.
Drivers, used in SCADA software, communicate with MQTT in parallel.
By choosing the server, port, user, password and topic, the system maintains communication.


To test the system by downloading the SCADA software. Then you can download the finished example with MQTT.
Select the MQTT1 driver. Put “.MQTT1” in the “Config” item. Optionally, if you have other MQTT servers in parallel, change the value to “.MQTT2” in the “Config” item.
Topics are defined in the Param1 column. It can be whatever text you want, for Publish or Subscribe.
The MQTT configurator is in the \data\MQTT1.exe subfolder. The software allows you to configure the MQTT broker and maintains the connection. Define which domain or IP of the MQTT broker. Which port, which user and which password. It stays connected in real time.
The time interval between each reading can be defined in the “Sampling” column. In telemetry, it could be 1 minute or a few seconds.
The data is stored, keeping the history in the SCADA software itself. Statistics can be calculated in reports. Runtime, water levels, engine states or other data. Some MQTT servers may also maintain history, but the SCADA system may as well.
Topics can have subdivisions. In Param1, in the software, if you put the name of the topic, period, the name of a specific "variable", internally it will be subdivided. Example: "Topic1.Variable1" or "Topic1.Variable2". Values are written internally within Topic1 on the server.
And the titles of the tags can also be associated with topics.
Specific calculation formulas can be defined in the formula column of the software, or in the SCADA script.
The limits, for generating alarms, are typed in the LI and LS columns. The LI column is the lower limit (Limit Inferior), the LS column is the upper limit (Limit Superior).
Example:

SCADA MQTT example


SCADA Software

SCADA MQTT