菜单
本页目录

MQTT protocol

1. Enter Simple Connector page

en添加链接1.png

Click the plus sign next to the channel list; adding a channel refers to adding a protocol.
en添加链接2.png

FieldDescription
Equipment TypeSelect the equipment type added previously. Click to view the addition details.
ProtocolThe system will automatically display the corresponding communication protocol based on the equipment type you selected.

2. Add a channel with MQTT protocol

Select the MQTT equipment type. The MQTT protocol differs from other protocols, so additional configuration needs to be filled in when adding the channel. enMQTT1.png

FieldDescription
Broker Server IPThe IP address of the MQTT broker server.
Broker Server PortThe IP address port number of the MQTT broker server.
This Channel's Client IDEach equipment connected to the MQTT broker server has a unique ID, which is automatically generated by the system and does not need to be filled in.

Anonymous Login: Whether to log in anonymously. If you choose "No", you need to fill in the username and password.
enMQTT2.png

FieldDescription
Minimum Reconnection Wait Time (seconds)The duration to wait before attempting to reconnect after the device disconnects from the broker server.
Maximum Reconnection Wait Time (seconds)The maximum allowed duration for the device to perform a reconnection operation with the broker server.
Message Delivery QualityThe quality level of message sending: 0. At most once, no confirmation of receipt required; 1. At least once, ensuring it is received at least once; 2. Exactly once, ensuring the recipient receives it only once

3. Add connection under a channel

After adding a channel, click the plus sign to the right of the channel name to add a connection under it. en添加设备实例.png ens71.png Equipment Instance: Select the equipment instance under this channel.

4.Add tag

Select the connection, and click "Add Tag" on the right.
en添加标签1.png enMQTT3.png

FieldDescription
Tag NameThe name of the tag.
TypeNormal tag or product type tag. The product type tag is used for the system to automatically collect and locate the product model. Normal tag is used for storing real-time data, and be retrieved by the system.
Data TypeThe data type of the PLC data tag.
Field StrategyUsed to distinguish where the data is stored within the MQTT message. If it is "Payload is value", the entire message contains only a single value. If it is "Get field from JSON", it means the MQTT message is a JSON, and the data is a specific JSON field within it, requiring you to fill in the JSON field name.

enMQTT4.png

FieldDescription
TopicEvery MQTT message contains a topic, used to categorize the source and destination of the message.
Scan IntervalThe time interval for polling tags when monitoring them.

After completion, the tags you added will be displayed on the right side. Tags with the "P" character icon represent that it is a tag to store product type info.
en标签列表3.png

5.Connectivity Test

After adding tags, we can test the tags to see if they can receive MQTT messages. SC11.png A access status of "Success" indicates that it can receive messages, meaning the tag can be read correctly
If it shows "Failure", this means the tag cannot receive messages, or the setting of the tag is invalid.
SC12.png