Publish topics

MQTT publish topic

This function block allows the configuration of up to 10 items per topic. The items are clustered by the topic type. The data type of the corresponding item is defined in the parameter dialog. If the data type changes at one pin (by configuration), an already connected value is dropped, if it is incompatible.

Each time the function block is called, and there is a high signal at the “publish” pin, the publishing event takes place. Please be aware that this might lead to a high data transfer rate.

Parameters

The topics can be configured over the parameter dialog (upcoming dialog when implementing the function block or over the context menu).

When entering the topic type, the following characters are allowed:

  • A-Z (no umlauts)
  • a-z (no umlauts)
  • 0-9
  • -_.

When entering the name of the item, spaces are allowed.

For both inputs, a maximum of 36 characters is allowed.

 

External: The configuration of the data type will be carried out at the pin “externally” instead of using the parameter dialog. The field “Topic” can be left blank.

Retain: Retained messages are used to provide the subscriber immediately with the last value that was sent to this topic, before the subscription took place. Example: A temperature gauge could show at least an older value instead of showing no value at all.

QoS: refer to Quality of Service (QoS)

Parameter MQTT publish topic
Type not valid

Signals

Name I/O Type(s) Function
DoPub I BIT Publish topic type
Data1 to Data 10 I Different data types Items
Status O Word Send status