MQTT_Subscribe block
Short summary
Name |
MQTT_Subscribe |
→POU type |
|
Category |
|
Graphical interface |
|
Available since |
This block is supported for →Raspberry Pi. |
Functionality
The block subscribes to a topic for an established connection determined by a connection handle.
The data is transferred by means of an already existing MQTT broker
Inputs, outputs, return value
|
Identifier |
Description |
|
Inputs: |
ch |
DINT |
connection handler (as obtained by the MQTT_Connect block) |
topic |
STRING |
topic to subscribe to |
|
Outputs: |
rc |
MQTT_RC |
return code of involved MQTT functions as specified in data type MQTT_RC |
Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.
Example for usage within ST-editor
See "MQTT_Unsubscribe block".
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.