Purpose |
Publish a topic and a message to the connected MQTT Broker with a specific QoS .
|
Examples |
MQTT_PUBLISH "test/topic", "Hello From TRi "+STR$(X), 1
|
Comments: |
- The
topic$ is a text string (up to 70 chars max) that contains the topic and sub-topics that the PLC want to publish to
the broker.
- The
data$ is a text string that contain the data associated with the "topic$".
Note: You use the same MQTT_PUBLISHcommand whether the communication with the MQTT broker is encrypted
or not. The encryption status is already established by the MQTT_CONNECT command and would not need to be
specified here.
|
See Also |
MQTT_CONNECT,
MQTT_STATUS(), MQTT_SUBSCRIBE
|