MQTT_Connect block
Short summary
Name |
|
→POU type |
|
Category |
|
Graphical interface |
|
Available since |
This block is supported for →Raspberry Pi. |
Functionality
The block connects a controller to the →MQTT broker the address of which is specified at input address
. An arbitrary client ID can be supplied to the connection.
The data is transferred by means of an already existing MQTT broker (see "Preparing/Realizing data transfer via MQTT").
Inputs, outputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
address of the MQTT broker ( |
|
|
client ID of this connection |
|
|
|
username for this connection to the MQTT broker |
|
|
|
password for this connection to the MQTT broker |
|
|
|
currently not supported: whether to use ( |
|
Outputs: |
|
|
return code of involved MQTT functions as specified in data type |
Return value: |
– |
|
returns the connection handler of the newly created MQTT connection |
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Example for usage within ST-editor
See "MQTT_Disconnect 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.