ICPDAS UA-5200, UA-5231M-3GWA, UA-5231M-4GE, UA-5231, UA-5231M-4GC User Manual

...
ICP DAS CO., LTD.
UA-5200 Series User Manual
IIoT Communication Server
UA-5231M
UA-5231M-3GWA UA-5231M-4GE UA-5231M-4GC
ICP DAS CO., LTD. All Rights Reserved.
www.icpdas.com
2
Warranty
All products manufactured by ICP DAS are under warranty regarding defective materials for a period of one year, starting from the date of delivery to the original purchaser.
Warning
ICP DAS CO., LTD. assumes no liability for damages consequent to the use of this product. ICP DAS CO., LTD. reserves the right to change this manual at any time without notice. The information furnished by ICP DAS CO., LTD. is believed to be accurate and reliable. However, no responsibility is assumed by ICP DAS CO., LTD. for its use, or for any infringements of patents or other rights of third parties resulting from its use.
Copyright and Trademark Information
© Copyright 2015 by ICP DAS CO., LTD. All rights reserved worldwide.
Trademark of Other Companies
The names used for identification only maybe registered trademarks of their respective companies.
License
The user can use, modify and backup this software on a single machine. The user may not reproduce, transfer or distribute this software, or any copy, in whole or in part.
Technical Output:
Please contact local agent or email problem-report to output@icpdas.com . For more product information, please refer to www.icpdas.com .
Technique: Sun Chen & Tim Chen; Translation & Edition: Eva Li & Lisa Chen;
R&D Dept., ICP DAS CO., LTD.
Latest edited by: Eva Li; V4.3, 07/2018
UA-5200 Series User Manual V4.3 ICP DAS
3
Table of Contents
1. UA-5200 IIoT Communication Server ..................................................................................... 6
1.1. Introduction ................................................................................................................... 6
1.2. Features ....................................................................................................................... 7
1.3. Functions ...................................................................................................................... 8
1.4. Specifications ............................................................................................................. 10
1.5. Appearance ................................................................................................................ 13
1.6. Dimensions ................................................................................................................. 16
2. Quick Start ........................................................................................................................... 17
2.1. Hardware Connection ................................................................................................. 17
2.1.1. Preparations for Devices ...................................................................................... 17
2.1.2. Hardware Wiring .................................................................................................. 17
2.2. Network Connection ................................................................................................... 18
2.2.1. Connection by Factory Default Settings ............................................................... 18
2.2.2. Connection by Utility Searching ........................................................................... 20
2.3. Project Setting Example .............................................................................................. 24
2.3.1. A Quick Setup Project Example ........................................................................... 25
3. Web UI Login and Environment Overview ............................................................................ 33
3.1. Login the UA Web UI .................................................................................................. 33
3.2. Web UI Environment Overview ................................................................................... 35
3.3. Setting Procedures and Steps .................................................................................... 36
4. Function Wizard ................................................................................................................... 37
4.1. Module Communication Conversion ........................................................................... 38
4.1.1. Modbus / OPC UA Conversion ............................................................................. 39
4.1.2. MQTT / OPC UA Conversion ............................................................................... 50
4.1.3. Modbus / MQTT Conversion ................................................................................ 61
4.1.4. Modbus / MQTT JSON Conversion ...................................................................... 72
4.2. Module Connecting to Azure ....................................................................................... 88
UA-5200 Series User Manual V4.3 ICP DAS
4
4.2.1. Modbus TCP / Azure Connecting ......................................................................... 89
4.3. PID ........................................................................................................................... 100
4.3.1. PID Operation .................................................................................................... 101
4.4. APP Message Notify .................................................................................................. 111
4.4.1. IFTTT Condition Trigger (Line, Facebook, Twitter) ............................................. 112
5. System Setting ................................................................................................................... 125
5.1. Controller Service Setting ......................................................................................... 126
5.2. Time Setting .............................................................................................................. 127
5.3. Network Setting ........................................................................................................ 129
5.4. Account Setting......................................................................................................... 133
5.5. Boot .......................................................................................................................... 134
5.6. COM Port Interface Setting ....................................................................................... 135
6. Module Setting ................................................................................................................... 136
6.1. Modbus RTU (Master) .............................................................................................. 137
6.2. Modbus TCP (Master) ............................................................................................... 142
6.3. Modbus ASCII (Master) ............................................................................................. 147
6.4. MQTT Module ........................................................................................................... 152
7. IoT Platform Setting ........................................................................................................... 156
7.1. MQTT Local Broker................................................................................................... 157
7.2. MQTT Remote Broker ............................................................................................... 158
7.3. MQTT Group Connection .......................................................................................... 161
7.4. MQTT Connection - Microsoft Azure Platform ........................................................... 165
7.5. OPC UA Connection - Local Server .......................................................................... 168
8. Convert Setting .................................................................................................................. 169
8.1. OPC UA and Modbus RTU/ASCII Conversion .......................................................... 171
8.2. OPC UA and Modbus TCP Conversion ..................................................................... 174
8.3. OPC UA and MQTT Conversion ............................................................................... 177
8.4. MQTT and Modbus RTU/ASCII Conversion .............................................................. 180
8.5. MQTT and Modbus TCP Conversion ........................................................................ 184
UA-5200 Series User Manual V4.3 ICP DAS
5
8.6. MQTT JSON and Modbus RTU/ASCII Conversion ................................................... 188
8.7. MQTT JSON and Modbus TCP Conversion .............................................................. 191
9. Advanced Setting ............................................................................................................... 194
9.1. PID Operation ........................................................................................................... 195
9.2. IFTTT Condition Trigger ............................................................................................ 200
10. I/O Status ........................................................................................................................... 207
11. File Setting ......................................................................................................................... 208
11.1. Settings .................................................................................................................... 209
12. Factory Setting Recovering and Middleware Updating ....................................................... 210
12.1. Recovering to Factory Setting (Rotary Switch: 8) ...................................................... 210
12.2. Updating Middleware via USB (Rotary Switch: 9) ......................................................211
13. Security Certificate: Download/Upload/Update ................................................................... 212
13.1. Download the Certificate of UA Controller ................................................................. 212
13.2. Upload/Update the Certificate to UA Controller ......................................................... 213
Appendix A. MQTT JSON Format of the UA Series ..................................................................... 214
Appendix B. Technical Reference Websites ................................................................................ 215
Appendix C. IFTTT Website Setting ............................................................................................ 216
Appendix D. Updating Middleware via MicroSD Card Manually .................................................. 226
Appendix E. UA Series LED Indicators ........................................................................................ 231
Postscript: Document Version List ............................................................................................... 233
UA-5200 Series User Manual V4.3 ICP DAS
6
1. UA-5200 IIoT Communication Server
This chapter introduces the UA-5200 and its functions, software/hardware specifications...
1.1. Introduction
The UA-5200 series is an IIoT communication server. It has built-in OPC UA server, MQTT broker and client driver to meet the need to connect to the MES, ERP, SCADA and cloud
service. And with the Ethernet, RS-232, RS-485 interfaces and Modbus TCP/RTU/ASCII protocol, the UA-5200 series can access regular remote I/O modules or controllers that already widely used in the factory. With the UA-5200 series, it becomes very easy to make things used in the factory to connect to MES, ERP, SCADA and cloud.
Applying the
OPC UA
, the UA-5200 can integrate the I/O products and the third-party devices, import their data to the back-end SCADA management system or the big-data analysis/decision system, to satisfy the reliability, interoperability and security needs of the Industrial 4.0 automation system. Using the
MQTT
active communications to bridge the Internet of Things (IoT) and transmit the statuses of various devices by the cloud-based interaction so that to meet the current trend of the IIoT and achieve the full smart automation system based on
Industry 4.0
.
UA-5200 Series User Manual V4.3 ICP DAS
7
1.2. Features
OPC UA Server Service  MQTT Client Service  MQTT Broker Inside  ARM CPU, 1.0 GHz  512 MB RAM and 512 MB Flash  Linux kernel 3.2.14 OS  Real-Time Capability  64-bit Hardware Serial Number for Software Protection  Support Redundancy (OPC UA)  Support PID Logic Control  10/100/1000 Mbit/s Ethernet Port  4 Serial Ports (RS-232/RS-485)  Operating Temperature: -25 ~ +75°C
UA-5200 Series User Manual V4.3 ICP DAS
8
1.3. Functions
Built-in OPC UA Server Service
The built-in OPC UA Server Service is compliable with IEC 62541 Standard and provides functions of Redundancy, Transmission Security Encryption, Active Transmission, Error Detection, Communication Failure Recovery, etc. to connect SCADA or OPC UA Clients. Allowed up to 8000 OPC UA tags and up to 20 sessions for the OPC UA Client connection.
Built-in MQTT Broker Service
MQTT Broker inside and compliable with MQTT V.3.1.1 protocol. It provides functions of IoT Active M2M Transmission, QoS Quality Service, Retain Mechanism, Identity Verification, Encryption, Will, MQTT Client Drivers, etc. The Broker can connect up to 400 MQTT Clients.
UA-5200 Series User Manual V4.3 ICP DAS
9
Support IFTTT Logic Control and APP Message Notification
UA can combine the IFTTT cloud platform functions and send messages over 460 Web APPs (such as Line, Facebook, Twitter, etc.) when the special events occur. The device I/O change can be set to trigger the event of the IFTTT cloud service, and the IFTTT logic control (If This, Then That) will immediately let the pre-set Web Service (Such as LINE) send a message to one user or group to handle the event immediately.
Support IoT Cloud Platforms Connection
UA can actively connect to Amazon AWS, Microsoft Azure or other IoT platforms to send over the I/O data. The IoTstar Features:
• Based on Public Cloud: Microsoft Azure, IBM Bluemix, Amazon AWS
• Data Analysis and Report by Public Tools
• Remote Management and Maintenance
• Remote Monitoring and Control
• Cloud Big Data
Provide Step Box of Function Wizard for Easy Setup
The Web UI of UA provides a wizard-like Step Box in the Function Wizard area to guide user step by step to complete the project or function. It provides many items for setting the Communication Conversion, Azure Connecting, Function Configuration, PID Operation, Condition Trigger the APP Message Notification, and will be more. It will help users to set projects easily and quickly even for the new users.
Ethernet and Serial Communication Module Supporting
• In the Ethernet communication, the UA supports up to 100 Modbus TCP Slave
module connections and up to 200 MQTT module connections.
• In the Serial communication, the UA provides three RS-232/RS-485 Serial ports, each of which can connect up to 32 Modbus RTU/ASCII Slave modules.
• Through the UA Web UI, the user can quickly set up the modules and display the
module real-time statuses.
UA-5200 Series User Manual V4.3 ICP DAS
10
1.4. Specifications
Model
UA-5231
UA-5231M
UA-5231M-3GWA
UA-5231M-4GE/4GC
System Software
OS
Linux Kernel 3.2.14
Embedded Service
SFTP server, Web server, SSH
CPU Module
CPU
ARM CPU, 1.0 GHz
DDR3 SDRAM
512 MB
Flash
512 MB
FRAM
64 KB
Expansion Flash Memory
microSD socket with one 4 GB microSD card (support up to 32 GB microSDHC card)
RTC (Real Time Clock)
Provide second, minute, hour, date, day of week, month, year
64-bit Hardware Serial Number
Yes, for Software Copy Protection
Dual Watchdog Timers
Yes
LED Indicators
4 LEDs (Power, Running and 2 user defined LEDs)
Rotary Switch
Yes (0 ~ 9)
VGA & Communication Ports
VGA
1 (Resolution: 640 × 480, 800 × 600, 1024 × 768, 1280 x 720)
Ethernet
RJ-45 x 1; 10/100/1000 Based-TX ( Auto-negotiating, Auto MDI/MDI-X, LED indicators)
USB 2.0 (host)
1
Console Port
RS-232 (RxD, TxD and GND); Non-isolated
ttyO2
RS-485 (Data+, Data-); Non-isolated
ttyO4
RS-232 (RxD, TxD and GND); Non-isolated
ttyO5
RS-485 (Data+, Data-); 2500 VDC isolated
Mechanical
Dimensions (W x L x H)(mm)
91 x 132 x 52
117 x 126 x 58
Installation
DIN-Rail Mounting
Environmental
Operating
-25 ~ +75°C
UA-5200 Series User Manual V4.3 ICP DAS
11
Model
UA-5231
UA-5231M
UA-5231M-3GWA
UA-5231M-4GE/4GC
Temperature
Storage Temperature
-40 ~ +80°C
Ambient Relative Humidity
10 ~ 90% RH (non-condensing)
Power
Input Range
+12 ~ +48 VDC
Consumption
4.8 W
6.5 W
Wireless Communication
(Only For UA-5231M-3GWA / UA-5231M-4GE / UA-5231M-4GC)
GSM System
GSM: 850/900/1800/1900 MHz; GPRS class 12/10; GPRS station class B
3G System
3GWA: WCDMA 850/900/1900/2100 MHz 4GE : WCDMA 850/900/2100 MHz 4GC : WCDMA 900/2100 MHz; TD-SCDMA 1900/2100 MHz;
CDMA2000 (BC0) 800 MHz
4G System
4GE : FDD LTE: B1/B3/B5/B7/B8/B20 MHz 4GC : FDD LTE: B1/B3/B8 MHz; TDD LTE: B38/B39/B40/B41 MHz
Software Specifications: UA-5200Series OPC UA
OPC UA Server
OPC Unified Architecture: 1.02 Core Server Facet Data Access Server Facet Method Server Facet Client Redundancy Facet UA-TCP UA-SC UA Binary User Token User Name Password & X509 Certificate Security Policy
None
Basic128Rsa15
• Sign
• Sign & Encrypt
Basic256
• Sign
•Sign & Encrypt
Recommend to keep the maximum number of sessions within 20 connections.
UA-5200 Series User Manual V4.3 ICP DAS
12
Model
UA-5231
UA-5231M
UA-5231M-3GWA
UA-5231M-4GE/4GC
Modbus Master
Modbus TCP
To read or control the devices that support standard Modbus TCP Slave protocol. Recommend to keep the maximum number of devices within 100 connections.
Modbus RTU/ASCII
A max. of 3 ports: ttyO2, ttyO4, ttyO5 to connect other Modbus RTU Slave devices (e.g. M-7000). Recommend no more than 32 devices per port for better communication quality.
MQTT
MQTT Client
Connect the MQTT Broker to read/control the devices supporting the MQTT protocol.
MQTT Service
Connect the MQTT Broker to externally read/control the devices supporting other protocols that linking with the UA-5200 series.
MQTT Broker
Compliance with MQTT v3.1.1 protocol. Support MQTT message distribution management. Recommend to keep the connection number of Client within 400.
Virtual Device
PID Function
Combine the remote I/O devices for the PID logic control system.
4GE/4GC Frequency Band Descriptions: UA-5231M-4GE: Frequency Band for EMEA, Korea, Thailand, India and Taiwan UA-5231M-4GC: Frequency Band for China
UA-5200 Series User Manual V4.3 ICP DAS
13
1.5. Appearance
UA-5231
UA-5200 Series User Manual V4.3 ICP DAS
14
UA-5231M
UA-5200 Series User Manual V4.3 ICP DAS
15
UA-5231M-3GWA / 4GE / 4GC
UA-5200 Series User Manual V4.3 ICP DAS
16
1.6. Dimensions
UA-5231
Unit: mm
UA-5231M / UA-5231M-3GWA / UA-5231M-4GE / UA-5231M-4GC
Unit: mm
UA-5200 Series User Manual V4.3 ICP DAS
17
2. Quick Start
This chapter describes the devices hardware connection, network connection and quick setting for the UA-5200 Controller, and how to connect to the UA controller web-based UI via a browser, set web functions step-by-step, and complete an example project.
2.1. Hardware Connection
This section describes the hardware wiring and connection for the UA-5200 Controller.
2.1.1. Preparations for Devices
In addition to the UA-5200 series controllers (Ex: UA-5231), please prepare the following:
Power Supply: +12 ~ +48 VDC (Ex: DP-665) 2. Ethernet Hub or Switch (Ex: NS-205) 3. PC/NB: Can connect to the network and set the network
2.1.2. Hardware Wiring
Connect the UA-5200 with the RJ-45 Ethernet port to an Ethernet hub/switch and PC. You can also link directly the UA-5200 to PC with an Ethernet cable.
After power is connected, please [ wait 1 minute ] for UA-5200 start-up procedure. When the "RUN/PWR" light starts flashing, it represents the boot is complete.
Power Supply
(12 ~ 48 VDC)
GND
Ethernet
Cable
Ethernet
Cable
Hub/Switch
P.GND
PWR
UA-5200 Series User Manual V4.3 ICP DAS
18
2.2. Network Connection
This section introduces how to connect to the UA-5200 Web User Interface (UA Web UI). The new user or setting the new UA controller is recommended to follow the method in the first session. (The same method as the UA-5200 Quick Start manual)
2.2.1. Connection by Factory Default Settings
The factory default settings of the UA-5200 are as the following table:
Factory Default Settings of UA-5200
Network
IP
192.168.255.1
Assign UA-5200 a new IP setting according to your case.
Netmask
255.255.0.0
Gateway
192.168.1.1
OS
Account
Username
root
After login, change your password ASAP. (Refer User
Manual)
Password
icpdas
Web UI
Account
Username
root
Password
root
1. Change the PC’s IP setting as following. (Write down the PC original network settings before modify.)
IP
192.168.255.10
Subnet mask
255.255.0.0
Gateway address
192.168.1.1
2. Make sure the PC and UA-5200 is connecting through Ethernet. And then open a PC side browser (Ex: Chrome, IE). Type http://192.168.255.1 in the URL address. Use default Web UI username/password root/root to login the system.
UA-5200 Series User Manual V4.3 ICP DAS
19
3. ClickSystem SettingNetwork Setting【Network Setting(LAN1)】to change the IP setting by user network.
4. Save the IP setting, restore the PC original IP settings, and type the new IP in the browser as step-2 to login the Web UI of UA-5200. And then configure users UA project.
UA-5200 Series User Manual V4.3 ICP DAS
20
2.2.2. Connection by Utility Searching
The method of using the UA-5200's factory default settings has described in the Section
2.2.1.
If the UA-5200 has a fixed IP and in the same domain as the PC, users can directly enter the IP in the address bar of a web browser and log in to the Web UI of the UA-5200.
In addition to the above 2 methods, users also can use the UA Utility to search Network. This method is suitable for connecting multiple UA series controllers to the Internet, but the IP addresses of UA-5200 are unknown or need to quickly modify the UA controller.
UA Utility is UA's free tool software to quickly search each UA-5200 controller on the network and connect to the UA-5200's Web UI for setting UA series controller and project.
In the PC, install the UA-5000 Utility (named UA-5000utility.exe”) at the path of the companion CD (i.e., CD:/UA-5000/Utility/). Please copy this file to your PC, and then run it to connect the device. Or download the utility program from the website:
http://ftp.icpdas.com.tw/pub/cd/ua-5000/utility/
1. Install and execute the Utility
Run the UA-5000 Utility (file name: UA-5000utility.exe) to install the Utility program.
UA-5200 Series User Manual V4.3 ICP DAS
21
2. Create a new connection
Click New to add a connection item and give a name for it.
3. Search the UA-5200 controller
Mouse double-click on the name you created (or single-click and then click the “Connect” button), this utility will scan and list all UA-5200 devices over the network.
1
2
UA-5200 Series User Manual V4.3 ICP DAS
22
4. Connect to the UA-5200 controller
Click the device name you want to connect to, and then click the Connect button. It will connect to the UA-5200 webpage via the default Web browser (IE/Chrome).
5. Connect to the UA-5200 controller
The default web browser will be run and direct go to the UA-5200 login web site. Please enter the username and password to login the UA series Web UI. The factory default user name: root. The factory default password: root.
2
1
UA-5200 Series User Manual V4.3 ICP DAS
23
6. Login the Web UI of the UA-5200 controller
When login into the web interface, the UA-5200 default home page (the main configuration screen) will be displayed as below, and will automatically read setting of that UA-5200 to the webpage.
UA-5200 Series User Manual V4.3 ICP DAS
24
2.3. Project Setting Example
The screen view after login the UA-5200 Web UI (Web User Interface) is as the following picture. Then can start to setup the UA series controller.
If your UA-5200 controller has not connected to the Web UI, please refer to Section 2.1
Hardware Connection and Section 2.2 Network Connection.
This section will introduce a quick setup method to complete a simple project example to allow users to learn about the project setting flow and steps.
The quick setup method is to use the [ Function Wizard ] that at the up-right corner of the Web UI since Version V2.0.0. The Function Wizard provides several items for quick setting the projects or functions step by step like the Wizard guide. The users just follow the step box” and then can complete the project quickly and well. For more detail information of the Function Wizard, please refer to Chapter 4.
The user can also select the main menu function of the Web UI to setup the project. The complete detail description of the menu functions, please see Chapter 5 ~ Chapter 11.
UA-5200 Series User Manual V4.3 ICP DAS
25
2.3.1. A Quick Setup Project Example
This example will setup a project for OPC UA and Modbus RTU (Master) communication protocol conversion using the Function Wizard. The devices include a UA-5231 controller and an M-7055D module that wired with RS-485 interface to read/write the Modbus RTU I/O data and need the convert setting. The connection is show as the picture below.
Note:Function Wizardat the up-right corner of the Web UI is a quick setup area.
The hardware/network connection methods please see the Sec. 2.1 and Sec. 2.2.
This sample uses the conversion function of the Function Wizard to convert the Modbus RTU / OPC UA, so first click the (Master) Modbus RTU / OPC UA item of the Function Wizard.
The Web UI will enable a Wizard guide mode and show a Step Box (as below picture). The user just needs to follow the Step Box” step by step and then can complete the project quickly and correctly.
RS-485
M-7055D
DO x 8 DI x 8
ttyO5
UA-5200 Series User Manual V4.3 ICP DAS
26
After click the(Master) Modbus RTU / OPC UA】, follow the Step Box to complete the 6 steps: (The step with a bold underline means it is the current step.)
Step 1. Controller COM Port Setting
This step sets up the COM port of the UA series controller to connect with the module and the communication setting.
<This Example> The UA-5231 uses the ttyO5 port to connect with the M-7055D, so set the Serial Port: ttyO5. The M-7055D module default setting is 9600, 8, N, 1, so set Baud Rate: 9600, others need not to change. After setting, click [Save] button to save the current
settings. (The user also can save the whole project until the step 5 of Save Project.)
Note: If user uses other port to link other module, or the module is not in the default
state, please set this step according to your case. The M-7055D default state can be found in the Module CD or the Product Web Site .
UA-5200 Series User Manual V4.3 ICP DAS
27
Step 2. Module Setting
Click the next step, and enter the Step 2 [Module Setting] of the UI setting.
This step is for setting the connected modules. The user can set each module a name (Default name: Name), click [ ] button to create a new module, and click [Edit] button
to configure the module content setting and Modbus mapping table.
<This Example>
First select the Serial Port: ttyO5, give the Module Name: M-7055D, and then click the button [ ] to add a Module List.
Add a module M-7055D as below, and then click [Edit] button to enter the Module Content Setting page.
1
3. Give a name,
Ex: M-7055D
4. Click to add
2. This sample: ttyO5
5
UA-5200 Series User Manual V4.3 ICP DAS
28
[Module Content Setting] page can set up the module and the Modbus address mapping table:
Please set up the addresses mapping with the module I/O channels in the [Modbus
Mapping Table Setting]. The system provides 4 Modbus data models (as below) “01” to “04” for mapping to the DO, DI, AO and AI channels.
Please note that, the start address of UA series controller is start from address 0. Although some modules are start from address 1, but here users must to set the start address from 1, and set enough Data number for mapping to the I/O channels of the linking module.
UA-5200 Series User Manual V4.3 ICP DAS
29
In this example, the M-7055D has DO and 8 DI channels, please create the table as following pictures of the [Modbus Mapping Table Setting]. After complete the setting, the DO and DI Modbus address settings will show in the [Modbus Mapping Table].
M-7055D 8 DO setting and the [Coil Status(0x)] table after setting are as below:
M-7055D 8 DI setting and the [Input Status(1x)] table after setting are as below:
After setting, the Modbus Mapping table is showing as below. Click [OK] to save and exit.
For more setting item description, please refer to chapter 6. Module Setting.
DO mapping 01
UA start address: 0
DO x 8
Click [Add]
DI mapping 02
UA start address: 0
DI x 8
Click [Add]
UA-5200 Series User Manual V4.3 ICP DAS
30
Step 3. OPC UA Connection
Click the next step, and enter the Step 3 [OPC UA Connection] of the UI setting
This step is for setting the IoT platform and the OPC UA connection, e.g. the server name, port, login identity information, etc.
We select the “Modbus RTU / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA Connection > Local Server] page of IoT Platform Setting. The Step Box will prevent the user from selecting the wrong platform.
<This Example>
The server name and port of [OPC UA Connection] will auto show up, user needs not to change in this example, but can change the port if needs.
The Anonymous Login default enables, you need not to change in this example. At last click [Save] button.
About other login methods will be found in the [OPC UA Connection] of the Chapter 7
IoT Platform Setting .
UA-5200 Series User Manual V4.3 ICP DAS
31
Step 4. Enable Converting Module
Click the next step, and enter the Step 4 [Enable Converting Module] UI setting
This step is for enabling the Modbus RTU / OPC UA conversion.
We select the “Modbus RTU / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA > Modbus RTU (Master)] page of Conversion setting. The Step Box will prevent the user from selecting the wrong platform.
<This Example>
In this setting page, please check the enable box of the module M-7055D we set up in the previous steps. And click [Save] button.
The above action will enable all I/O channels of the M-7055D for communication conversion. If users need to enable some channels only, please click [Edit] to enable individual channels. (Refer to Chapter 8)
1
2. Check the box
UA-5200 Series User Manual V4.3 ICP DAS
32
Step 5. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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].
The Step Box will show the words Please wait” (as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And then the Step Box will disappear automatically now, and back to the first screen view of the Web UI.
This example now completes the setting, uploading and running in the UA-5231 controller that connected with the M-7055D and can convert the OPC UA and Modbus RTU protocol communication.
For more and detail setting descriptions of the Web UI, please refer to the following chapters.
UA-5200 Series User Manual V4.3 ICP DAS
33
3. Web UI Login and Environment Overview
This chapter introduces the ways to login the UA Web User Interface (UI) and the environment of the Web UI of the UA series (IIoT Communication Server), including the version display, system information, function areas, etc. The detail information of the menus, functions, parameters, etc. will be introduced in the next chapters.
3.1. Login the UA Web UI
The methods to login the UA series Web UI:
A. Using Factory Default Setting: Suitable for the UA new user, setting the new UA
controller, or the controller network IP is unknown. This method changes the PC network IP to be the same domain with the UA factory default network IP to login the Web UI. (Refer Section 2.2.1)
B. Using Software Utility: UA Series provides a free software utility for auto searching
the UA controllers in the network and can quick jump to the login web page of the UA controller. It’s very suitable for quick setting when many UA controllers in the network but the IP are unknown. (Refer Section 2.2.2)
C. Using IP Address: If the UA-5200 has a fixed IP and in the same domain as the PC,
users can directly enter the IP in the address bar of a web browser and log in to the Web UI of the UA-5200. Its suitable for the users how familiar the series controllers.
The login web page for the Web UI of the UA series is as below. Enter the username and password can log in to set up the UA controller. (Default username/password: root/root)
UA-5200 Series User Manual V4.3 ICP DAS
34
After log in the Web UI, the version information is first displayed on the screen. It includes: the version of the install Middleware program, main program and Web Interface (and date). The following picture shows the screen view of the Web UI since Version 2.0.0.
UA-5200 Series User Manual V4.3 ICP DAS
35
3.2. Web UI Environment Overview
The function setting of the Web UI is including the following areas. The next seven chapters will introduce the settings of the functions and parameters. Here will overview these areas.
1. Function Wizard: A quick setup area for commonly used projects or functions suits the
new users. The Web UI will enable a Wizard mode and show a Step Box. The user just follows the Step Box step by step and then can complete the project quickly and rightly. (Refer Chapter 4)
2. Main Menu Area: The main menu contains all the setting functions that classified into
six categories. Click the main menu item, the sub-menu will appear on the bottom left of the page, and the function descriptions will appear under the main menu area. (Refer from Chapter 5)
3. Sub-Menu Area: The sub-menu will display detailed functions under the selected
main menu. The user could setup or review detailed function options in the setting area. (Refer from Chapter 5 )
4. Setting Area: The setting area is for reviewing and setting the functions and
parameters of UA series controller. The content of this area will be varied according to the selected main menu and sub-menu. (Refer
Chapter 5 )
1
2
3
4
UA-5200 Series User Manual V4.3 ICP DAS
36
3.3. Setting Procedures and Steps
Procedures for Project/Function Setting: The function setting procedure for the UA series controllers is to set up from the left to the right of the main menu functions. The Function Wizard even provides the Step Box for new users to follow the steps and prevent from selecting the wrong function, e.g. the steps of the commonly used project about the Modbus communication and conversion with the OPC UA protocol are listed as follows:
Function/Project Procedures:
Controller Setting > Module Setting > Connecting OPC UA (in IoT Platform) > Conversion >
File Setting > Execution
Main Menu:
Step Box of the Function Wizard:
The chapter 2 provides an example for user to quickly know the setting procedure, and the
chapter 4 provides various commonly used projects and functions for user to apply.
Steps for List Setting:
About the List setting of module, connection, they have the similar steps as below:
1. Select the port number, name for the list (module, connect)
2. Give a name or nickname, normally default name: Name
3. Click the button [ ] to add a list of module, connect
4. Click the button [Edit] to enter the Content Setting page
5. Set up the list content, and then click [Save] to back to the list page.
EX: Modbus TCP Module List:
2. Give the name
3. Click add
1. Select the port
4. Click Edit to set the content
UA-5200 Series User Manual V4.3 ICP DAS
37
4. Function Wizard
[Function Wizard] at the up-right corner of the Web UI since the version V2.0.0 provides a quick setting “Step Box suitable for new users to set up the projects or functions.
[Step Box] (As below picture) is a Wizard-like step guide. When the user selects a function item of the Function Wizard, the Web UI will enable a Wizard mode and show a Step Box. The user just needs to follow the Step Box step by step and then can complete the project or function quickly and rightly.
This chapter will focus on the steps and function settings. About the real module using, refer to Section 2.3.1 , there is a project using M-7055D and UA-5231, and converting Modbus RTU with OPC UA protocol. The user could see that chapter and this chapter to know more procedure concept and setting tips.
Function Wizard will develop more functions or projects, but now there are 16 items in 4 major categories, this chapter will introduce them in three sections.
4.1
4.2
4.3
4.4
UA-5200 Series User Manual V4.3 ICP DAS
38
4.1. Module Communication Conversion
Module Communication Conversion of UA series, a very commonly used function, can effectively communicate the IoT devices or systems (e.g. cloud, database) with I/O data of the module (e.g. Modbus module). This section will introduce the setting steps and the function parameters of the Module Communication Conversion. There are 9 items in this category that can be divided into 3 protocol types and introduced in 3 sub-sections: OPC UA, MQTT, MQTT JSON.
Modbus / OPC UA Conversion
Using the OPC UA Service function to convert with Modbus RTU/TCP/ ASCII protocols. (Section 4.1.1)
MQTT / OPC UA Conversion
Using the OPC UA Service function to convert with MQTT protocols. (Section 4.1.2)
Modbus / MQTT Conversion
Using the MQTT Service function to convert with Modbus RTU/TCP/ ASCII protocols. (Section 4.1.3)
Modbus / MQTT JSON Conversion
Using the MQTT Service function in group of JSON format to convert with Modbus RTU/TCP/ ASCII protocols. (Section 4.1.4)
UA-5200 Series User Manual V4.3 ICP DAS
39
4.1.1. Modbus / OPC UA Conversion
Modbus / OPC UA Conversion include the conversion of OPC UA and Modbus RTU / TCP / ASCII three protocols. With the OPC UA Service function, the OPC UA Server can read and write the Modbus RTU/TCP/ASCII devices that connected to the controller.
The settings of Modbus RTU/ASCII are the same. Here will introduce them together for a setting sample.
Modbus / OPC UA Function Diagram:
Application Solution:
UA-5200 Series User Manual V4.3 ICP DAS
40
Convert Setting: Modbus RTU/ASCII and OPC UA
Note: The hardware/network connection methods please see the Chapter 2.
When UA series controller connects the Modbus RTU or ASCII module (via RS-485 / RS-232, as the picture) and read/write the Modbus I/O by OPC UA Server, user can choose the item [Modbus RTU / OPC UA] or [Modbus ASCII / OPC UA] of the Module Communication Conversion in the Function Wizard.
[Step Box]: The Step Box of the [Modbus RTU / OPC UA] and [Modbus ASCII / OPC UA] has the same 6 steps, here will introduce them together. 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.
COM Port:
RS-485/RS-232
Modbus
RTU
Module
RS-485: ttyO2, ttyO5 RS-232: ttyO4
Convert Setting: Modbus RTU/ASCII and OPC UA
RS-485 RS-232
UA Series Controller
UA-5200 Series User Manual V4.3 ICP DAS
41
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.
UA-5200 Series User Manual V4.3 ICP DAS
42
Step 2. Module Setting
Click the next step, and enter the Step 2 [Module Setting] of the UI setting.
This page is for setting the communication values with the connected modules. First choose the serial 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.
Add a module (No.: 1, Name: Example1) 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.
1
3. Give a name,
Default: Name
4. Click to add
2. Select the serial port
5
UA-5200 Series User Manual V4.3 ICP DAS
43
[Module Content Setting] page can set up the module and the Modbus address 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-5200. (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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to set follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
44
The finished Modbus Mapping Table as below is in order of DO, DI, AO and AI.
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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
45
Modbus Mapping Table – Nickname Setting
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
Table Display
Click [Show] to display all fields, click [Hide] to hide some fields.
Address
Modbus address. System auto arrange.
Variable name
The variable name of the mapping address. Default: Tag0 and auto arrange the number. User can define the name.
Data Type
Display data type of the variable. (Not editable)
Swap
Check to swap the byte order (Lo-Hi/Hi-Lo) for 4-byte or 8-byte.
Description
Write a note for this variable.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
46
Step 3. OPC UA Connection
Click the next step, and enter the Step 3 [OPC UA Connection] of the UI setting. This page is for setting the IoT platform and the OPC UA connection, e.g. the server name, port, login identity information, etc.
We select the “Modbus RTU / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA Connection > Local Server] page of IoT Platform Setting. The Step Box will prevent the user from selecting the wrong platform.
OPC UA Connection > Local Server Setting –Server
Server Name
Display the active OPC UA Server name. Not editable. System values: ICPDAS_OPC_UA_Server
Port
The communication port number of the OPC UA Server. System Default: 48010.
Save
Click to save the settings of this item.
OPC UA Connection > Local Server Setting –User Identity Tokens
Anonymous Login
Check to enable the anonymous login of clients. Default: check.
User Password Login
Check to enable the user password login of clients. Default: uncheck.
Certificate Login
Check to enable the certificate login of clients. Default: uncheck.
Save
Click to save the settings of this item.
UA-5200 Series User Manual V4.3 ICP DAS
47
Step 4. Enable Converting Module
Click the next step, and enter the Step 4 [Enable Converting Module] UI setting This step is for enabling the Modbus RTU (or ASCII) / OPC UA conversion.
We select the “Modbus RTU (or ASCII) / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA > Modbus RTU/ASCII (Master)] page of Conversion setting. The Step Box will prevent the user from selecting the wrong platform.
Convert Setting > OPC UA > Modbus RTU (Master) Module List
No.
The module number in the module list (Not editable here)
*Module Name / Nickname
The module name set in the module list (Not editable here)
All Enabled
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.
Edit
If user wants to enable some I/O channels for conversion, click [Edit] of that module to enter the Variable Tale setting. It is normal to set all channels as enabled, and the conversion will not affect the unconnected channels.
The page number of the module list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
48
Click [Edit] button cauld enter the Module Content Setting page:
Convert Setting > OPC UA > Modbus RTU (Master) – Module Content
No.
The module number in the module list (Not editable here)
Module Name
The module name set in the module list (Not editable here)
Convert Setting > OPC UA > Modbus RTU (Master) – Variable Table
Name
Display the variable name that set in the Modbus Address Mapping Table page (Not editable here)
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable that set in the Modbus Address Mapping Table page. (Not editable) Include: Bool, Short, Float
Enabled
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.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
49
Step 5. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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].
The Step Box will show the words Please wait(as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And 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.
UA-5200 Series User Manual V4.3 ICP DAS
50
4.1.2. MQTT / OPC UA Conversion
MQTT / OPC UA Conversion include the conversion of OPC UA and MQTT protocols. With the OPC UA Service function, the OPC UA Server can read and write the MQTT device that connected to the controller.
MQTT / OPC UA Function Diagram:
Application Solution:
UA-5200 Series User Manual V4.3 ICP DAS
51
Convert Setting: MQTT and OPC UA
Note: The hardware/network connection methods please see the Chapter 2 .
When UA series controller connects the MQTT module (via Ethernet, as DL-302 in the picture) and through the OPC UA server to read/write the I/O data of the MQTT module, user can choose the item [MQTT / OPC UA] of the Module Communication Conversion in the Function Wizard.
[Step Box]: The Step Box of the [MQTT / OPC UA] has 6 steps as below. 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.
Ethernet Port
MQTT
Module
(DL-302)
Convert Setting: MQTT and OPC UA
Ethernet
LAN: Ethernet Port
UA Series Controller
UA-5200 Series User Manual V4.3 ICP DAS
52
Step 1. MQTT Broker Setting
The [MQTT Broker Setting] 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 “MQTT / OPC UA conversion, so this step will auto enter the [IoT Platform Setting > MQTT Connection > Local Broker] page. The Step Box will prevent the user from selecting the wrong platform. User can choose the local or remote broker for the MQTT connection.
MQTT Connection > Local Broker Setting
Port
The COM port of the Local MQTT Broker. System default: 1883
Anonymous Login
Check to allow anonymous login. Default: Check.
Save
Click to save the setting of this page.
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
Click to add a new remote Broker.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
53
After creating a new Remote Broker (as below) :
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Edit / Remove
Click [Edit] can set the Broker. Click the left box and [remove] can delete the Broker.
Save
Click to save the settings of this item.
MQTT Connection > Remote Broker > Broker Content Settings
Broker Name
The name of the remote MQTT Broker. (Editable)
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Keep Alive Time
The keep alive time. Default: 60 (second)
SSL/TLS
Check to enable the supporting of SSL/TLS security communication. Default: uncheck.
Anonymous Login
Check to allow anonymous login. Default: Check.
OK
Click to save the settings and exit.
UA-5200 Series User Manual V4.3 ICP DAS
54
Step 2. Module Setting
Click the next step, and enter the Step 2 [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, 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.
Add a module (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.
Click [Edit] can enter the [MQTT Client Setting] page to set up the MQTT Client and the MQTT Variable and the MQTT Variable table.
3. Give a name,
Ex: Model name
DL-302
Default: Name
2. Ethernet port: LAN
5
1
4. Click to add
UA-5200 Series User Manual V4.3 ICP DAS
55
[MQTT Client Setting] page:
MQTT Client 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.
MQTT Connection
Check the Broker want to use Local Broker or Remote Broker.
MQTT Variable Setting
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the MQTT variable. Include: Bool, Short, Unsigned Short, Long, Unsigned Long, Float, Double, String.
Data Number
The number for the I/O variables of the module. Default: 1.
Create Tables
Click [Add] button, it will add a variable list in the MQTT Variable Table.
Details Show / Hide
Click [Show] to display all fields, click [Hide] to hide some fields. The hide fields: Subscribe QoS, Publish QoS, Retain.
UA-5200 Series User Manual V4.3 ICP DAS
56
[MQTT Variable Table] :
MQTT Variable Table
Details Show / Hide
Click [Show] to display all fields, click [Hide] to hide some fields. The hide fields: Subscribe QoS, Publish QoS and Retain.
Remove Table / Remove
Check the box in the left of the variable is to select that variable list, and click the remove on the box can delete that variable list. Click the Remove of the Remove Table” will delete all lists.
Name
The name of the MQTT variable. Default: Tag#
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable. Include: Bool, Short, Unsigned Short, Long, Unsigned Long, Float, Double, String
Subscribe Topic
The topic of receiving/subscribing data message.
Subscribe Qos
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.
Publish Topic
The topic of sending/publishing data message.
Publish Qos
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.
Description
For users set up the description for the variables.
Retain
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.
OK / Cancer
Click [OK] to save and exit the page settings. Click [Cancer] to exit without saving.
UA-5200 Series User Manual V4.3 ICP DAS
57
Step 3. OPC UA Connection
Click the next step, and enter the Step 3 [OPC UA Connection] of the UI setting. This page is for setting the IoT platform and the OPC UA connection, e.g. the server name, port, login identity information, etc.
We select the “MQTT / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA Connection > Local Server] page of IoT Platform Setting. The Step Box will prevent the user from selecting the wrong platform.
OPC UA Connection > Local Server Setting –Server
Server Name
Display the active OPC UA Server name. Not editable. System value: ICPDAS_OPC_UA_Server
Port
The communication port number of the OPC UA Server. System Default: 48010.
Save
Click to save the settings of this item.
OPC UA Connection > Local Server Setting –User Identity Tokens
Anonymous Login
Check to enable the anonymous login of clients. Default: check.
User Password Login
Check to enable the user password login of clients. Default: uncheck.
Certificate Login
Check to enable the certificate login of clients. Default: uncheck.
Save
Click to save the settings of this item.
UA-5200 Series User Manual V4.3 ICP DAS
58
Step 4. Enable Converting Module
Click the next step, and enter the Step 4 [Enable Converting Module] UI setting This step is for enabling the MQTT / OPC UA conversion.
We select the “MQTT / OPC UA” conversion at the beginning, so this step will auto enter the [OPC UA > MQTT] page of Conversion setting. The Step Box will prevent the user from selecting the wrong platform.
Convert Setting > OPC UA > MQTT - MQTT Module List
No.
The module number in the module list (Not editable here)
*Module Name / Nickname
The module name set in the module list (Not editable here)
Edit
If user wants to enable some I/O channels for conversion, click [Edit] of that module to enter the Variable Tale setting. It is normal to set all channels as enabled, and the conversion will not affect the unconnected channels.
All Enabled
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.
The page number of the module list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
59
Click [Edit] button cauld enter the Module Content Setting page:
Convert Setting > OPC UA > MQTT – Module Content Setting
No.
The module number in the module list (Not editable here)
Module Name
The module name set in the module list (Not editable here)
Convert Setting > OPC UA > MQTT – Variable Table
Name
Display the variable name that set in the MQTT Module List (Not editable here)
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable that set in the Modbus List. (Not editable) Include: Bool, Short, Float
Enabled
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.
OK / Cancel
Click [OK] to save and exit the page settings. Click [Cancer] to exit without saving.
UA-5200 Series User Manual V4.3 ICP DAS
60
Step 5. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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].
The Step Box will show the words Please wait” (as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And 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.
UA-5200 Series User Manual V4.3 ICP DAS
61
4.1.3. Modbus / MQTT Conversion
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.
Modbus / MQTT Function Diagram:
Application Solution:
UA-5200 Series User Manual V4.3 ICP DAS
62
This section introduces the Modbus / MQTT conversion through the conversion of Modbus TCP and MQTT protocol.
Convert Setting: Modbus TCP and MQTT
Note: The hardware/network connection methods please see the 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 5 steps as below. 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.
Ethernet Port
Modbus
TCP
Modbus
Convert Setting: Modbus TCP and MQTT
Ethernet
LAN: Ethernet Port
UA Series Controller
UA-5200 Series User Manual V4.3 ICP DAS
63
Step 7. 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, 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.
Add a module (No.: 1, Name: Example1) 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.
Click [Edit] can enter the [Module Content Setting] page to set up the module and the Modbus address mapping table.
2. Give a name,
Default: Name
3. Click to add
1. Ethernet port: LAN
4
UA-5200 Series User Manual V4.3 ICP DAS
64
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.
IP
The IP address of the connected module. Default: 0.0.0.0
Port
The port number for Modbus TCP. Default: 502
Slave ID
Set the Slave ID of the UA-5200. (Range: 1 ~ 247)
Timeout
Set the timeout value for the module. Default: 500 ms
Polling Rate
Set a time interval for the command. 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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to set follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
65
The finished Modbus Mapping Table as below is in order of DO, DI, AO and AI.
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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
66
Modbus Mapping Table – Nickname Setting
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
Table Display
Click [Show] to display all fields, click [Hide] to hide some fields.
Address
Modbus address. System auto arrange.
Variable name
The variable name of the mapping address. Default: Tag0 and auto arrange the number. User can define the name.
Data Type
Display data type of the variable. (Not editable)
Swap
Check to swap the byte order (Lo-Hi/Hi-Lo) for 4-byte or 8-byte.
Description
Write a note for this variable.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
67
Step 8. MQTT Broker Setting
Click the next step, and enter the Step 2 [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.
MQTT Connection > Local Broker Setting
Port
The COM port of the Local MQTT Broker. System default: 1883
Anonymous Login
Check to allow anonymous login. Default: Check.
Save
Click to save the setting of this page.
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
Click to add a new remote Broker.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
68
After creating a new Remote Broker (as below) :
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Edit / Remove
Click [Edit] can set the Broker. Click the left box and [remove] can delete the Broker.
Save
Click to save the settings of this item.
MQTT Connection > Remote Broker > Broker Content Settings
Broker Name
The name of the remote MQTT Broker. (Editable)
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Keep Alive Time
The keep alive time. Default: 60 (second)
SSL/TLS
Check to enable the supporting of SSL/TLS security communication. Default: uncheck.
Anonymous Login
Check to allow anonymous login. Default: Check.
OK
Click to save the settings and exit.
UA-5200 Series User Manual V4.3 ICP DAS
69
Step 9. 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
No.
The module number in the module list (Not editable here)
*Module Name / Nickname
The module name set in the module list (Not editable here)
All Enabled
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.
Edit
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.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
70
Click [Edit] button cauld enter the MQTT Client Setting page:
Convert Setting > MQTT > Modbus TCP (Master) MQTT Client Setting
No.
The module number in the module list (Not editable here)
Module Name
The module name set in the module list (Not editable here)
Scan Rate(ms)
Set an update frequency for the task data. Default: 1000 (Unit: ms)
Dead Bend
Give a dead bend value for updating a float signal. Default: 0
Will Topic
Enter the title of a disconnect notice. Default: Null.
Will
Enter a disconnect notice. Default: Null.
MQTT Connection
Check the Broker want to use Local Broker or Remote Broker.
UA-5200 Series User Manual V4.3 ICP DAS
71
Convert Setting > MQTT > Modbus TCP (Master) – Publish & Subscribe
Details
Click [Show] to display all fields, click [Hide] to hide some fields.
Name
The variable name of the mapping address. (Not editable here)
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable that set in the Modbus Address
Mapping Table page. (Not editable) Include: Bool, Short, Float
Subscribe Topic
The topic of receiving/subscribing data message.
Subscribe Qos
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.
Publish Topic
The topic of sending/publishing data message.
Publish Qos
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.
Retain
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.
Enabled
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.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
72
Step 10. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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 11. Run the Project
The project, after saving, needs to be executed. Click the next step [Run the Project].
The Step Box will show the words Please wait (as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And 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.
4.1.4. Modbus / MQTT JSON Conversion
UA-5200 Series User Manual V4.3 ICP DAS
73
Modbus / MQTT JSON 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 combine several messages that converted in JSON format into a group to read and write the multiple channels of the Modbus RTU devices that connected to the controller.
Modbus / MQTT JSON Function Diagram:
Application Solution:
The settings of Modbus RTU/ASCII are the same. Here will introduce them together as a setting sample for Modbus / MQTT JSON conversion.
UA-5200 Series User Manual V4.3 ICP DAS
74
Modbus RTU / ASCII MQTT JSON 轉換傳輸:
Note: The hardware/network connection methods please see the Chapter 2.
When UA series controller connects the Modbus RTU or ASCII module (via RS-485 / RS-232, as the picture) and read/write the Modbus I/O via MQTT Broker, user can choose the item [Modbus RTU / MQTT JSON] or [Modbus ASCII / MQTT JSON] of the Module Communication Conversion in the Function Wizard.
[Step Box]: The Step Box of the [Modbus RTU / MQTT JSON] and [Modbus ASCII / MQTT JSON] has the same 7 steps, here will introduce them together. 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.
Step 1. Controller COM Port Setting
COM Port:
RS-485/RS-232
Modbus
RTU
Module
RS-485: ttyO2, ttyO5 RS-232: ttyO4
Convert Setting: Modbus RTU/ASCII and MQTT JSON
RS-485 RS-232
UA Series Controller
UA-5200 Series User Manual V4.3 ICP DAS
75
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.
UA-5200 Series User Manual V4.3 ICP DAS
76
Step 2. Module Setting
Click the next step, and enter the Step 2 [Module Setting] of the UI setting.
This page is for setting the communication values with the connected modules. First choose the serial 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.
Add a module (No.: 1, Name: Example1) 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.
1
3. Give a name,
Default: Name
4. Click to add
2. Select the serial port
5
UA-5200 Series User Manual V4.3 ICP DAS
77
[Module Content Setting] page can set up the module and the Modbus address 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-5200. (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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to set follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
78
The finished Modbus Mapping Table as below is in order of DO, DI, AO and AI.
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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
79
Modbus Mapping Table – Nickname Setting
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
Table Display
Click [Show] to display all fields, click [Hide] to hide some fields.
Address
Modbus address. System auto arrange.
Variable name
The variable name of the mapping address. Default: Tag0 and auto arrange the number. User can define the name.
Data Type
Display data type of the variable. (Not editable)
Swap
Check to swap the byte order (Lo-Hi/Hi-Lo) for 4-byte or 8-byte.
Description
Write a note for this variable.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
80
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 (or ASCII) / MQTT JSON 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.
MQTT Connection > Local Broker Setting
Port
The COM port of the Local MQTT Broker. System default: 1883
Anonymous Login
Check to allow anonymous login. Default: Check.
Save
Click to save the setting of this page.
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
Click to add a new remote Broker.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
81
After creating a new Remote Broker (as below) :
MQTT Connection > Remote Broker List
Broker Name
The name of the remote MQTT Broker. User can define the name, e.g. Broker1. Default: Name.
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Edit / Remove
Click [Edit] can set the Broker. Click the left box and [remove] can delete the Broker.
Save
Click to save the settings of this item.
MQTT Connection > Remote Broker > Broker Content Settings
Broker Name
The name of the remote MQTT Broker. (Editable)
IP / Domain
The IP address of the remote Broker. Default: 127.0.0.1
Port
The COM port of the remote Broker. Default: 1883
Keep Alive Time
The keep alive time. Default: 60 (second)
SSL/TLS
Check to enable the supporting of SSL/TLS security communication. Default: uncheck.
Anonymous Login
Check to allow anonymous login. Default: Check.
OK
Click to save the settings and exit.
UA-5200 Series User Manual V4.3 ICP DAS
82
Step 4. MQTT Group Setting
Click the next step, and enter the Step 4 [MQTT Group Setting] of the UI setting. This page is for setting the MQTT Group connection, Setting with the MQTT JSON function in the Convert Transmission, It can make the I/O module messages in groups and then mapping to the user-defined publish and subscribe topics.
We select the “Modbus RTU (or ASCII) / MQTT JSON conversion at the beginning, so this step will auto enter the [MQTT Connection > MQTT Group Connection] page of IoT Platform Setting. The Step Box will prevent the user from selecting the wrong platform.
MQTT Connection > MQTT Group Connection > MQTT Connection Group Name List
Group Name
MQTT group name, user can define, e.g. Group1. Default: Name.
Click to add a new MQTT Group.
The page number of the group list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the setting of this page.
After creating a new group (as below):
UA-5200 Series User Manual V4.3 ICP DAS
83
Click [Edit] botton to enter the [MQTT Client Setting] page:
IoT Platform Setting > MQTT Group Connection > MQTT Client Setting
No.
The group number in the MQTT Client list (Not editable here)
Group Name
Give a name, e.g. Group1. Default: Name.
Scan Rate(ms)
Set an update frequency for the data. Default: 1000 (Unit: ms)
Dead Bend
Give a dead bend value for updating a float signal. Default: 0
Will Topic
Enter the title of a disconnect notice. Default: Null.
Will
Enter a disconnect notice. Default: Null.
MQTT Connection
Check the Broker want to use Local Broker or Remote Broker.
UA-5200 Series User Manual V4.3 ICP DAS
84
IoT Platform Setting > MQTT Group Connection > MQTT Client Setting – Publish & Subscribe
Publish Topic
The topic of sending/publishing data message.
Publish Qos
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.
Subscribe Topic
The topic of receiving/subscribing data message.
Subscribe Qos
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.
Retain
Whether to store a broker message. Default: No
OK
Click to save the settings and exit.
UA-5200 Series User Manual V4.3 ICP DAS
85
Step 5. Apply Connection & Enable Converting Module
Click the next step, and enter the Step 5 [Apply Connection & Enable Converting Module] UI setting. This page is for applying the connection and enabling the
converting module.
We select the “Modbus RTU (or ASCII) / MQTT JSON conversion at the beginning, so this step will auto enter the [Convert Setting > MQTT JSON - Modbus RTU (or ASCII) (Master)] page of Convert setting. The Step Box will prevent the user from selecting the wrong platform.
Convert Setting > MQTT JSON > Modbus RTU (Master) Module List
No.
The module number in the module list (Not editable here)
*Module Name
The module name set in the module list (Not editable here)
Connection Name
Select a group connection name, and then click [Apply].
All Enabled
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.
Edit
If user wants to enable some I/O channels for conversion, click [Edit] of that module to enter the Variable Tale setting.
The page number of the module list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
86
Click [Edit] button cauld enter the Module Content Setting page:
Convert Setting > MQTT JSON > Modbus RTU (Master) – Module Content Setting
No.
The module number in the module list (Not editable here)
Module Name
The module name set in the module list (Not editable here)
Convert Setting > MQTT JSON > Modbus RTU (Master) – Variable Table
Details
Click [Show] to display all fields, click [Hide] to hide some fields.
Variable Name
The variable name of the mapping address. (Not editable here)
Alias
The alias name for the variable. (Editable here)
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable that set in the Modbus Address Mapping Table page. (Not editable) Include: Bool, Short, Float
Connection Name
Select the group name that set in the group list page.
Enabled
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.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
87
Step 6. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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 7. Run the Project
The project, after saving, needs to be executed. Click the next step [Run the Project].
The Step Box will show the words Please wait” (as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And 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.
UA-5200 Series User Manual V4.3 ICP DAS
88
4.2. Module Connecting to Azure
"Module Connecting to Azure" is a common way to integrate IoT devices into the cloud. Many of the applications use MQTT connection to the cloud for the setting is fast and easy. The UA series also provides the MQTT function for module to connect to the Azure platform and allows users to publish messages to Microsoft Azure and receive messages from Microsoft Azure. This section will introduce the setting steps and the function parameters of the Module Connecting to Azure. There are 3 items in this category for 3 protocol types. Here will introduce the Modbus TCP / Azure for this category.
Modbus RTU / Azure
Allow the Modbus RTU connecting to the Microsoft Azure platform and can publish messages to Microsoft Azure and receive messages from Microsoft Azure.
Modbus TCP / Azure
Allow the Modbus RTU connecting to the Microsoft Azure platform and can publish messages to Microsoft Azure and receive messages from Microsoft Azure. (Section 4.2.1)
Modbus ASCII / Azure
Allow the Modbus RTU connecting to the Microsoft Azure platform and can publish messages to Microsoft Azure and receive messages from Microsoft Azure.
UA-5200 Series User Manual V4.3 ICP DAS
89
4.2.1. Modbus TCP / Azure Connecting
The UA series provides the MQTT function for module to connect to the Microsoft Azure platform and allows users to publish messages to Azure and receive messages from Azure. This section will introduce the setting steps and the function parameters. There are 3 items about Azure function in the Function Wizard. Here will introduce the Modbus TCP / Azure.
Function Diagram for Modbus TCP / Azure:
Application Solution:
UA-5200 Series User Manual V4.3 ICP DAS
90
Modbus TCP Module Connecting to Azure
Note: The hardware/network connection methods please see the Chapter 2 .
When UA series controller connects the Modbus TCP (via Ethernet, as the picture), read/write the Modbus I/O via MQTT Broker and transfer the data to the Microsoft Azure platform, user can choose the item [Modbus TCP / Azure] of the Module Connecting to Azure in the Function Wizard.
[Step Box]: The Step Box of the [Modbus TCP / Azure] has 5 steps as below. 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.
In addition, the Step Box of [Modbus RTU / Azure] or [Modbus ASCII / Azure] has 6 steps. The different step is “Controller COM Port Setting" that can refer to Section 4.1.1 or 4.1.3.
Ethernet Port
Modbus
TCP
Modbus
Modbus TCP Module Connecting to Azure
Ethernet
LAN: Ethernet Port
UA Series Controller
UA-5200 Series User Manual V4.3 ICP DAS
91
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, 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.
Add a module (No.: 1, Name: Example1) 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.
Click [Edit] can enter the [Module Content Setting] page to set up the module and the Modbus address mapping table.
2. Give a name,
Default: Name
3. Click to add
1. Ethernet port: LAN
4
UA-5200 Series User Manual V4.3 ICP DAS
92
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.
IP
The IP address of the connected module. Default: 0.0.0.0
Port
The port number for Modbus TCP. Default: 502
Slave ID
Set the Slave ID of the UA-5200. (Range: 1 ~ 247)
Timeout
Set the timeout value for the module. Default: 500 ms
Polling Rate
Set a time interval for the command. 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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to set follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
93
The finished Modbus Mapping Table as below is in order of DO, DI, AO and AI.
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 address of UA controller is start from 0, even if some modules are start from 1, here it needs to follow the UA series to start from 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.
UA-5200 Series User Manual V4.3 ICP DAS
94
Modbus Mapping Table – Nickname Setting
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
Table Display
Click [Show] to display all fields, click [Hide] to hide some fields.
Address
Modbus address. System auto arrange.
Variable name
The variable name of the mapping address. Default: Tag0 and auto arrange the number. User can define the name.
Data Type
Display data type of the variable. (Not editable)
Swap
Check to swap the byte order (Lo-Hi/Hi-Lo) for 4-byte or 8-byte.
Description
Write a note for this variable.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
95
Step 2. Azure Setting
Click the next step, and enter the Step 2 [Azure Setting] of the UI setting. This page is for setting the Microsoft Azure Platform related information of the MQTT Connection in the IoT platform, e.g. the name, SAS Token, etc.
We select the “Modbus TCP / Azure connecting item at the beginning, so this step will auto enter the [MQTT Connection > Microsoft Azure Platform] page of IoT Platform Setting. The Step Box will prevent the user from selecting the wrong platform.
MQTT Connection > Microsoft Azure Platform > Azure List
Azure Name
Azure name. User can define the name. Default: Name.
Click to add a new Azure list.
Edit / Remove
Click [Edit] can set the Azure list. Click the left box and [remove] can delete the Azure list.
The page number of the Azure list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the settings of this page.
Click [Edit] button cauld enter the Azure Content Settings page:
UA-5200 Series User Manual V4.3 ICP DAS
96
MQTT Connection > Microsoft Azure Platform > Azure List > Azure Content Settings
Azure Name
Azure name. User can define the name. Default: Name.
SAS Token
Input the SAS Token which you previously registered for the UA controller from Microsoft Azure. For the procedure to generate a
SAS Token, please refer to the “Documentation > Azure IoT Hub >
IoT Hub MQTT support” section on the Microsoft Azure Web Site
for detailed information.
Keep Alive Time(second)
Set the time in second that pass away without communication between the UA controller and Microsoft Azure. Default: 60 second.
Scan Rate(ms)
Set an update frequency for the task data. Default: 1000 (Unit: ms)
Dead Band
Give a dead bend value for updating a float signal. Default: 0
CDS (Connected Device Studio)
If user wants to publish the messages compliant with the Microsoft CDS platform, user must check the "CDS to Enabled and fill in the Company ID, Equipment ID and Message ID that applied from the Microsoft CDS platform.
OK
Click to save and exit this page.
UA-5200 Series User Manual V4.3 ICP DAS
97
Step 3. Apply Connection & Enable Converting Module
Click the next step, and enter the Step 3 [Apply Connection & Enable Converting Module] UI setting. This page is for applying the connection and enabling the
converting module.
We select the “Modbus TCP / Azure at the beginning, and UA system connecting to Azure through MQTT JSON group method, so this step will auto enter the [Convert Setting > MQTT JSON - Modbus TCP (Master)] page of Convert setting. The Step Box will prevent the user from selecting the wrong platform.
Convert Setting > MQTT JSON > Modbus TCP (Master) Module List
No.
The module number in the module list (Not editable here)
*Module Name / Nickname
The module name set in the module list (Not editable here)
Edit
If user wants to enable some I/O channels for conversion, click [Edit] of that module to enter the Variable Tale setting.
Connection Name
Select an Azure connection name, and then click [Apply].
All Enabled
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.
The page number of the module list: Current page / Total pages. Click < or > to go to the previous or next page.
Save
Click to save the settings of this page.
UA-5200 Series User Manual V4.3 ICP DAS
98
Click [Edit] button cauld enter the Module Content Setting page:
Convert Setting > MQTT JSON > Modbus TCP (Master) Module List –Module Content Setting
No.
The module number in the module list (Not editable here)
Module Name
The module name set in the module list (Not editable here)
Convert Setting > MQTT JSON > Modbus TCP (Master) Module List – Variable Table
Details
Click [Show] to display all fields, click [Hide] to hide some fields.
Variable Name
The variable name of the mapping address. (Not editable here)
Alias
The alias name for the variable. (Editable here)
Attribute
Display data attribute of the variable. (Not editable) Include: Read, Read/Write
Data Type
Display data type of the variable that set in the Modbus Address Mapping Table page. (Not editable) Include: Bool, Short, Float
Connection Name
Select the Azure connection name that set in the [Azure Setting] step.
Enabled
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.
OK
Click to save this page settings and back to the module list page.
UA-5200 Series User Manual V4.3 ICP DAS
99
Step 4. Save Project
The setting of this example is finished now, and then to save the whole project and run the project. So the last two steps will not show setting pages, but show some displays.
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 5. Run the Project
The project, after saving, needs to be executed. Click the next step [Run the Project].
The Step Box will show the words Please wait” (as below), that means the system is deleting the old project in the UA controller, and will upload the new project into the UA series and run the new project. When the words Please waitdisappears, the new words Successappears (as below), that means the UA controller is running new project successfully.
And 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 function project.
UA-5200 Series User Manual V4.3 ICP DAS
100
4.3. PID
PID (Proportional-Integral-Derivative) control is the most widely used in industrial control systems. A regulator which is controlled in accordance with Proportional, Integral and Derivative is called PID control for short, also called PID regulator. When the user cannot fully grasp or measure parameters of the control system, the PID regulator is the best solution.
The PID controller is a common feedback loop component in industrial control applications. The controller compares the collected data with a reference value and then uses this difference to calculate a new input value whose purpose is to allow the system data to reach or remain at the reference value.
This section introduces the setting steps and the function parameters of the PID. There are 2 items about PID function in the Function Wizard. The 2nd item [PID Operation + OPC UA Communication Conversion] is combining the 1st item [PID Operation] and the Section
4.1.1 Modbus / OPC UA Conversion .
[Step Box] of [PID Operation] :
[Step Box] of [PID Operation + OPC UA Conversion] :
Loading...