ns=2;s=DEPRAG Smart/Network/MQTT/ActiveClients/0/Id
Unique identification of the MQTT client in the list of active clients.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bMqttReadId : BOOL;
OutputMqttReadId : DINT;
hrMqttReadId : HRESULT;
fbMqtt : FB_Mqtt;
END_VAR
hrMqttReadId := fbMqtt.ReadId(
bExecute := bMqttReadId,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
ClientId := '0',
Output => OutputMqttReadId);
IF hrMqttReadId <> S_FALSE THEN
bMqttReadId := 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".