You can use this function to allow the xLogic to subscribe to a message on the MQTT cloud server. Only 8 Subscribe blocks can be placed in one program. Once you have added it to your program, double - click the block to configure it. Connection Description En You enable/disable the block with the signal at input En (1/0). Parameter QoS Level:
QoS 0(no answer) or QoS 1(answer). If you wish to receive a response from the cloud server, select ‘QoS 1’. Subscribe interval time: Subscribe timer setting. If enabled, the xLogic will Subscribe to the message from the cloud server every x seconds. If disabled, the message will only be subscribed to once. Subscribe topic: Fill in the topics you want to subscribe to. However, it should be noted that the topic of the multiple subscribe blocks cannot be the same. Parameter : Set the start register to store the received information data.
Out 1
Digital output. Indicates whether the information was successfully subscribed. 0: Not triggered or did not receive the topic it subscribed to 1: Received a subscription topic
Out 2
Analog output. Subscribe to the status code. 0: Block is not triggered 1: There are no free subscription channels (maximum 8 subscription blocks). 2: Wait for the MQTT server to connect or wait for the subscription channel to be idle. 6: Sending a subscription request 16: The subscription request is successful, waiting to receive the topic of the subscription. 26: Received a topic subscribed to by this block 36: Subscription request failed, waiting for the block subscription timeout 8: Unsubscribe
280
Made with FlippingBook - Online magazine maker