FB "LMQTT_Client" for SIMATIC S7-CPU
With the function block from the "LMQTT_Client" library, the MQTT protocol is implemented into a SIMATIC S7-1500 and SIMATIC S7-1200.
Lean and fast: MQTT
The “Message Queue Telemetry Transport” is a simply structured binary Publish/ Subscribe protocol on TCP/IP level. It is suitable for messaging between devices with minimum functionality and for transmission via unreliable networks with low bandwith and high latency. With these characteristics, MQTT plays a vital role for the IoT and in M2M communication.
The "LMQTT_Client" library provides you with one function block each for the S7-1500 CPU and S7-1200 CPU. The “LMQTT_Client” function block integrates the MQTT client function and allows you to transmit MQTT messages to a broker (publisher role) and to create subscriptions (subscriber role). In this, the communication can be secured via a TLS connection. You can reach the broker with a static ip address or a qualified domain name.
The following picture shows the secure mqtt-messaging with a SIMATIC S7-1500.
Advantages of MQTT
The MQTT protocol stands out with the following characteristics:
Light-weight protocol with low transport overhead
Minimum requirement for network bandwith thanks to push mechanism
Function for re-connecting after disconnection
Re-sending messages after disconnection
Mechanism for notifying interested parties after an unpredicted disconnection of a client
Simple use and implementation thanks to a small set of commands
Quality of Service (QoS level) with different reliability levels for the message delivery
Optional encryption of messages via SSL/TLS
Authentification of publishers and subscribers via user name and password
Documentation and project example for an secure messaging (S7-1500, S7-1200)
Documentation (1,9 MB)
"LMQTT_Client" library for TIA Portal V15.1 (2,0 MB)
Using MQTT with a qualified domain name is only possible with SIMATIC S7-1500.
Subscribe mechanism added for an secure messaging
In the archive you find the old "LMqtt_Publisher" function blocks for TIA Portal V15 with unencrypted messaging.
Archiv.zip (21,8 MB)