LLExec MQTT Engine: Difference between revisions

From Axel Public Wiki
Jump to navigation Jump to search
Line 13: Line 13:
The configuration has many fields, as follow:
The configuration has many fields, as follow:
* <b>Client name</b>: is the name with which the runtime presents itself to the broker, must be unique for any broker.
* <b>Client name</b>: is the name with which the runtime presents itself to the broker, must be unique for any broker.
- IP Address: is the IP address, or full qualified name of the broker
* <b>IP Address</b>: is the IP address, or full qualified name of the broker
- Port: is the tcp port of the broker
* <b>Port</b>: is the tcp port of the broker
- TLS: it specify if the connection to the broker is secure and encrypted
* <b>TLS</b>: it specify if the connection to the broker is secure and encrypted
- Common name server: can be the full qualified name of the server, or the common name in the server’s certificate.
* <b>Common name server</b>: can be the full qualified name of the server, or the common name in the server’s certificate.
- Username: for the connection to the broker
* <b>Username</b>: for the connection to the broker
- Password: for the connection to the broker.
* <b>Password</b>: for the connection to the broker.
Note on TLS: with TLS option on all the communication will be encrypted.
<b>Note on TLS</b>: with TLS option on all the communication will be encrypted.<br>
Another feature of the TLS is that both Broker and client should present itselves with a certicate issued from a Certificate Authority.
Another feature of the TLS is that both Broker and client should present itselves with a certicate issued from a Certificate Authority.
This ensure the identity of both broker and PLC, but the PLC may not have a valid certificate.
This ensure the identity of both broker and PLC, but the PLC may not have a valid certificate.<br>
In this case a self provided certificate can be used, it shuould be installed in the runtime folder:
In this case a self provided certificate can be used, it shuould be installed in the runtime folder:
- ca.cert.pem: it’s the Certificate Authotity’s certificate
* <b>ca.cert.pem</b>: it’s the Certificate Authotity’s certificate
- client.cert.pem: it’s the PLC’s certificate
* <b>client.cert.pem</b>: it’s the PLC’s certificate
- client.key.pem: it’s the privare key of the PLC
* <b>client.key.pem</b>: it’s the privare key of the PLC
For more information please refer to the online documentation of OpenSSH.
For more information please refer to the online documentation of OpenSSH.<br>
If you are using a self signed certificate for the PLC, the broker may be required to allow unsecured connections.
If you are using a self signed certificate for the PLC, the broker may be required to allow unsecured connections.



Revision as of 16:04, 9 December 2020

The Axel Plc Runtime integrated MQTT Engine allows PLC Programs to publish automatically variable values to any MQTT broker.
It also allows to subscribe the PLC to some Topic on MQTT Broker and updates automatically variable values.
No coding effort is required, it can be interely configured in the LogicLab resources View.
Screenshot01.png Right clicking on the MQTT icon is possible to add an MQTT Broker to which publish the variables, or to to subscribe to for Topics.

Any PLC application can connect to any number of broker.

Connection Tab

Screenshot02 ConnectionTab.png This tab is organized in two sections, Configuration and Defaults.
Defaults reppresents default values for every entry in the other tabs, wich options will be showed later.
The configuration has many fields, as follow:

  • Client name: is the name with which the runtime presents itself to the broker, must be unique for any broker.
  • IP Address: is the IP address, or full qualified name of the broker
  • Port: is the tcp port of the broker
  • TLS: it specify if the connection to the broker is secure and encrypted
  • Common name server: can be the full qualified name of the server, or the common name in the server’s certificate.
  • Username: for the connection to the broker
  • Password: for the connection to the broker.

Note on TLS: with TLS option on all the communication will be encrypted.
Another feature of the TLS is that both Broker and client should present itselves with a certicate issued from a Certificate Authority. This ensure the identity of both broker and PLC, but the PLC may not have a valid certificate.
In this case a self provided certificate can be used, it shuould be installed in the runtime folder:

  • ca.cert.pem: it’s the Certificate Authotity’s certificate
  • client.cert.pem: it’s the PLC’s certificate
  • client.key.pem: it’s the privare key of the PLC

For more information please refer to the online documentation of OpenSSH.
If you are using a self signed certificate for the PLC, the broker may be required to allow unsecured connections.