Add MQTT Publisher

Add MQTT Publisher

Configure a MQTT Publisher to publish messages to MQTT Broker defined Topic. Any MQTT client subscribed to that Topic receives the messages.
TIP: The publisher only supports scalar variables. Arrays, UDTs, and other non-scalar variables are not supported.
  1. In Project view, right-click
    MQTT
    , and select
    New
    MQTT Publisher
    .
  2. In , configure:
    Sampling mode
    • None
      - automatic recording is disabled. You can record by invoking the Sample method
    • Periodic
      -  at regular intervals records the values of all selected variables
    • Change in value
      - at regular intervals records only the values of the selected variables that have changed since to the previous sampling.
    Sampling period
    Interval in hours, with millisecond precision, between one sampling and the next, in the Periodic mode.
    Pooling time
    Interval in hours, with millisecond precision, between one sampling and the next, in the Value change mode.
    Folder
    A folder that contains variables whose values will be sent to the broker. The Folder node must be a global object and not a session-based object.
    Topic
    An MQTT Topic to which the publisher sends messages.
    QoS
    MQTT Quality of Service (QoS), defines the guarantee of delivery for a specific message (0, 1, 2).
    0
    - At most once (loss of messages is possible).
    1
    - At least once (ensures message delivery whti possible duplicate messages).
    2
    - Exactly once (ensures message delivery without duplication).
    Retain
    Enables or disables retaining read messages on the topic.
In
Project view
, in the
MQTT
folder, the
MQTT Publisher
object appears.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.