
UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
FAQ-CNV-04: UA Web UI Function Wizard – Module Communication Conversion -
How to Convert Modbus TCP / MQTT ? (Use DL-302)
Modbus / MQTT Conversion include the conversion of MQTT and Modbus RTU / TCP / ASCII three
protocols. With the MQTT Service function, users can set the MQTT client to publish the message to the
specified broker or subscribe the topic, and so to read and write the single channel of the Modbus device
that connected to the controller.
Convert Setting: Modbus TCP and MQTT
Note: The hardware/network connection methods please see the UA Manual Chapter 2 .
When UA series controller connects the Modbus TCP (via Ethernet, as the picture) and read/write the
Modbus I/O via MQTT Broker, user can choose the item [Modbus TCP / MQTT] of the “Module
Communication Conversion” in the Function Wizard.
[Step Box]:
The Step Box of the [Modbus TCP / MQTT] has the steps as below. When enabling the Step Box, it autoenters the first step setting page (The step with a bold underline means it is the current step.). The user
just needs to follow the “Step Box” step-by-step and then can complete the project quickly and rightly.
Convert Setting: Modbus TCP and MQTT

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Step 1. Module Setting
This page is for setting the communication values of the connected modules.
The Ethernet port is LAN for connecting with the TCP module. If using ICP DAS module, select the
module and system will auto load the module data. If not, give a module name (Default: Name), click
[ ] button to add a new module.
Add a module (e.g. No.: 1, Name: DL-302) as below, and then click [Edit] button to enter the
“Module Content Setting” page.
If set up a wrong module, user can click the box in the left side of the module number and click the
[Remove] button to delete the module.
2. Select an ICP DAS module
or give a name, click “+” to add a
module.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
[Module Content Setting] page to set up IP and the Modbus address mapping table.
The module number in the module list (Not editable here)
Give a name, e.g. model number or name. Default: Name.
Give the IP address of the connected module. Default: 0.0.0.0
The port number for Modbus TCP. Default: 502
Set the Slave ID of the UA. (Range: 1 ~ 247)
Set the timeout value for the module. Default: 500 ms
Set a time interval for the command. Default: 500 ms
Modbus Mapping Table Setting
System provides 4 Modbus data models “01”
~ “04” for mapping to address of
DO, DI, AO and AI. (ex. 01: DO
channels, 02: DI, 03: AO, 04: AI)
The start address of the Modbus command. Note: the Start Address of
UA is bass on 0, even if some modules are bass on 1, here it needs to
follow UA to set bass on 0.
The number of the Modbus address. Need to give enough number for
the DO, DI, AO, AI channels of the module. Default: 1.
This item only when the data model is 03 or 04. Choose the suitable data
type: 16-bit Short, 16-bit Unsigned Short, 32-bit Long, 32-bit Unsigned
Long, 32-bit Float, 64-bit Double.
Click [Add] button, it will add a table in the Modbus mapping table.
The finished Modbus Mapping Table as below is in order of DO, DI, AO and AI.
This Example: DL-302
[IP] 192.168.81.251 (by user case)
[Modbus Mapping Table Setting]
Data Model: 04 Input Registers(3x)
Start Address: 0
Data Number: 6
Type: 16-bit Short
Click [Add]

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Address:
Display and edit the Modbus Mapping Table.
Modbus Mapping Table – Address Setting
The “Address Setting” page of the Modbus Mapping Table
Click can switch to the The “Nickname Setting” page of the Modbus
Mapping Table. (Next page)
Coil Status(0x): Mapping to DO Modbus address
Input Status(1x): Mapping to DI Modbus address
Holding Registers(4x): Mapping to AO Modbus address
Input Registers(3x): Mapping to AI Modbus address
The start address of the Modbus command. Default: 0. Note: the Start
Address of UA is bass on 0, even if some modules are bass on 1, here it
needs to follow UA to set bass on 0.
The number of the Modbus address. Need to give enough number for
the DO, DI, AO, AI channels of the module. At least 1.
DO/DI type: Bool (Boolean)
AO/AI type: depend on setting of [Modbus Mapping Table Setting]
Click to change the address and Number.
Click to delete this address table.
Click to save and exit this table editing.
Click to exit without saving and back to the module list page.
Click to save this page settings and back to the module list page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Nickname:
Setting the variable nickname and description.
Modbus Mapping Table – Nickname Setting
Coil Status(0x): Mapping to DO Modbus address
Input Status(1x): Mapping to DI Modbus address
Holding Registers(4x): Mapping to AO Modbus address
Input Registers(3x): Mapping to AI Modbus address
Click [Show] to display all fields, click [Hide] to hide some fields.
Modbus address. System auto arrange.
The variable name of the mapping address. Default: Tag0 and auto
arrange the number. User can define the name.
Display data type of the variable. (Not editable)
Check to swap the byte order (Lo-Hi/Hi-Lo) for 4-byte or 8-byte.
Write a note for this variable.
Click to save this page settings and back to the module list page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Scaling:
Scaling is only available in the AI/AO settings of Modbus RTU/TCP. When the variable value needs to be
scaled or converted before output, click the "Advanced Setting" button of the variable on the Scaling
page, input the Min./Max./Offset of the Reference/Output items, add a description, and check "Enable"
box, The Scaling conversion function will be activated.
Modbus Mapping Table – Scaling
Holding Registers(4x): Mapping to AO Modbus address
Input Registers(3x): Mapping to AI Modbus address
Scaling do not support 01 Coil Status(0x):DO & 02 Input Status(1x):DI
Click [Show] to display all fields, click [Hide] to hide some fields.
Modbus address. System auto arrange.
The I/O variable of the Modbus address.
The scaling variable for scaling output. User can define the variable name.
Click [Show Detail] to set up the Scaling parameters, and click [Hide Detail] to hide
the parameters.
Fill in the Min/Max range values of the source in the Reference column. Fill in the
Min/Max range values after scaling in the Output column. If needs offset, fill the
offset value in the Offset item. Remember check “Enable” box.
Check the box of the variable can enable just that variable for scaling.
Write a note for this variable.
Click to save this page settings and back to the module list page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Bitwise:
Bitwise is only available in the AI/AO settings of Modbus RTU/TCP. When the data needed to take out
the value of the specified bit, fill in the variable name in the specified Bit# of the required address, and
the value of the bit can be output to the filled variable.
The M-7055D has no AI/AO, so here uses other module’s setting screen as an example.
Modbus Mapping Table – Bitwise
Holding Registers(4x): Mapping to AO Modbus address
Input Registers(3x): Mapping to AI Modbus address
Bitwise do not support 01 Coil Status(0x):DO & 02 Input Status(1x):DI
Bitwise do not supports 32-bit Float & 64-bit Double data types.
Click [Show] to display all fields, click [Hide] to hide some fields.
Modbus address. System auto arrange.
The Bit# variables of the Modbus address.
Set up the variables for Bitwise. Click [Advanced Settings] to set up the Bitwise
parameters, and click [Hide] to hide the parameters.
Fill in the variable names to the Bit# that wanted to do the Bitwise. The value in
the fixed bit number will be assigned into the variable.
Click to save this page settings and back to the module list page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Step 2. MQTT Certificate
The [MQTT Certificate] is for setting up security communications to upload the MQTT Trusted Certificate,
Certificate and Private Key. The users upload the file to the UA controller according to the type of
obtained certificate. If you want to perform Broker authentication, you need to upload the Trusted
Certificate. If you want to perform the Broker/Client two-way authentication, you need to upload the
Credential and Private Key additionally. The user can skip this step if the user project does not use
certificate transmission security.
File Setting > MQTT Certificate > Upload the file to the controller
Select File: select the MQTT Trusted Certificate file of the device.
Upload: upload the MQTT Trusted Certificate file to the UA controller.
File format must be PEM. Extension name must be “pem / cer / crt”.
If select a wrong file, the system will show an error message.
Select File: select the MQTT Certificate file of the device.
Upload: upload the MQTT Certificate file to the UA controller.
File format must be PEM. Extension name must be “pem / cer / crt”.
If select a wrong file, the system will show an error message.
Select File: select the MQTT Private Key of the device.
Upload: upload the MQTT Private Key file to the UA controller.
File format must be PEM. Extension name must be “.key”.
If select a wrong file, the system will show an error message.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Step 3. MQTT Broker Setting
Click the next step, and enter the Step 3 [MQTT Broker Setting] of the UI setting.
This page is for setting the IoT platform and the MQTT Broker connection, e.g. the local or remote
broker, port, login information, etc.
We select the “Modbus RTU / MQTT” conversion at the beginning, so this step will auto enter the
[MQTT Connection > Local Broker] page of IoT Platform Setting. The “Step Box” will prevent the user
from selecting the wrong platform. User can choose the local or remote broker for the MQTT
connection.
The example uses local Broker.
Local Broker
MQTT Connection > Local Broker Setting
The COM port of the Local MQTT Broker. System default: 1883
Check to allow anonymous login. Default: Check.
Click to save the setting of this page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
If users apply a remote Broker, the screen will as follow.
Remote Broker:
MQTT Connection > Remote Broker List
The name of the remote MQTT Broker.
User can define the name, e.g. Broker1. Default: Name.
Click to add a new remote Broker.
Click to save the settings of this page.
After creating a new Remote Broker (as below):
MQTT Connection > Remote Broker List
The name of the remote MQTT Broker.
User can define the name, e.g. Broker1. Default: Name.
The IP address of the remote Broker. Default: 127.0.0.1
The COM port of the remote Broker. Default: 1883
Click [Edit] can set the Broker.
Click the left box and [remove] can delete the Broker.
Click to save the settings of this item.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
MQTT Connection > Remote Broker > Broker Content Settings
The name of the remote MQTT Broker. (Editable)
The IP address of the remote Broker. Default: 127.0.0.1
The COM port of the remote Broker. Default: 1883
The keep alive time. Default: 60 (second)
Check to enable the supporting of SSL/TLS security communication.
Default: uncheck.
Check to allow anonymous login. Default: Check.
Click to save the settings and exit.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Step 4. Enable Converting Module
Click the next step, and enter the Step 3 [Enable Converting Module] UI setting
This step is for enabling the module for the Modbus TCP / MQTT conversion.
We select the “Modbus TCP / MQTT” conversion at the beginning, so this step will auto enter the
[MQTT > Modbus TCP (Master)] page of Conversion setting. The “Step Box” will prevent the user
from selecting the wrong platform.
Convert Setting > MQTT > Modbus TCP (Master) Module List
The module number in the module list (Not editable here)
The module name set in the module list (Not editable here)
Check [All Enabled] box to enable all modules in list for conversion.
Default: Uncheck.
Check the box of each module can enable just that module for
conversion.
Click to enter the “MQTT Client Setting” page to set up the Topic, QoS,
Publish, Subscribe …
The page number of the module list: Current page / Total pages. Click <
or > to go to the previous or next page.
Click to save the settings of this page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Click [Edit] button cauld enter the “MQTT Client Setting” page:
Convert Setting > MQTT > Modbus TCP (Master) – MQTT Client Setting
The module number in the module list (Not editable here)
The module name set in the module list (Not editable here)
Set an update frequency for the task data. Default: 1000 (Unit: ms)
Give a dead bend value for updating a float signal. Default: 0
Enter the title of a disconnect notice. Default: Null.
Enter a disconnect notice. Default: Null.
Check the Broker want to use Local Broker or Remote Broker.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Convert Setting > MQTT > Modbus TCP (Master) – Publish & Subscribe
Click [Show] to display all fields, click [Hide] to hide some fields.
The variable name of the mapping address. (Not editable here)
Display data attribute of the variable. (Not editable)
Include: Read, Read/Write…
Display data type of the variable that set in the Modbus Address
Mapping Table page. (Not editable) Include: Bool, Short, Float…
The topic of receiving/subscribing data message.
The subscribe Qos (Quality of Service) levels. Default: 2
0: Delivering a message at most once.
1: Delivering a message at least once.
2: Delivering a message at exactly once.
The topic of sending/publishing data message.
The publish Qos (Quality of Service) levels. Default: 2
0: Delivering a message at most once.
1: Delivering a message at least once.
2: Delivering a message at exactly once.
Check [Retain] box of the top row can store the broker message for all
variables in list. Check the box of each variable can store the broker
message just that variable. Default: Uncheck.
Check [Enabled] box of the top row can enable all variables in list.
Check the box of each variable can enable just that variable for
conversion. Default: Uncheck.
Click to save this page settings and back to the module list page.

UA-Series English Function Wizard FAQ-cnv-04
ICP DAS Co., Ltd. Technical Document
Step 5. Save Project
The setting of this example is finished now. Click the next step [Save Project], the Step Box will show
an animation as below picture, that means the project is saving. When the animation vanished, the
project is saved completely.
Step 6. Run the Project
The project, after saving, needs to be executed. Click the next step [Run the Project]. This step can
also via the [System Setting > Controller Service Setting > Run Project] to Stop and Run the project.
When the words “Please wait” disappears, the new words “Success” appears, that means the UA
controller is running new project successfully. Then the Step Box will disappear automatically now,
and back to the first screen view of the Web UI.
The new project now completes the setting, uploading and running in the UA controller and can
process the conversion communication. Users can see the I/O status from the menu [I/O Status]. For
more about the Web UI settings, please refer to CH4 and CH5.