ICP DAS RS-485, RS-232 Technical Document

Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
1 / 17
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.
COM Port:
RS-485/RS-232
Modbus
RTU / ASCII
Module
RS-485: ttyO2, ttyO5 RS-232: ttyO4
Modbus RTU / MySQL(MariaDB) Remote Database
RS-485 RS-232
UA Series
Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
2 / 17
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.
Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
3 / 17
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
Serial Port
Choose the serial port of UA controller that links with the I/O module. ttyO2: RS-485 ; ttyO4: RS-232 ; ttyO5: RS-485
Baud Rate
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.
Data Bits
The number of bits used to represent one byte of data: 7 bits or 8 bits. Default: 8 Bits.
Parity
Choose one way for the parity checking. Options: None, Even, and Odd. Default: None.
Stop Bits
Choose the number of stop bit: 1 bit or 2 bits. Default: 1.
Polling Rate(ms)
Set a time interval for the command. Default: 500 ms
Save
Click [Save] button could save the settings of this page.
Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
4 / 17
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.
3
2. Select the module,
Ex: M-7026
1. Select the port
Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
5 / 17
ICP DAS Co., Ltd. Technical Document
[Module Content Setting] page can set up the module and the Modbus mapping table:
Module Content Setting
No.
The module number in the module list (Not editable here)
Module Name
Give a name, e.g. model number or name. Default: Name.
Slave ID
Set the module Slave ID of the UA. (Range: 1 ~ 247)
Timeout
Set the timeout value for the module. Default: 500 ms
Modbus Mapping Table Setting
Data Model
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)
Start Address
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.
Data Number
The number of the Modbus address. Need to give enough number for the DO, DI, AO, AI channels of the module. Default: 1.
Type
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.
Create Tables
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 ]
Classification
UA-Series English Function Wizard FAQ-dbl-05
Author
Version
1.0.0
Date
2021, 04
Page
6 / 17
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
Address Setting
The Address Setting page of the Modbus Mapping Table
Nickname Setting
Click can switch to the The Nickname Setting page of the Modbus Mapping Table. (Next page)
Modbus Mapping Table
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
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.
Number
The number of the Modbus address. Need to give enough number for the DO, DI, AO, AI channels of the module. At least 1.
Type
DO/DI type: Bool (Boolean) AO/AI type: depend on setting of [Modbus Mapping Table Setting]
Edit
Click to change the address and Number.
Delete
Click to delete this address table.
Save
Click to save and exit this table editing.
Cancel
Click to exit without saving and back to the module list page.
OK
Click to save this page settings and back to the module list page.
Loading...
+ 11 hidden pages