KYLAND Technology KGW3101 User Manual

KGW3101 Modbus Gateway
User Manual
1st Edition, August 2017
www.kyland.com
KGW3101 Modbus Gateway
User Manual
The software described in the manual is furnished under a license agreement and may be used only in
accordance with the terms of that agreement.
Copyright Notice
Kyland Technology Co., Ltd. All rights reserved.
Trademarks
The Kyland logo is a registered trademark of Kyland Technology Co., Ltd.
All other trademarks or registered marks in this manual belong to their respective manufacturers.
Disclaimer
The information provided in this manual is intended to be accurate and reliable. However, Kyland can not guarantee that there is not any error including the technical error or the typographical error. Kyland reserves the only right to modify the description of products and programs in the manual without notice to the users. Anyone is not to be allowed to copy, reproduce and business use. Please note the infringement. Copyright © 2017 Kyland Technology Co., Ltd.
Technical Support Contact Information
www.kyland.com/support
Kyland China Kyland Americas
Tel: +86-10-88796676 Tel: +1-303-447-6882 Fax: +86-10-88796678 Kyland EMEA Kyland Asia Pacific Tel: +49 (0) 711 997606-200 Tel: +65 3157 9226 Fax: +49 (0) 711 997606-211
Kyland India & SEA
Tel: +91-9008358660
Table of Contents
1. Introduction .................................................................................................................................................. 1
1.1 Overview .................................................................................................................................................. 2
1.2 Package Checklist ................................................................................................................................... 2
1.3 Product Features ..................................................................................................................................... 2
2. Getting Started ............................................................................................................................................. 3
2.1 Connecting Power ................................................................................................................................... 4
2.2 Connecting Serial Devices ...................................................................................................................... 4
2.2.1 Setting RS-485 Terminal Resistors .................................................................................................. 4
2.2.2 Connecting to a Host or the Network ................................................................................................ 4
2.3 LED Indicators ......................................................................................................................................... 5
2.4 Dimension Figures ................................................................................................................................... 6
2.5 Pin Assignments ...................................................................................................................................... 6
2.5.1 Ethernet Ports (RJ45) ....................................................................................................................... 6
2.5.2 Serial Ports (DB9 Male) .................................................................................................................... 6
2.5.3 Power Input Ports ............................................................................................................................. 7
2.6 Specifications ........................................................................................................................................... 7
3. Typical Applications.................................................................................................................................. 10
3.1 Ethernet Masters with Multiple Serial Slaves ........................................................................................ 11
3.2 Serial Masters with Multiple Ethernet Slaves ........................................................................................ 12
4. Web Console Configuration ..................................................................................................................... 14
4.1 Log In ..................................................................................................................................................... 15
4.2 Device Information ................................................................................................................................. 15
4.3 Network Settings .................................................................................................................................... 15
4.4 Operating Settings ................................................................................................................................. 16
4.4.1 Operation Mode Switch .................................................................................................................. 16
4.4.2 Transparent Mode........................................................................................................................... 16
4.4.3 Agent Mode ..................................................................................................................................... 18
4.5 Serial Settings ........................................................................................................................................ 20
4.6 Agent settings (Agent Mode) ................................................................................................................. 20
4.6.1 Gateway settings ............................................................................................................................ 21
4.6.2 Slave List ........................................................................................................................................ 21
4.6.3 Data Query ...................................................................................................................................... 23
4.7 Import/Export ......................................................................................................................................... 23
4.8 Upgrade Firmware ................................................................................................................................. 24
4.9 Change Password ................................................................................................................................. 24
4.11 Save/Reboot ........................................................................................................................................ 25
4.12 Help ..................................................................................................................................................... 25
4.13 Logout .................................................................................................................................................. 25
5. Case Studies .............................................................................................................................................. 26
5.1 Transparent-A ........................................................................................................................................ 27
5.2 Transparent-B ........................................................................................................................................ 29
5.3 Agent-A .................................................................................................................................................. 32
5.4 Agent-B .................................................................................................................................................. 35
1
1. Introduction
KGW3101 Modbus Gateway converts protocols between Modbus TCP and Modbus RTU/ASCII. The KGW3101 Modbus Gateway supports redundant power supply and 2KV electromagnetic isolation protection in serial ports.
The following topics are covered in this chapter:
Overview Package Checklist Product Features
2
1.1 Overview
KGW3101 Modbus gateway is a redundant power supply Modbus gateway which converts between Modbus TCP and Modbus RTU/ASCII protocols. For ethernet ports, it can be accessed up to 16 TCP Master/Client devices, or connects to 16 TCP Slave/Server devices. For each serial port, it can physically manage up to 128 serial Master/Slave nodes. All serial ports of gateways provide 2KV isolation protection. Each RS-232/RS­422/RS-485 serial port can be configured individually for Modbus RTU or Modbus ASCII, allowing both types of networks to be integrated with Modbus TCP through one Modbus gateway.
KGW3101 Modbus gateway supports both Transparent mode and Agent mode. In Transparent mode, the gateway will bypass and translate Modbus commands between Modbus TCP/RTU/ASCII. In Agent mode, the gateway will actively poll the Modbus slave devices and store data’s in the Modbus’s memory. The Modbus master can retrieve Modbus slave devices’ data via the gateway’s memory.
1.2 Package Checklist
The KGW3101 Modbus gateway is shipped with the following items:
KGW3101 Modbus Gateway
Installation Guide
Documentation CD
Product Warranty Statement
NOTE: Notify your sales representative if any of the above items is missing or damaged.
1.3 Product Features
Convert between Modbus TCP and Modbus RTU/ASCII
1 auto detectable 10/100Mbps ethernet port and 1 RS-232/RS-422/RS-485 serial port
Up to 16 TCP Master/Client devices, or connect to up to 16 TCP Slave/Server devices for ethernet ports
Up to 128 Master/Slave nodes for each serial port
15KV ESD protection for the serial port
2KV isolation protection for the serial port
Support HTTPS, SSH2 security configuration protocol
Support redundant 12-48V DC power supply
Support "Reset to Factory Default Settings"
Support IP40 protection level
Certificates: CE, FCC, UL61010, C1D2 and RoHS
3
2. Getting Started
This chapter will include the contents as follows.
Connecting Power Connecting Serial Devices
RS-485 Termination Resistors
Connecting to a Host or the Network
LED Indicators Dimension Figures Pin Assignments
Ethernet Ports (RJ45)
Serial Ports (DB9 Male)
Power Input Ports
Specifications
4
2.1 Connecting Power
The KGW3101 Modbus gateway can be powered by connecting the power source to the terminal block, and the instruction is as follows.
1. Loosen or remove the screws on the terminal block.
2. Connect the 12~48 VDC power cable to the terminal block.
3. Tighten the connections using the screws on the terminal block. Note: KGW3101 Modbus gateway does not have the On/Off switch. It automatically runs when it is powered
on. The PWR LED on the top panel will glow to indicate that the device is powered on. The device supports two redundant DC power supply.
2.2 Connecting Serial Devices
The serial port is on the front panel. If you connect to the network with multiple devices, please note the
following:
1. All devices that are connected to a single serial port must use the same protocol (i.e., either Modbus RTU or Modbus ASCII).
2. Each master device must get its own port on the device. Please refer to the 2.5 section for the guide of serial ports Pin Assignments.
2.2.1 Setting RS-485 Terminal Resistors
When build up the RS485 network in bad conditions, you may need to add terminal resistors to prevent the reflection of serial signals. There is a built-in 120KΩ terminal resistor in KGW3101. For the serial port, the DIP switch on the top panel is used to enable/disable the terminal resistor.
Setting the 120 Ω termination resistor: the switch 1 corresponds to the serial port S1. When switch 1 is set to “ON”, it enables the terminal resister, and when switch 1 is set to “OFF”, it disables the terminal resistor. The gateway device disable terminal resistors by default.
2.2.2 Connecting to a Host or the Network
The 10/100M ethernet port on the front panel is used to connect a host or Ethernet network. The gateway can be connected to other hosts or networks by using this ethernet port. In normal operation, you can use the standard ethernet cable to connect the device to Modbus TCP network. For initial configuration or troubleshooting purposes, you may connect the device directly to a PC. When the Modbus gateway runs, the LED light in the port will light up for checking whether it is connected to the network.
One ethernet port and one corresponded MAC address are provided by KGW3101. The IP address is editable but the MAC address can not be changed.
5
2.3 LED Indicators
Item
Function
Reset Button
Press this button at least 5 seconds to reset the device to factory settings.
LED indicators
PWR1/PWR2
Green
Steady on: Power is on. Off: Power is off, or power error.
Run
Green
Blinking with 1Hz: Indicates the device is functioning normally. Steady on: Power is on and device is booting up.
E1 (Link/ACT)
Green
Steady on: Ethernet connection. Blinking: Ethernet port is receiving/transmitting data. Off: Ethernet cable has disconnected.
E1 (10/100M)
Yellow
Steady on: 100Mbps connection.(100Base-TX) Off: 10Mbps connection or ethernet cable has disconnected.
S1-T
Green
Blinking: The serial port 1 is transmitting data. Off: No data is being transmitted or received through the serial port.
S1-R
Green
Blinking: The serial port 1 is receiving data. Off: No data is being transmitted or received through the serial port.
6
2.4 Dimension Figures
KGW3101 (unit: mm)
2.5 Pin Assignments
2.5.1 Ethernet Ports (RJ45)
2.5.2 Serial Ports (DB9 Male)
The KGW3101 Modbus gateway uses DB9 (male) serial ports to connect Modbus RTU or ASCII devices. The port supports three serial interfaces: RS- 232, RS-422, and RS-485, and all interface types can be configured by the software.
Pin
MDI-X Signal
MDI Signal
1
Rx+
Tx+ 2 Rx-
Tx- 3 Tx+
Rx+ 6 Tx-
Rx-
4578
Unused
Unused
Pin
RS-232
RS-422
RS-485
1
CTS
RxD-(B)
-
7
2.5.3 Power Input Ports
The KGW3101 Modbus gateway is equipped with a phoenix terminal block whose space is 5.08mmit has dual power inputs PWR1 and PWR2 for redundancy.
2.6 Specifications
Ethernet Interface
Number of Ports: 1 Speed: 10/100 Mbps, Auto MDI/MDIX
Connector: RJ45 × 1
Protocols: Modbus TCP Magnetic Isolation Protection: 1.5 KV (built-in)
Serial Interface
Number of Ports: 1 Serial Standards: RS-232/RS-422/RS-485, software option supported Connector: DB9 Male ESD Protection: 15KV ESD Magnetic Isolation Protection: 2KV (built-in) DIP Switch: Enable/Disable RS-485 terminal resistance Protocols: Modbus RTU/ASCII Master/Slave
Serial Communication Parameters
Data Bits: 7, 8 Stop Bits: 1, 2
2
RxD
RxD+(A)
-
3
TxD
TxD-(Z)
Data-(B)
4
RTS
TxD+(Y)
Data+(A)
5
GND
GND
GND 6 – – 7 – – 8 – – 9 – – –
Powe
Pin
Funciton
PWR1
+/L
PWR1 connects to +/L
-/N
PWR1 connects to -/N
PWR2
+/L
PWR2 connects to +/L
-/N
PWR2 connects to -/N
8
Parity: None, Even, Odd, Space, Mark Flow Control: XON/XOFF, RTS/CTS, None Baudrate: 300bps - 460.8kbps
Serial Signals
RS-232: TxD, RxD, RTS, CTS, GND RS-422: Tx+, Tx-, Rx+, Rx-, GND RS-485: Data+, Data-, GND
Software
Security ProtocolsHTTPS, SSH2
LEDs
System: PWR1, PWR2, RUN Serial ports: S1-T/R LAN: SPEED, ACT/LINK (RJ45)
Buttons
Reset: Support "Reset to Factory Default Settings"
Physical Characteristics
Housing: Aluminum Weight: 165g
Dimension: 30×115×68 mm1.8×5.3×7.3 in
Protection Level: IP40 Installation: DIN-rail mounting
Environmental Limits
Operating Temperature: -40 to 75
Storage Temperature: -40 to 85
Operating Humidity: 5 to 95% RH
Power Requirements
Input Voltage24VDC recommended (12-48VDC) Connection Terminal: 5.08mm spacing phoenix terminal block
9
System Consumption: 1.8W Surge Protection: Support Reverse Connect Protection: Support Redundancy Power: Support
Standards and Certifications
Certifications: CE, FCC, UL61010, C1D2, RoHS EMI:
EN 55022 Class A FCC Part 15 Subpart B Class A EN 55024
EMS:
IEC61000-4-2(ESD): ±6kV(contact),±8kV(air) IEC61000-4-3(RS): 10V/m (80MHz–2GHz) IEC61000-4-4(EFT): Power Port:±2kV; Data Port: ±1kV IEC61000-4-5(Surge): Power Port: ±1kV/DM, ±2kV/CM; Data Port:±1kV IEC 61000-4-6 (CS): 10V(150KHz-80MHz)
Machinery:
Vibration: IEC60068-2-6 Surge: IEC60068-2-27 Free-drop: IEC60068-2-32
Warranty
Warranty Period: 5 years
10
3. Typical Applications
Some typical applications of KGW3101 are covered in this chapter as following topics:
Ethernet Masters with Multiple Serial Slaves Serial Masters with Multiple Ethernet Slaves
11
3.1 Ethernet Masters with Multiple Serial Slaves
The ethernet Master can connect multiple Serial Slaves. The KGW3101 supports Modbus TCP Master with up to 16 Modbus TCP Master simultaneous connections. The serial interface supports RS-232, RS-422 and RS­485 modes through software settings. Each serial port can manage 128 Slave nodes.
A. Transparent-A What we define Transparent-A as the process from Modbus TCP Master to Modbus RTU/ASCII Slave in
Transparent mode. In this mode, the ethernet ports should be in Modbus TCP Slave mode, and the serial ports should be in Modbus RTU/ASCII Master mode.
B. Agent-A What we define Agent-A as the process from Modbus TCP Master to Modbus RTU/ASCII Slave in Agent
mode. In this mode, the ethernet port should be in Modbus TCP Slave mode, and the serial port should be in Modbus RTU/ASCII Master mode.
12
3.2 Serial Masters with Multiple Ethernet Slaves
The serial port Masters can connect to more than one ethernet Slaves. The KGW3101 Modbus gateway supports Modbus TCP Slave with up to 16 simultaneous connections. The serial interface supports RS-232, RS422 and RS-485 through software settings.
A. Transparent-B What we define Transparent-B as the process from Modbus TCP Slave to Modbus RTU/ASCII Master in
Transparent mode. In this mode, the ethernet port should be in Modbus TCP Master mode, and the serial port should be in Modbus RTU/ASCII Slave mode.
B. Agent-B What we define Agent-B as the process from Modbus TCP Slave to Modbus RTU/ASCII Master in Agent
mode. In this mode, the ethernet port should be in Modbus TCP Master mode, and the serial port should be in Modbus RTU/ASCII Slave mode.
13
14
4. Web Console Configuration
The KGW3101 Modbus gateway can be configured by built-in Web page, and you can access the home page of KGW3101 through browsers like Mozilla Firefox browser, Microsoft IE browser. The following topics are covered in this chapter:
Log In Device Information Network Settings Serial Port Settings Operating Settings
Operation Mode Settings
Transparent Mode
Agent Mode
Agent Settings
Gateway Operation Settings
Device Listing
Data Query
Import/Export Upgrade Firmware Change Password Load Factory Default Save/Reboot Help Logout
15
4.1 Log In
Firstly open your browser. Then, input 192.168.0.249 (default for E1) in the address input box and click “Login”.
The default username is admin, and the password is admin. You can also select the operation language (English or Chinese) as your convenience.
4.2 Device Information
You can see the basic information of the device in this page, such as the device name, module type, IP address, current working mode, SN number, firmware version, MAC address and change to mode.
“Change to Mode” allows you to switch the device’s work mode between Transparent mode and Agent mode by clicking. The mode will effect without restarting the device.
Note: the parameter modifications of gateway device (except firmware upgrade) is effective immediately by clicking “Save” without restarting the device.
4.3 Network Settings
The Network Setting page is where the device’s network settings are configured. You can modify the IP configuration, IP address, subnet address, default gateway, and the device name. Click “Save” to save the current changes to the device and the changing is effective without reboot.
16
Network Settings
IP configuration: Select “Static” if you are using a fixed IP address. Select “DHCP” if the IP address is set dynamically.
IP address: The IP (Internet Protocol) address identifies the server on the TCP/IP network. The default setting E1 is 192.168.0.249
Netmask: It identifies the server as belonging to a Class A, B, or C network. The default setting is
255.255.255.0
Gateway: It is the IP address of the router that provides network access outside the server’s LAN.
Device Name: The default model is KGW3101
4.4 Operating Settings
4.4.1 Operation Mode Switch
The KGW3101 Modbus gateway supports two operation mode: Transparent mode and Agent mode. You can see current operation mode in overview page. When powered on, the device’s default operation mode is Transparent mode, and it can be switched to Agent mode.
4.4.2 Transparent Mode
A. Transparent-A: Modbus TCP Master- Modbus RTU/ASCII Slave In this mode, the ethernet port should be in Modbus TCP Slave mode, and the serial port should be in
Modbus RTU/ASCII Master mode. The serial port mode should be set to RTU Master mode or ASCII Master mode. The following is RTU Master mode.
17
Transparent-A Parameters
Operating Mode: RTU Master, ASCII Master
Filter Function: enable/disable the Modbus ID filter function
Filter ID Start: starting filtered Modbus ID in range of 1-247
Filter ID End: ending filtered Modbus ID in range of 1-247
Protocol: TCP or UDP
Local Port: set port numbers for ethernet communication. The default number of port 1 is 502, and
the port 2 is 7002. The range of the local port is 1-65535
B. Transparent-B: Modbus TCP Slave- Modbus RTU/ASCII Master In this mode, the ethernet port should be in Modbus TCP Master mode, and the serial port should be in
Modbus RTU/ASCII Slave mode. The serial port mode should be set to RTU Slave mode or ASCII Slave mode. The following is RTU Slave mode.
Transparent-B Parameters
Operating Mode: RTU Slave, ASCII Slave
Slave ID: the Modbus TCP Slave ID, and the range is 1-247
Remote IP: the range of IP for Modbus TCP is 1-247
Remote port: the network communication port for Modbus TCP Server, and the range is 1-65535
Local Port: the port range is 1-65535
18
Protocol: TCP or UDP
Ethernet Binding: the network port for specific data communication
Slave Device Operation: the gateway device can support up to 16 slave device which can be pressed “+” or “-” to add or remove the slave device
In the RTU/ASCII Slave mode, you should make sure the unique of the slave ID and IP address. The remote port number and IP address must be unique, and the local port number should be unique as shown in the following picture.
4.4.3 Agent Mode
When running in agent mode, two Modbus roles must be set. One is the ethernet side (Modbus TCP), and the other is the serial side (Modbus RTU/ASCII). The KGW3101 Modbus supports a Modbus TCP function with Master (Client) and Slave (Server) modes. In Master mode, the Modbus works as a client and tries to build a TCP connection with the remote Modbus TCP server. In this mode, you will need to specify the IP address of the remote device and the relative Modbus command. For Slave mode, the Modbus works as a server and waits for incoming connection from the Modbus TCP client. In this mode the Modbus will waits for incoming Modbus TCP requests and use the internal memory as the Slave register to respond.
There are two work modes used as the serial side of the KGW3101 Modbus. One is the Modbus RTU/ASCII Slave, and the other is Modbus RTU/ASCII Master. In Slave mode, you will need to specify the ID, remote IP and other parameters of the slave device. And in Master mode, for sending the Modbus commands to the Modbus slave device you will need to specify the ID and relative requests of the slave device. For the KGW3101 Modbus gateway, when the serial mode is set to be Slave mode, the ethernet side will be Master mode automatically. If the serial mode is Master mode, the ethernet side is automatically to be Slave mode.
A. Agent-A: Modbus TCP Master- Modbus RTU/ASCII Slave In Agent-A mode, the device ethernet side is to be Modbus TCP Slave mode, and the serial side is to be
Modbus RTU/ASCII Master mode. The serial mode should be set to RTU Master or ASCII Master. The following is RTU Master mode.
19
Agent-A Parameters
Operating mode: RTU Master or ASCII Master
Filter Function: enable/disable the Modbus ID filter function
Filter Start ID: the range is 1-247
Filter End ID: the range is 1-247
B. Agent-B: Modbus TCP Slave - Modbus RTU/ASCII Master In Agent-B mode, the device ethernet side is to be Modbus TCP Master mode, and the serial side is to be
Modbus RTU/ASCII Slave mode. The serial mode should be set to RTU Slave or ASCII Slave.
Agent-B Parameters
Operating mode: RTU Slave or ASCII Slave
Slave ID: the range of the ID of the Modbus TCP Slave is 1-247
Remote IP: the IP address of the Modbus TCP
Remote port: the network communication port of the Modbus TCP Server
Local Port: the port range is 1-65535
Protocol: TCP or UDP
Slave Device Operation: the gateway device can support up to 16 slave device which could be
pressd “+” or - to add or remove the slave device
In RTU/ASCII Slave mode, you should note that the set of the TCP Slave ID and IP address and the remote port number can be same, but the remote port number and IP address must be unique, and the
20
local port number should be unique as well. It is shown as the following picture.
4.5 Serial Settings
The Serial Setting page is where serial port’s communication parameters are configured. You can modify the Alias Name, Baud Rate, Data Bit, Parity, Stop Bit, Flow Control, and Hardware Interface. Click “Save” to save the current changes to the device.
Serial Parameters
Alias: the modifiable name of the serial ports
Baud Rate: support 300bps460800bps
Date Bits: 7,8 (ASCII: 7; RTU: 8)
Stop Bits: 1, 2
Parity: support None, Even, Odd, Space and Mark
Flow Control: support None, RTS/CTS, and XON/XOFF
Hardware Interface: support RS-232, RS-485 and RS-422
4.6 Agent settings (Agent Mode)
Only in Agent mode some agent settings should be carried out for the serial port in KGW3101, such as gateway settings, slave list, and data query. Click “Save” to save the current changes to the device. There is no set operating in transparent mode.
21
4.6.1 Gateway settings
Gateway Parameters:
Gateway Modbus ID: the Modbus address for KGW3101 ranging from 1 to 247
Protocol: TCP or UDP (only in the Slave mode network protocol setting, the setting in Master mode is
invalid)
Default Timeout (ms): the default timeout ranges form 0 to 6000 ms. Some Modbus Slaves may take more time to boot up than other devices. For certain conditions, it may cause the entire system suffering from repeated exceptions during the initial boot-up. You can force KGW3101 to waiting for booting up before sending the first request with the initial delay setting
Inter-packet TX Delay (ms): the time-delay to transmit the packet received from the slave device to the upstream. It is the time waiting for the Modbus slave response.
4.6.2 Slave List
The slave list is used for Modbus Slave configuration. You can add, delete, and modify the slave device as well as export the current slave list.
Slave List Parameters:
Add New Slave: add new Modbus slave device
Delete Slave: delete current Modbus slave device
Modify Slave: modify the parameters of current Modbus slave device
Display: display current Modbus slave devices, 10, 20, 50, 100, All
Export: export current Modbus slave devices, supporting Excel, CVS, and PDF file format
22
Searching: search current Modbus slave device by some key words
COM: the serial port of device (S1)
Device ID: the ID of the terminal device with 128 terminal devices for the serial port
Alias: the name of the terminal device
Function Code: the function ID of the terminal device
Data Address: the starting data address of the terminal device
Data Length: the data length of the terminal device
Mapping Address Head: the mapping address of the terminal device, which means the address of
stored data read from serial terminal device. The mapping address heads are different because of the Modbus function ID. The read data with same function ID can not be stored in the overlapped device, on the other side, the read data with different function ID can stored in overlapped device.
A. Add New Slave Click “Add New Slave” to enter the configuration page.
Add New Slave parameters:
Device Alias: the added new Modbus terminal device name (Default: Device Alias), and the name is modifiable.
Serial Port: S1
Slave ID: the ID of added slave device(1-247)
Function Code: the function code of Modbus protocol
01: read the coils state
02: read the input state 03: read the holding registers 04: read the input registers
23
Data Start Address: the starting data address of device ranging from 0 to 65535
Data Length: the data length written into terminal device ranging from 1 to 2000
Mapping Address: the mapping address of terminal device data ranging from 0 to 65535. You can
choose to automatically assign mapping address while the device address is redundant occupation.
B. Delete Slave Select the slave device to be deleted, click “Delete Slave”, and click “Save” once all the settings have been
changed. C. Modify Slave Select the slave device to be modified and click “Modify Slave” to enter the configuration page. The
parameters of “Modify Slave” page are same with “Add New Slave” page.
4.6.3 Data Query
You can use the data query function to read the data in the gateway device's current registers. The data query function is queried according to the function code.
Data Query Parameters:
Function ID: the number of the queried data (01,02,03,04)
Data Start Address: the starting data address of device ranging from 0 to 65535
Data Length: the data length written to slave device ranging from 1 to 125
Gateway Address: display the data started from the setting data query starting address in device
registers
Value (denialism): displaying the data in the register in decimal form
Value (hexadecimal): displaying the data in the register in hexadecimal form
4.7 Import/Export
The page is to import or export the configuration file for KGW3101. The device name, networks, the serial parameters and operating mode in imported file can be modified.
24
Import/Export Parameters:
Export Config File: to export the configuration file of the device
Import Config File: to import the modified configuration file of the device
Upload Status: the progress bar of uploading file
4.8 Upgrade Firmware
The Upgrade Firmware page is where the gateway’s firmware can be upgraded, and the “Upload Status” is the progress bar of upgrading firmware. After the upgrade successes, reboot the gateway device and the system will start with the new firmware.
4.9 Change Password
You can modify the user’s password in this page (now the default username is admin, and the default password is admin).
Password Modify: After input the current password, input the new password twice, then click the “Save” to save the changed password.
Security Management: The default set is visiting to HTTP(Web) console; After click “HTTPS”, enable to visit the HTTPS(Web) Console.
4.10 Load Factory Default
The Load Factory Default page is to reset the gateway to factory setting.
25
Note: all parameters of the device will be reset to the factory setting, so please do not use the function unless you confirm.
4.11 Save/Reboot
All changes will effect by clicking the “Save” without restarting the gateway. If you need to restart the device, click "reboot" to restart the device.
4.12 Help
When you have questions, you can click “Help” icon located in the top right corner of per configuration page.
4.13 Logout
For safety reasons, remember to log out to prevent other people accessing the gateway without the proper authorization.
26
5. Case Studies
The following topics are covered in this chapter:
Transparent-A Transparent-B Agent-A Agent-B
27
5.1 Transparent-A
Using a KGW3101 Modbus Gateway and a PC in Transparent-A mode, the port type is RS-232. The ethernet side works as a Modbus TCP Slave. Connect S1 which works as a Modbus RTU/ASCII Master to PC by DB9 cable.
A. Web Configuration Power on KGW3101 and log in web server of the device, set the operation mode of device to Transparent
mode in “Overview” page.
Then, click “Operating Settings” in navigation bar to set Port S1 to RTU Master mode, and click “Save” to save the change.
Click “Serial Settings” in navigation bar to set the parameters of S1 according to the conditions. At last click the “Save” to save the change.
28
B. PC Configuration Connect PC and the gateway serial port (S1) by DB9 female cable to configure for PC. Run “Modbus Slave”
software on PC. The “Modbus Slave” parameters must be configured as shown in the following figure. Connection: Serial Port Mode: RTU And then click “OK” into the application page.
Now run “Modbus Poll” on PC and set the parameters as shown in the following figure. Configure PC which was connected to E1 to 192.168.0.249. And then click “OK” to enter the application page.
Finally, input numbers in address 1 and address 2 respectively in “Modbus Slave”, the corresponding datas
29
are as shown in the following figure.
5.2 Transparent-B
Using a KGW3101 Modbus Gateway and a PC in Transparent-B mode, the port type is RS-232. The ethernet side works as a Modbus TCP Master. Connect S1 which works as a Modbus RTU/ASCII Slave to PC by DB9 female cable.
A. Web Configuration Power on KGW3101 and log in web server of the device, set the operation mode of device to Transparent
Mode in “Overview” page.
Then, click “Operating Settings” in navigation bar to set S1 to RTU Slave mode, click “Save” to save the change.
Click “Serial Settings” in navigation bar to set the parameters of the serial port, and click “Save” to save the change.
30
B. PC Configuration Connect PC and the gateway serial port (S1) by DB9 female cable to configure for PC. Run “Modbus Poll”
software on PC. The “Modbus Poll” parameters must be configured as shown in the following figure. Connection: Serial Port Mode: RTU Port: 8001 Please note that the Slave ID should be same with the ID in “Operating Mode”. And then click “OK” enter the
application page.
31
Then run the “Modbus Slave” software on PC and set the parameters as it is shown in the following figure, click “OK” to into the application page. In Setup>Slave Definition, the Slave ID should be same as the ID in “Operating Mode”.
After configuration, input number in address 1 and address 2 respectively in “Modbus Slave” software, and you can see the numbers in corresponding address in “Modbus Poll” software.
32
5.3 Agent-A
Using a KGW3101 Modbus Gateway and a PC in Agent-A mode, the port type is RS-232. The ethernet side works as a Modbus TCP Slave. Connect S1 which works as a Modbus RTU/ASCII Master to PC by DB9 female cable.
A. Web Configuration Power on KGW3101 and log in web server of the device, set the operation mode of device to Agent Mode in
“Overview” page.
Next click “Operating Settings” in navigation bar to set S1 to RTU Master mode, and click “Save” to save the change.
Then set the parameters of each serial port, click “Save” to save the change.
Click “Agent Settings” in navigation bar and select “Gateway Settings” to set the parameters of the device, and click “Save” to save the change.
33
Enter into the “Device List” in navigation bar and click “Add New Slave” to add a new slave device.
B. PC Configuration
Run “Modbus Slave” software on PC. The “Modbus Slave” parameters must be configured as shown in the following figure. And then click “OK” to enter into the application page.
After configuration, click “OK” into the application page, add a Modbus RTU slave that be same as Modbus Slave terminal device.
34
Then, run “Modbus Poll” on PC and set the parameters as shown in the following figure. Connection: TCP/IP Mode: RTU IP: 192.168.0.249 Port: 502 And then click “OK” to enter into the application page.
In the application page, set the Slave ID in Setup>Read/Write Definition be same with the Modbus ID in “Gateway Settings”, then add a Modbus TCP device in corresponded to the Modbus Slave terminal device.
35
Finally, input number in address 1 and address 2 respectively in “Modbus Slave” software, and you can see the numbers in corresponding address in “Modbus Poll” software.
5.4 Agent-B
Using a KGW3101 Modbus Gateway and a PC in Agent-B mode, the port type is RS-232. The ethernet side works as a Modbus TCP Master. Connect S1 which works as a Modbus RTU/ASCII Slave to PC by DB9 female cable.
A. Web Configuration Power on KGW3101 and log in web server of the device, set the operation mode of device to Agent Mode in
“Overview” page.
Then, click Operating Settings” in navigation bar to set S1 to RTU Slave mode, and click “Save” to save the change.
36
Then, click “Serial Settings” in navigation bar to set the parameters of the serial port. At last, click the “Save” to save the change.
Next click “Agent Settings” in navigation bar and select “Gateway Settings” to set the parameters of the device. At last, click the “Save” to save the change.
Finally click “Device List” in navigation bar and click “Add New Slave” to add a new slave device.
B. PC Configuration Run “Modbus Poll” software on PC. The “Modbus Poll” parameters should be configured as shown in the
following figure. Connection: Serial Port Mode: RTU And then click “OK” to enter the application page.
37
In the application page, make the Slave ID in Setup>Read/Write Definition be same with the Modbus ID in “Gateway Settings”, and then add Modbus RTU device in corresponded to the terminal device.
Then, run “Modbus Slave” on PC and set the parameters as shown in the following figure. Connection: TCP/IP Mode: RTU Port: 8001 And then click “OK” to enter the application page.
38
In the application page, add a Modbus TCP slave device in corressponded to the Modbus Slave terminal device.
Finally, input number in address 1 and address 2 respectively in “Modbus Slave” software, and you can see the numbers in corresponding address in “Modbus Poll” software.
Loading...