0% found this document useful (0 votes)
312 views12 pages

Haiwell MQTT Agency Configuration Guide

The document provides instructions for configuring MQTT communication between Haiwell HMI/CBOX devices on a LAN to enable quadratic configuration and remote data collection. It describes: 1. Setting up an HMI/CBOX as an MQTT master broker to allow other devices to report data to it. 2. Creating projects on the master and slave devices to define data tags and groups for MQTT communication. 3. Using a data interconnection tool to configure data transfer from the HMI/CBOX tags into a MySQL database via the MQTT broker.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views12 pages

Haiwell MQTT Agency Configuration Guide

The document provides instructions for configuring MQTT communication between Haiwell HMI/CBOX devices on a LAN to enable quadratic configuration and remote data collection. It describes: 1. Setting up an HMI/CBOX as an MQTT master broker to allow other devices to report data to it. 2. Creating projects on the master and slave devices to define data tags and groups for MQTT communication. 3. Using a data interconnection tool to configure data transfer from the HMI/CBOX tags into a MySQL database via the MQTT broker.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Haiwell

—MQTT Configuration Guide (LAN)

Xiamen Haiwell Technology Co., Ltd.


www.haiwell.com
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

Table of Contents
Important Statement..........................................................................................................................1
1. Network Diagram.........................................................................................................................3
2. Brief introduction.........................................................................................................................4
3. application scenario.....................................................................................................................4
 quadratic configuration.........................................................................................................4
3.1 Configuration of HMI/CBOX for master.....................................................................4
3.2 Create HMI/CBOX/IPC project...................................................................................4
3.3 MQTT server...............................................................................................................5
3.4 Project downloading..................................................................................................6
3.5 Configuration of HMI for slaver..................................................................................6
3.6 Create a MQTT project...............................................................................................7
 Data collecting and reporting into database........................................................................8
3.7 Project programming..................................................................................................8
3.8 Configuration of data interconnection tool.............................................................10
3.9 Verification................................................................................................................12

Important Statement
The application of MQTT apply to technicians who are proficient in database or MQTT. Hence, it is sorry that we
will not answer to the questions that are not related to PLC or SCADA. If you have any problem about database
or MQTT, please refer to related documents on internet.

** Hint: Computer system is Windows 10 (64-bit) in this article. **


www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

1. Network Diagram
This guide aims to explain how to set up MQTT broker for purpose of achieving quadratic configuration on a
LAN. Reporting data and storing them in a database to achieve the remote data collection.

第 3 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

2. Brief introduction
Haiwell IIOT Cloud HMI/CBOX support MQTT protocol and accessing database server to achieve reporting data
and docking ERP/MES system.
Haiwell IIOT Cloud HMI/CBOX built-in MQTT server to achieve MQTT agency.
Hint: It can only be able on a LAN, and only HMI/CBOX support this function.
3. Application scenario

 Quadratic configuration
3.1 Configuration of HMI/CBOX for master
Enter into HMI/CBOX background-setting-others, open the MQTT agency.

When the MQTT agency has been opened, the current HMI/CBOX is equivalent to a MQTT server. The server IP
is the device local IP. At the same time, other device (HMI/CBOX/IPC) on a same LAN as this device can report
data using the device as a MQTT server.

3.2 Create HMI/CBOX/IPC project


Using this device as MQTT master for purpose of centralized monitoring others on a LAN.
I. Create a new project
Open Haiwell Cloud SCADA Designer, create a new project, add a device and variables.
II. Add a data group
Find the data group in the project browser on the left side and add a new data group.

第 4 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

Apply channels in the pop-up window. Tick on ‘Enable report MQTT’ in storage mode. In this case, the ‘switch’
and ‘value’ will be recorded and uploaded. Hence, the channels applied will be ‘switch’ and ‘value’. If tick on
‘Enable remote write’, these variables can be written remotely. Notice the group identifier and channel
identifiers which will be used in the following MQTT project.

3.3 MQTT server


Open the data reporting server in the project browser and tick on ‘Enable’. Enter the IP address of MQTT broker.
The default of network port of MQTT broker is 1883. Notice the project identifier and it will be used in following
MQTT project. Enable escalation verification if necessary.

第 5 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

3.4 Project downloading


Edit the displays and download this project to HMI.
3.5 Configuration of HMI for slaver
Enter the system setting of HMI. Choose setting and edit terminal name and terminal code.

The terminal name and terminal code also can be setting by system variable, which are $TerminalName,
$TerminalCode. Add graphics in display and bind these two variables.

第 6 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

3.6 Create a MQTT project


I. Create a new project
Open Haiwell Cloud SCADA Designer and create a new project.
II. Add a MQTT device
Find MQTT under device in project browser and add MQTT. Enter the IP address of MQTT broker which should
be the same server as used in the previous project. The default network port of EMQ broker is 1883. The project
identifier should be the same as the previous project. Enable validation if necessary.

第 7 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

III. Add variables


Add a group identifier of the data group on HMI/CBOX/IPC. Enter the terminal name and terminal code of your
HMI and apply the corresponding channel identifier.

IV. Project running


Add graphics in display and bind the variables after adding variables. Download the project, the data from slaver
HMI can be read and written in this MQTT project.

 Data collecting and reporting into database


3.7 Project programming
I. Create a new project
Open Haiwell Cloud SCADA Designer and create a new project. Add device and variables.
II. Add the data group
Find the data group in the project browser on the left side, add a new data group.

第 8 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

Add channel variable in the pop-up window. It’s necessary to tick on ‘Enable Report MQTT’. The added variable
in this guide is ‘switch’,’value’. There are three levels of reporting service quality.
At most once Qos0: The message is sent only once, but it is not received.
At least once Qos1: The message is received at least once, but it may be sent multi times.
For once Qos2: The message is sent and received only once.

The group identifiers correspond to the table names of the database, the channel identifiers correspond to the
field of the table of the database. It’s not necessary to build tables and fields ahead.

第 9 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

III. Configuration of server


Find data reporting server in the project browser on the left side to set server. Tick on ‘Enable’ and enter the
server host IP, that is the IP of opening the MQTT agency device. The default network port of EMQ broker is
1883. Notice the project identifier and make it unique. Enable escalation verification.

IV. Download project


After setting server design the display and download the project to HMI.

3.8 Configuration of data interconnection tool


I. Data interconnection tool
Data interconnection tool is developed by Haiwell use for interconnect with database. Find it in the tool on the
upper side.

II. configuration of tool


Click the ‘data report server’ on the upper left corner to set server. The IP of the host is the same as the device
which open the MQTT agency.

第 10 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

III. Add task


Click the ‘Add task’ on the upper right corner to set task.
The project identifier is corresponding to server project identifier in data center of SCADA while the group
identifier corresponding to remote identification in history group edit. You can refer to ‘Haiwell MySQL database
Configuration Guide’ for other settings. Fill in database option with database created in ‘Haiwell MySQL
database Configuration Guide’, which is SCADA.

第 11 页 共 14 页
www.haiwell.com Haiwell(海为)HMI/CBOX/IPC MQTT Configuration Guide

IV. Start task


Start the task after setting. If start successfully, the ‘Start’ will turn to ‘Terminate’

3.9 Verification
MySQL Database
Remotely access MySQL server via MySQL-front, click the database named base1. As we can see, it’s a table
named group1. Double click the table(group1) and select data browser, the value and switch are stored in the
database and constantly update. Hence the historical data of HMI/CBOX/IPC are already stored in the MySQL
database

第 12 页 共 14 页

You might also like