ns=2;s=DEPRAG Smart/Network/MQTT/ActiveClients/0/Stop
Disconnects the MQTT client from the MQTT broker.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bMqttStop : BOOL;
OutputDataMqttStop : ST_VoidOutputData;
hrMqttStop : HRESULT;
fbMqtt : FB_Mqtt;
END_VAR
hrMqttStop := fbMqtt.Stop(
bExecute := bMqttStop,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sClientId := '0',
OutputData=> OutputDataMqttStop);
IF hrMqttStop <> S_FALSE THEN
bMqttStop := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".