Hi,
I am just trying out the MQTT Client SL library after installing the CODESYS IIoT Libraries into ctrlX PLC.
I am using Cedalo MQTT broker installed in my ctrlX CORE at port 8883.
From ctrlX PLC, I have successfully connected to the MQTT Broker using the MQTTClient function block.
So my next attempt is to subscribe to a mqtt topic by using the MQTTSubscribe function block.
The topic in this case is a "Temperature" topic that was already published to the mqtt broker from a sensor.
My attempt is to retrieve the message from the topic in ctrlX PLC.
According to the FB description, the input wsTopicFilter is a WSTRING(1024) data type.
However after adding the MQTT Subscribe FB and downloaded to PLC, I got the error at the output of the MQTTSubscribe FB:
VAR_OUTPUT MQTTSubscribe.eMQTTError : MQTT_Error --> TOPIC_FILTER_EMPTY
Can anyone help?