CDPstudio MQTT Client Setup

To publish and subscribe, we also need a client. The MQTTClient module must be added to the program. Then, in the table editor, the properties "BrokerHost" and "BrokerPort" must be set to the MQTTBroker's properties.

Adding a Publisher/Subscriber

To add a publisher or subscriber, the modules "PublishTopic<datatype>" and "SubscriberTopic<datatype>" must be added to the MQTTClient. These modules are only found when the MQTTClient is selected, and can be found under the submenus "PublishTopic" and "SubscribeTopic":

After adding either, the topic parameter must be set.

  • No labels