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.