Checking The Operation Of Subscribe (Sending Of Subscribe Command) - Mitsubishi Electric MELSEC iQ-F Series Quick Start Manual

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

Advertisement

5.2
Checking the Operation of Subscribe (Sending of
Subscribe Command)
Use M+FX5ENET_MQTT_Subscribe (Sending of Subscribe command) for sending a SUBSCRIBE/UNSUBSCRIBE
command to the server (MQTT broker).
(1)
M+FX5ENET_MQTT_Subscribe
(1) FX5U CPU module
(2) FX5-ENET
Program
M27 turns on for setting the information used for M+ENET_MQTT_Subscribe (Sending of Subscribe command).
M27
M29 (Execution command) turns on. After M23 (Execution status) turns on, M21 (SUBSCRIBE instruction) turns on for
sending the SUBSCRIBE command.
After the Subscribe is successfully sent, M26 (Send completion) turns on.
M29
Connection number: K1
M21
M22
Subscribe ID: K1
Maximum QoS: K0
Topic message format: K0
Subscribe topic name data start address: K600
(2)
FB
MOV
K1
D10
MOV
K0
D11
MOV
K0
D12
MOV
K600
D13
M_FX5ENET_MQTT_Subscribe_00A_1
(M+FX5ENET_MQTT_Subscribe_00A)
B: i_bEN
DUT: i_stModule
FX5ENET_1
UW: i_uConnectionNo
D0
B: i_bSubscribe
B: i_bUnSubscribe
UW: i_uSubscribeId
D10
UW: i_uMaxQoS
D11
UW: i_uTopicMessageFormat
D12
UW: i_uSubscribeTopicNameDataAddr
D13

5.2 Checking the Operation of Subscribe (Sending of Subscribe Command)

Subscribe
AWS
Set subscribe ID to K1.
Set the maximum QoS to K0.
Set the topic message format to K0.
Set the Subscribe topic name start address to K600.
MQTT Subscribe FB
o_uErrId :UW
o_bSendOK :B
o_uConnectionStatus :UW
M23
o_bENO :B
M24
o_bOK :B
M25
o_bErr :B
D14
M26
D15
5 CHECKING OPERATIONS
5
44

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-fx5-enet mqtt

Table of Contents