Industrielle styresystemer - Wiki
To use MQTT with CODESYS, the WagoAppCloud library must be imported to the project. This can be done by:
A function block can then be created to simplify the use of the library:
Code Source: https://www.youtube.com/watch?v=UnhG15JFjao&t=822s&ab_channel=JugaadTech
This block can simply be added in a program like this:
Whenever the trigger gets a rising edge, it will publish the message to the broker.