Mitsubishi Electric MELSEC iQ-F Series User Manual page 56

Hide thumbs Also See for MELSEC iQ-F Series:
Table of Contents

Advertisement

■Sending messages to a broker (Publish)
FX5 CPU module
(ladder program)
PUBLISH request
FB: MQTT_PublishSend
FB: MQTT_PublishSend
i_bPublish=OFF→ON
i_bPublish=OFF→ON
i_uQoS=0
i_uQoS=0
FB: MQTT_PublishSend: output
FB: MQTT_PublishSend: output
o_bOK=ON
o_bOK=ON
PUBLISH request
FB: MQTT_PublishSend
FB: MQTT_PublishSend
i_bPublish=OFF→ON
i_bPublish=OFF→ON
i_uQoS=1
i_uQoS=1
FB: MQTT_PublishSend: output
FB: MQTT_PublishSend: output
o_bOK=ON
o_bOK=ON
PUBLISH request
FB: MQTT_PublishSend
FB: MQTT_PublishSend
i_bPublish=OFF→ON
i_bPublish=OFF→ON
i_uQoS=2
i_uQoS=2
FB: MQTT_PublishSend: output
FB: MQTT_PublishSend: output
o_bOK=ON
o_bOK=ON
To send a message to a broker, the MQTT client (Ethernet module) sends the PUBLISH command to a broker.
Communication with the broker is performed according to QoS. The following three QoS levels exist.
• QoS0: The sending side sends a message only once with Publish. Actual reception by the receiving side is not guaranteed.
• QoS1: The receiving side receives PUBLISH and then returns PUBACK (acknowledgment response), so that the Ethernet
module can confirm that the message has been sent successfully. The sending side resends the message unless PUBACK
is received. This may cause multiple copies of the same message to be delivered to the receiving side.
• QoS2: The receiving side receives PUBLISH and then returns PUBREC (reception response). The sending side receives
PUBREC and then sends PUBREL (release). The receiving side receives PUBREL and then sends PUBCOMP
(completion). While a message is delivered accurately only once and the service quality is high, the communication load
increases due to the increase in communication traffic.
4 FUNCTION LIST
54
4.3 Other Functions
Ethernet module
QoS 0
PUBLISH (Topic, Data)
PUBLISH (Topic, Data)
QoS=0
QoS=0
QoS 1
PUBLISH (Topic, Data)
PUBLISH (Topic, Data)
QoS=1
QoS=1
PUBACK
PUBACK
QoS 2
PUBLISH (Topic, Data)
PUBLISH (Topic, Data)
QoS=2
QoS=2
PUBREC
PUBREC
PUBREL
PUBREL
PUBCOMP
PUBCOMP
Cloud
Broker

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-f fx5-enetFx5-u-enet-e09r736

Table of Contents