
UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
FAQ-DBL-05: UA Web UI Function Wizard – Data Log -
How to set up remote database function: Modbus RTU / MySQL(MariaDB) ? (Use
M-7026)
UA series supports Data Logger function. Its Local Data Logger can save l/O data log to local CSV file, and
record I/O status at the scheduled time. Furthermore, users can set the time interval of which CSV file to
generate and divide on the local side. Its Remote Database can import I/O data collection directly into
the remote SQL database, e.g. MS SQL, MySQL, MariaDB …, for the Big Data analysis.
UA Data Logger supports to collect devices I/O status and then directly write into remote side MySQL
/MariaDB Database for the Big Data analysis.
The connection steps for MySQL and MariaDB is the same, so here will introduce them together. The
Modbus / MySQL and MariaDB Remote Database settings include Modbus RTU and TCP. Here will
introduce Modbus RTU as the setting sample.
Modbus RTU / Remote Database MySQL(MariaDB)
Note: The hardware/network connection methods please see the UA Manual Chapter 2.
When UA series controller connects the Modbus RTU module (via RS-485/232, as the picture), user can
choose the item [Modbus RTU / MySQL(MariaDB] of the “Data Log” in the Function Wizard.
Modbus
RTU / ASCII
Module
RS-485: ttyO2, ttyO5
RS-232: ttyO4
Modbus RTU / MySQL(MariaDB) Remote Database

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
[Step Box]:
The Step Box of the [Modbus RTU / MySQL(MariaDB] has 6 steps. When enabling the Step Box, it auto
enters 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.
This example: UA-5231M-4GE via ttyO2 port to connect the device M-7026.

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
Step 1. Controller COM Port Setting
This page allows display and set the COM port interface of the controller for the RS-232/RS-485
serial communication. The user can find the default communication values of our I/O modules from
the module CD, manual or I/O Module website.
COM Port Interface Setting Page
Choose the serial port of UA controller that links with the I/O
module. ttyO2: RS-485 ; ttyO4: RS-232 ; ttyO5: RS-485
Choose a baud rate to communicate with the module: 1200, 2400,
4800, 9600, 19200, 38400, 57600 and 115200. The UA controller
and the I/O module need have the same baud rate.
The number of bits used to represent one byte of data: 7 bits or 8
bits. Default: 8 Bits.
Choose one way for the parity checking.
Options: None, Even, and Odd. Default: None.
Choose the number of stop bit: 1 bit or 2 bits. Default: 1.
Set a time interval for the command. Default: 500 ms
Click [Save] button could save the settings of this page.

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
Step 2. Module Setting
It auto-enter the first step, Step 2 [Module Setting] of the UI setting.
This page is for setting the communication values with the connected modules. First check the port
that connected with the module, and each module can give a name (Default name: Name). Click
[ ] button could add a new module, and then click [Edit] button to configure the module content
and the Modbus mapping table.
The module (Ex: M-7026) is 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 the module,
Ex: M-7026

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
[Module Content Setting] page can set up the module and the Modbus mapping table:
The module number in the module list (Not editable here)
Give a name, e.g. model number or name. Default: Name.
Set the module Slave ID of the UA. (Range: 1 ~ 247)
Set the timeout value for the module. 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.
Example: M-7026
For ICP DAS module, system will auto
setup the Modbus Mapping Table; if
not, user needs to check the Modbus
address or I/O number from the
module user manual.
[Slave ID] 2 (by user’s real 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-dbl-05
ICP DAS Co., Ltd. Technical Document
The finished Modbus Mapping Table as below is in order of mapping DO, DI, AO & AI.
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-dbl-05
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-dbl-05
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-dbl-05
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.
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-dbl-05
ICP DAS Co., Ltd. Technical Document
Step 3. MySQL/MariaDB Connection Setting
Click the next step, and enter the Step 3 [MySQL/MariaDB Connection Setting] of the UI setting.
This page is for setting the connecting remote database.
We select the “Modbus TCP / Remote Database” at the beginning, so this step will auto enter the
[Advanced Setting > Data Logger > MySQL / MariaDB] Setting. The “Step Box” will prevent the user
from selecting the wrong platform.
Add a database identification name (Ex: RemoteDB) as below, and then click [Edit] button to enter
the “MySQL / MariaDB 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.
1. Enter Identification Name
Ex: RemoteDB

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
[MySQL / MariaDB Content Setting] can set up the database relational setting.
Advanced Setting > Data Logger > MySQL/MariaDB – Content Settings
User defined name to identify the database.
The name of the remote database. If it does not exist, it will add a new
database with this name.
The table name of the remote database. If it does not exist, it will add a
new table with this name.
The Server IP and name of the remote database.
The port to connect with database. Default: 3306 (for MySQL/MariaDB)
The login name of the remote database.
The login password of the remote database.
Cycle: Record one log data at the interval time set below.
Data Change: Only record when the data has changed.
Set up the interval time to save the I/O data to the remote database.
Unit: Second.
Select to separate the date and time into two [Columns] or combine the
date and time in one [Column].
Check to enable the data logger to the remote database.
Default: check.
Click to test the connection to the remote database.
Result: Success or Failure.
Click “OK” to save the settings of this page.
Click “Cancel” to exit the setting page without saving.

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
Step 4. Apply Connection & Enable Recording Module
Click the next step, and enter the Step 4 [Apply Connection & Enable Recording Module] UI setting.
This step is to enable the Modbus RTU module and connection.
We select the “Modbus RTU /MySQL(MariaDB)” of “Data Log” at the beginning, so this step will auto
enter the [Logger Setting > MySQL/MariaDB > RTU Module (Master)] setting page. The “Step Box”
will prevent the user from selecting the wrong platform.
Here select and apply the Database name (Ex: RemoteDB), and enable the M-7026.
Logger Setting > MySQL/MariaDB > RTU Module (Master)
The module number in the module list (Not editable here)
The module name set in the module list (Not editable here)
If user wants to enable some I/O channels for data logger, click [Edit]
of that module to enter the “Content Setting”. It is normal to set all
channels as enabled, and the function will not affect the
unconnected channels.
Select and apply the recording remote database name.
Check [All Enabled] box to enable all modules in list for data logger.
Default: Uncheck. Check the “box” of each module can enable just
that module for data logger.
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-dbl-05
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 new project communication. Users can see the I/O status from the menu [I/O Status].
For more about the Web UI settings, please refer to the UA Manual CH4 and CH5.

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
MySQL/MariaDB Remote Database Example Descriptions:
Each tag data and status are recorded in each separate row, the row is added down for each interval,
and the tag data is recorded in time sequence.
For database operation, please refer to FAQ-002 (MySQL) of the UA series FAQ list:
FAQ-002_How to save the UA collected data into SQL and then show trend chart in InduSoft? (Take
MySQL Installer 5.7.31 as an example)
The connection screen view of the MySQL Remote Database.
1. MySQL database screen view: Date/Time column separated (reference)

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
2. MySQL database screen view: Date/Time column combined (reference)

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
The connection screen view of the MariaDB Remote Database.
1. MariaDB database screen view: Date/Time column separated (reference)

UA-Series English Function Wizard FAQ-dbl-05
ICP DAS Co., Ltd. Technical Document
2. MariaDB database screen view: Date/Time column combined (reference)