Microcyber G1003 User Manual

G1003 HART to Modbus Gateway
User Manual
Microcyber Corporation
Caution
1. Please don’t disassemble components by yourself.
2. Please check if the power meets the power request in the User Manual.
Version
V1.0
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions.
Microcyber Corporation 2015
The technical data may change at any time.
Content
OVERVIEW ........................................................................................................................... 1 CHAPTER 1
1.1 OUTLINE STRUCTURE ....................................................................................................................................1
1.1.1 Gateway Dimension Figure .............................................................................................................1
1.1.2 Gateway Structure Figure ...............................................................................................................2
INSTALLATION ..................................................................................................................... 3 CHAPTER 2
2.1 DIN RAIL INSTALLATION ................................................................................................................................3
2.2 GATEWAY HARDWARE INTERFACE ..................................................................................................................3
2.2.1 HART Interface ................................................................................................................................4
2.2.2 Gateway Power interface ...............................................................................................................4
2.2.3 Modbus-RS485/422Interface ..........................................................................................................4
2.2.4 Modbus-RS232 Interface ................................................................................................................4
2.2.5 Gateway Mode Selection Switch.....................................................................................................4
2.2.6 Internal /External Sampling Resistor Selection Switch (RS) ............................................................5
2.2.7 LED ..................................................................................................................................................5
2.3 TYPICAL TOPOLOGIC CONNECTION ..................................................................................................................5
FUNCTION OVERVIEW .......................................................................................................... 8 CHAPTER 3
3.1 WORKING MODES OF THE GATEWAY ..............................................................................................................8
3.1.1 Normal Working Mode ...................................................................................................................8
3.1.2 HART Modem Mode ........................................................................................................................9
3.1.3 Configuration Mode ........................................................................................................................9
3.1.4 Debugging Mode ............................................................................................................................9
3.2 SUMMARY OF HART CHANNEL ......................................................................................................................9
3.3 SUMMARY OF MODBUS CHANNEL ............................................................................................................... 10
3.4 DATA AREA INSIDE THE GATEWAY ................................................................................................................ 11
3.4.1 Internal Data Access .................................................................................................................... 11
3.4.2 Partition of Internal Data Area .................................................................................................... 12
3.4.3 Default Auto-Polling Mode .......................................................................................................... 12
3.4.4 Self-defined HART Command List ................................................................................................ 14
GATEWAY CONFIGURATION ............................................................................................... 16 CHAPTER 4
4.1 INSTALL AND START CONFIGURATION SOFTWARE ........................................................................................... 16
4.2 OVERVIEW OF CONFIGURATION SOFTWARE ................................................................................................... 16
4.3 SOFTWARE CONFIGURATION AND HARDWARE CONNECION ............................................................................. 18
4.4 BASIC PARAMETER CONFIGURATION FOR MODBUS CHANNEL .......................................................................... 20
4.5 BASIC PARAMETER CONFIGURATION OF HART CHANNEL ................................................................................ 21
4.6 PARAMETER CONFIGURATION FOR CUSTOM HART COMMAND ........................................................................ 22
4.6.1 Address Automatic Mapping ....................................................................................................... 23
4.6.2 Address Conflict Detection ........................................................................................................... 24
4.6.3 Memory Data Display .................................................................................................................. 24
4.7 EXCEL SAVE CONFIGURATION PARAMETER .................................................................................................... 25
4.8 LIBRARY FILE SAVE CONFIGURATION PARAMETER ........................................................................................... 26
4.9 CONFIGURATION EXAMPLE AND VERIFICATION............................................................................................... 26
4.9.1 Example........................................................................................................................................ 26
4.9.2 Verificaion .................................................................................................................................... 28
GATEWAY STATUS ............................................................................................................. 30 CHAPTER 5
GATEWAY MAINTENANCE .................................................................................................. 31 CHAPTER 6
TECHNICAL SPECIFICAIONS ................................................................................................. 32 CHAPTER 7
7.1 PERFORMANCE ......................................................................................................................................... 32
7.2 DEFAULT COMMUNICATION PARAMETER ...................................................................................................... 33
APPENDIX A GATEWAY MEMORY AND REGISTER DESCRIPTION .............................................................. 34
APPENDIX B HART PROTOCL ................................................................................................................... 36
APPENDIX C MODBUS PROTOCL ............................................................................................................. 47
- 1 -
Overview Chapter 1
Product Name: HART to Modbus Gateway Model No: G1003 The gateway realizes protocol converting from HART to Modbus RTU / ASCII. Supporting to connect multi HART slave devices into Modbus network. In the gateway, HART terminal is master station, Modbus terminal is slave station.
Figure 1 G1003 HART to Modbus Gateway Product Diagram
1.1 Outline Structure
1.1.1 Gateway Dimension Figure
99
22.5
114.5
Figure 2 Gateway Dimension Figure (114.5x99x22.5, Unit: mm)
- 2 -
1.1.2 Gateway Structure Figure
1
2
4
3
Figure 3 Gateway Structrure Figure
1
Teminal
2
Bottom Housing
3
Main Board
4
Upside Housing
- 3 -
Installation Chapter 2
2.1 Din Rail Installation
1
2
ON
Press downward
OFF
1
Pull downward
2
Push Inward
Pull upward
Figure 4 Din Rail Installation Figure
2.2 Gateway Hardware Interface
1
HART+2HART-
3
NC
4
NC
5
V+
6
V-
7
EARTH
8
NC
9
R-
10
R+
11
T-/B-
12
T+/A+
13
RXD
14
TXD
15
GND
16
EARTH
Terminal Introduction
Internal/external
sampling resistor
selection switch
Gateway mode
selection switch
LED
Figure 5 Gateway Hardware Interface Figure
- 4 -
2.2.1 HART Interface
Table 1 HART Interface Terminal Defination
No
Name
Usage
1
HART+
Connect HART sampling resistor
2
HART-
Connect HART sampling resistor
3
NC
Not Connected
4
NC
Not Connected
2.2.2 Gateway Power interface
Table 2 Power Interface Teminal Defination
No
Name
Usage
5
V+
Connect 9-30V DC power+
6
V-
Connect 9-30V DC power-
7
EARTH
Protective earth terminal
8
NC
Not Connected
2.2.3 Modbus-RS485/422Interface
Table 3 RS485/422 Interface Terminal Defination
No
Name
Usage
9
R-
RS-422 receiving -
10
R+
RS-422 receiving +
11
T-/B-
RS-422 sending - / RS-485 B-
12
T+/A+
RS-422 sending + / RS-485 A+
2.2.4 Modbus-RS232 Interface
Table 4 RS232 Interface Terminal Defination
No
Name
Uasge
13
RXD
Connect TXD of Modbus master system
14
TXD
Connect RXD of Modbus master system
15
GND
Connect GND of Modbus master system
16
EARTH
Protective earth terminal
2.2.5 Gateway Mode Selection Switch
Table 5 Gateway Mode Selection Switch Defination
Code
Mode
DIP Switch 1
DIP Switch 2
Mode Description
00
Normal
OFF
OFF
Normal working mode(default)
01
HTMD
OFF
ON
HART modem mode
10
Config
ON
OFF
Configuration mode
11
Debug
ON
ON
Debuging mode
Notice: If switch mode, the gateway cannot enter the new mode before restarting power.
- 5 -
2.2.6 Internal /External Sampling Resistor Selection Switch (RS)
The HART to Modbus Gateway allows the user to select internal or external sampling resistor to obtain HART signals. The internal resistor is 250Ω, 1W. The user must use external resistor if the power of sampling resistor is more than 1W.
Table 6 Sample Resistor Selection Switch Defination
Name
Position
Description
RS
ON
Use external sampling resistor (R OUT)
OFF
Use internal sampling resistor (R IN)
2.2.7 LED
Table 7 LED Defination
Name
Color
Description
PW
Yellow
Device power indicator
MB
Yellow-green
Yellow
Modbus sending indicator
Green
Modbus receiving indicator
HT
Yellow-green
Yellow
HART sending indicator
Green
HART receiving indicator
2.3 Typical Topologic Connection
2 3
G1003
24VDC
Power Supply
250Ω
250Ω
1/4W
4~20mA
Pos(+)
Neg(-)
HART-
HART+
+
-
RS
Transmitter
Loop powered – use external resistor
ON
Figure 6 Loop Powered – Use External Resistor
- 6 -
2 3
G1003
24VDC
Power Supply
250Ω
250Ω
1/4W
4~20mA
Pos(+)Neg(-)
HART-
HART+
+
-
RS
Transmitter
External Powered – Use External Resistor
ON
Figure 7 External Powered – Use External Resistor
2 3
G1003
24VDC
Power Supply
250Ω
1/4W
4~20mA
Pos(+)
Neg(-)
HART-
HART+
+
-
RS
Transmitter
Loop Powered – Use External Resistor
DCS
R
ON
Figure 8 Loop Powered – Use External Resistor
- 7 -
2 3
G1003
24VDC
Power Supply
250Ω
250Ω
1/4W
Pos(+)
Neg(-)
HART-
HART+
+
-
RS
Transmitter
Loop Powered-Use External Resistor-Multi-
point connection mode
Note: To avoid internal resistor over current burn out, shall select external resistor under multi­point connection mode.
Transmitter
Transmitter
ON
Figure 9 Loop Powered – Use External Resistor– Multi-point Connection Mode
1 2
G1003
24VDC
Power Supply
250Ω
250Ω
1/4W
4~20mAPos(+)
Neg(-)
HART-
HART+
+
-
RS
Transmitter
Loop powered – use internal resistor
OFF
Figure 10 Loop Powered – Use Internal Resistor
- 8 -
Function Overview Chapter 3
The HART to Modbus gateway contains a HART master channel and a Modbus slave channel. HART master channel is in charge of obtaining HART slave data in HART network, and write the obtained data into data area inside the gateway; Modbus slave channel is responsible for receiving request from Modbus master station, including requests during configuring gateway parameter and loop reading data area inside the gateway; By the HART to Modbus gateway, easily realize the function that Modbus master station accesses to HART network data.
G1003
Modbus
Remote IO
Modbus Master
HART Slave
Figure 11 Topology Connection for Gateway Application
3.1 Working Modes of the Gateway
The HART to Modbus gateway has four working modes, respectively is normal working mode, HART modem mode, configuration mode and debugging mode. Gateway mode may be selected by two-bit DIP switch on the gateway. Please refer to 2.2.5 for detail setting.
3.1.1 Normal Working Mode
The Gateway runs based on the configured parameters, obtains slave device data in HART network and stores the data into data area inside the gateway. Simultaneously, Modbus channel is in a state of waiting for the request. It processes and responds if theres request. The Modbus channel communicates based on the communication parameters configured by user.
- 9 -
3.1.2 HART Modem Mode
The Gateway transfers all the data between HART master system and slave network by unvarnished transmission mode. The gateway may be completely used as HART modem. Modbus channel transmits data according to HART channels communication parameters (baud rate: 1200bps, 8-bit data bit, odd parity, 1-bit stop bit).
3.1.3 Configuration Mode
With configuration software, all the parameters of the gateway can be configured. Under configuration mode, HART channel cannot work, only Modbus channel can receive request from the configuration software. Modbus channel communicates with the configuration software by the fixed communication parameters (address: 1, baud rate: 19200bps, 8-bit data bit, even parity, 1-bit stop bit, CRC low byte in the front).
3.1.4 Debugging Mode
HART channel and Modbus channel runs normally. Without available Modbus master system, the user can check all the parameters of the gateway by configuration software, simply debug the gateway. Modbus channel communicates with the configuration software by using the fixed communication parameters (address: 1, baud rate: 19200bps, 8-bit data bit, even parity, 1-bit stop bit, CRC low byte in the front).
3.2 Summary of HART Channel
The HART to Modbus gateway supports one HART channel, runs as the primary or the secondary master station, obtains (by sending HART command) all the configured HART slave device data from the HART network, and temporarily stores the data into data area inside the gateway, waiting for access request from Modbus master system. Under normal working mode, the gateway will take the initiative to access HART slave device, namely send HART command 0, 3, 13, 14, 15 to obtain the specified HART slave device data in HART network, and store into basic data area of HART slave station. In addition, the user can also configure required HART commands to perform specific functions. HART channel can be configured 100 HART commands. In view of the HART commands configured by the user, when the gateway receives response data from HART
- 10 -
slave device, the data will be temporarily stored into data input area inside the gateway; When the gateway needs to send a user configuration command to HART slave device, the data will be read from data output area inside the gateway. After the HART to Modbus gateway is powered on, it will send HART command 0 to query if the configured device is online, and set whether online mark of the corresponding device by judging whether theres response from slave device. When sending other HART command, the gateway will only send command to the current online HART slave device. If theres no response from HART slave device after HART command is sent out, and exceeding number of retries, the gateway will take the current slave device as offline status, and update the devices status online or not only when the next command 0 is sent out to query offline device. The ability of the gateway can improve the communication throughput of HART network. In one HART network, there may be two HART master stations at the same time, the primary or the secondary master station. The HART to Modbus gateway can be configured to work as any one, also supports there is another master, the primary or the secondary master in the network at the same time. When there are two masters communicating within the network at the same time, data throughput of the gateway will be decreased; And when there is only one HART maser communicating, data throughput of the gateway will increase significantly.
3.3 Summary of Modbus Channel
Modbus channel is taken as slave station. Its function is to receive the request from Modbus master system, including configuration request to gateways parameters and request to read gateways internal data. Modbus channel can be configured as Modbus RTU or Modbus ASCII, other communication parameters (Modbus slave address, baud rate, data bits, parity, stop, etc.) all may be easily configured by the configuration software. Under different working mode, the communication parameters of Modbus channel are differrent. Under normal working mode, the communication parameter is set to that configured by the user; Under configuration and debugging modes, use fixed default communication parameters (address: 1, baud rate: 19200bps, 8-bit data bits, even parity, 1-bit stop bit);Under HART modem mode, to transmit HART data packet, the gateway must use HART communication mode, namely the communication parameters are set to (baud rate: 1200bps, 8-bit data, odd parity, 1-bit stop bit). Modbus channel totally has three hardware interfaces, RS232, RS485 and RS422. And they
- 11 -
all occupy the Modbus channel, namely the three hardware interfaces can be connected at the same time, but cannot communicate at the same time.
3.4 Data Area inside the Gateway
Internal data area of the HART to Modbus gateway is shared by HART channel and Modbus channel. The gateway is like a pipe, and its function is to transmit device data in one network to the device in another network. Except the data from HART slave device and Modbus master device needs to be mapped into data area inside the gateway. Status and error information generated in the working process will also be mapped into specific data area inside the gateway
3.4.1 Internal Data Access
Figure 12 below describes direction of data flow inside and outside the gateway:
HART Slave HART Master Data area Modbus Slave ModbusMaster
Other
application
HART
driver
Data area
Response
Request
HART
slave device
(data returned by
read command)
Write
Read (data required by write command)
Read
Write
Response
Request
Modbus
driver
Gateway
Figure 12 Gateway Data Access
(1) HART master drivers inside the gateway use data in two ways: Send HART read command to HART slave channel, returned response data will be
written into data area inside the gateway;
Send HART write command to HART slave device, then need to get data from data
output area inside the gateway. (2) Modbus drivers inside the gateway use data in two ways: Receive written request of Modbus master station, write data (configured parameters)
into data area; Reply read request of Modbus master station, return data in the data area to Modbus
master system.
- 12 -
3.4.2 Partition of Internal Data Area
Partition of data area inside the HART to Modbus gateway is shown in Figure13:
Function code: 0x03/0x06/0x10
Data Area
Data output area
Data input area
Slave
Basic data of addr 0 HART slave device Basic data of addr 1 HART slave device
Basic data of addr 2 HART slave device
.
. .
Basic data of addr 15 HART slave device
Gateway status data
Function code:0x04
Figure 13 Partition of Data inside the Gateway
3.4.3 Default Auto-Polling Mode
Default auto-polling mode can be set by Auto-polling mode enable switch in HART configuration parameters. If the function is prohibited, HART channel will only perform the command in user self-defined HART command list; If the function is enabled, HART drivers inside the gateway will automatically obtain data of the configured HART slave device in HART network, and simultaneously perform the HART commands configured by user. If auto-polling mode is enabled, the gateway will automatically perform the HART commands as the following table to the configured HART slave device, and automatically store response data into HART slave basic data area inside the gateway.
Table 8 Built-in HART Commands
Command No.
Description
0
Read unique identifier (long address, manufacturer ID, etc.)
3
Read dynamic variables and loop current
13
Read tag, descriptor and date
14
Read primary variable transducer information
15
Read device information
The gateway can obtain basic data information from 16 HART slave devices at most. Each HART slave device needs 102 bytes data area as buffer, and they are respectively stored with different short address, shown as Figure 13. The storage format of the 102-byte data is
- 13 -
in the table below:
Table 9 Basic Data Information of Each HART Slave Device
Data Area Byte Offset
Data Type
Description
Byte Number
Data Resource 0
Byte
Auto-polling mode command status
1
Produced by Gateway
1
Byte
Response Code (RC)
1
HART response frame
2
Byte
Device status (DS)
1
HART response frame
3
Byte
Minimum number of preambles required for the request message from the master to the slave
1
CMD0 4-5
Word
Manufacturer ID
2
CMD0
6-7
Word
Device Type
2
CMD0
8
Byte
Minimum number of preambles to be sent with the response message from the slave to the master
1
CMD0 9
Byte
HART protocol major revision number
1
CMD0
10
Byte
Device revision level
1
CMD0
11
Byte
Software revision level
1
CMD0
12
Byte
Hardware revision level
1
CMD0
13
Byte
Flags
1
CMD0
14-16
Byte
Device ID
3
CMD0
17
Byte
Maximum number of device variables
1
CMD0
18-19
Word
Configuration change counter
2
CMD0
20
Byte
Primary variable units code
1
CMD3
21
Byte
Secondary variable unit code
1
CMD3
22
Byte
Tertiary variable units code
1
CMD3
23
Byte
Quaternary variable units code
1
CMD3
24-31
Byte
Tag 8 CMD13
32-47
Byte
Descriptor
16
CMD13
48-50
Byte
Date
3
CMD13
51
Byte
Extended field device status
1
CMD0
52-54
Byte
Transducer serial No.
3
CMD14
55
Byte
Transducer limits and minimum span units code
1
CMD14 56
Byte
Option code for primary alarm
1
CMD15
57
Byte
Primary variable transfer function
1
CMD15
58
Byte
Primary range upper-lower unit
1
CMD15
59
Byte
Write protection code
1
CMD15
- 14 -
60-61
Word
Private label distributor code
2
CMD0/CMD15
62-65
Float
Primary variable (PV)
4
CMD3
66-69
Float
Secondary variable (SV)
4
CMD3
70-73
Float
Tertiary variable (TV)
4
CMD3
74-77
Float
Quaternary variable (QV)
4
CMD3
78-81
Float
Upper transducer limit
4
CMD14
82-85
Float
Lower transducer limit
4
CMD14
86-89
Float
Minimum span
4
CMD14
90-93
Float
PV upper range value
4
CMD15
94-97
Float
PV lower range value
4
CMD15
98-101
Float
PV damping value
4
CMD15
Total Byte Number
102
Total Word Number
51
Total register number per HART slave device
51
Each auto-polling mode command status is defined in the following table:
Table 10 Execution State Defination of Built-in Commands
Position #
Description
0
Command 0 executed successfully
1
Command 3 executed successfully
2
Command 13 executed successfully
3
Command 14 executed successfully
4
Command 15 executed successfully
5
Reserved
6
Reserved
7
Reserved
Please refer to detail description in Annex A for register location of basic information for each HART slave device.
3.4.4 Self-defined HART Command List
Self-defined HART command list specifies user-configured HART commands. When sending this type command, the gateway will read parameters from data output area of the gateways internal data area, to make HART data packet, and send it to HART slave device; The gateway stores received response data into data input area of the gateways internal data area, used by Modbus channel.
- 15 -
Data Output Area
Frame
head
Write data
Frame
end
Frame
head
Read data
Frame
end
Data Input Area
Figure 14 Data Input / Output Area Access
When sending self-defined HART command package, the data of data domain is written by the user in data output area, and the user shall ensure its correctness.
- 16 -
Gateway Configuration Chapter 4
In this section, simply describe how to configure the HART to Modbus gateway, steps and quick configuration example with Modbus General Configuration tool (hereinafter referred to as configuration software). Please refer to user manual of configuration software for details.
4.1 Install and Start Configuration Software
Before configuring the HART to Modbus gateway, Modbus General Configuration tool must be installed (You can download the latest version from www.microcyber.cn/en). Then run file “Modbus General Configuration tool.exe”, following installation notes, you may install the software smoothly. Three ways to start HART to Modbus configuration software:
Start by double-clicking shortcut in the PC desktop; Start by clicking shortcut in start menu;
Start by double-clicking in the install directory.
4.2 Overview of Configuration Software
After successful startup, configuration software interface is shown in Figure 15:
- 17 -
Figure 15 Main Interface of Configuration Software
Menu Bar
File, the user executes menu "File"- >"Exit" or click close button at top right corner of the
window, the configuration software will exit;
Tool, include Language Setting function, support Chinese and English Help, display basic information of the configuration software, such as software version
number, release time, etc. Toolbar
"Full search device" function, can full search online serial ports which are added into
device list;
"Cancel full search" function, cancel full search in progress;
"Batch download" function, batch download the data in current parameter area;
"Print" function, print the data in current parameer area. Device List Here in the form of a treeview, manage serial port and its subordinate device, maximum 16 serial ports, and manage one Modbus slave device under each port. In the treeview, the user can add serial port, search device, delete device, connect, disconnect, upload parameters, download online parameters, download offline parameters, etc.
- 18 -
Figure 16 Device List Interface
Device Information Display manufacturer information ID, device type ID and protocol type, etc. Parameter Area Display device configuration parameters by sort in the form of table, and can view and configure the gateway parameters through this parameter area. Document Libary Manage files of the document library in the form of treeview. Library files are saved in XML format. Data content is parameter data with protocol type of slave device. The user can add, delete, save and import library files.
Figure 17 File Library Interface
Operation Tip
Here it displays some simple tips for users operation, which helps user to check status and operation guidelines, etc.
4.3 Software Configuration and Hardware Connecion
(1) Before the user configues parameters of HART to Modbus gateway, the user shall
make the MC,2-bit mode configuration in the front of gateway boards at configuration mode, that is:
- 19 -
Table 11 Definations of MC Position
MC
Bit 2
OFF
Bit 1
ON
(2) Use serial lines (or 485/422 serial line) to connect gateways RS232 (or
RS485/RS422) port and computers port, and then t power on the gateway. And the gateways power LED (PW) shall be on all the time.
(3) Start the configuration software, click the device list Hostwith the right button, and
click to Add a serial port, the list intrface shall be shown as Figure 18. In the left side of Port Listchoose port connected with gateway, click to move it into Selected Portsin the right side,and then click Create, then the selcted serial port
COMx shall be listed under the host in the device list.
Figure 18 Add Serial Port Interface
(4) Click serial port COMx in the device list with the right button, in the list, click Search
Device with the left button with the left button, or use Search All Devices in the list to search devices with the left button.
(5) Until now, G1003 shall be shown in the tree list of Host->COMxat the left side of
configuration software. Click G1003 with the left button, the configuration software shall read out gateways all the current configuration parameters, and show in the parameter zone of configuration software.
- 20 -
Figure 19 Interface for G1003 On-line
4.4 Basic Parameter Configuration for Modbus Channel
Here it describes basic paramete configuration for Modbus channel, and the paramaters are effetice when the gateway is working at mormal mode. Choose Modbus Configuration in Parameter List in the parameter zone of configuraiton software, and it will show current configuration of Modbus channel, as Figure 20. The user can only modify part of parameters in this mode, after the configuration, click Download The Current Page Parametersto download the new configuration.
Figure 20 Modbus Channel Configuration Interface
Modbus configuration parameters description is shown as following:
- 21 -
Table 12 Modbus Configuration Parameter Description
Parameter Name
Parameter Description
Baud Rate
300,600,1200,2400,4800,9600,19200,38400,57600,115200bps, optional
Data Bits
7 bits or 8 bits, optional (When the communication mode is set as RTU, 7 bits is unmeaning.)
Parity
None, Even or Odd, optional.
Stop Bits
1 bit or 2 bits, optional
CRC Byte Order
Normal or exchange, optional (send high byte first or low one first)
Node Address
Set gateways Modbus channels slave address, 1~247
Communication Mode
RTU or ASCII, optional
4.5 Basic Parameter Configuration of HART Channel
Choose HART configuration datain the configuration software zone Parameter List, and it will show the current parameter configuration of gateways HART channel, shown as Figure
21. The user can only modify part of parameters in this mode, after the configuration, click Download The Current Page Parametersto download the new configuration.
Figure 21 HART Channel Parameter Configuration Interface
HART configuration parameters description is shown as following:
Table 13 HART Configuration Parameter Description
Parameter Name
Parameter Description
- 22 -
Network Mode
Choose HART networks topology connection is point to point or multi-drop mode. In point to point mode, gateway can only communicate with HART slave with address 0.
Master Type
Choose gateway to work as primary or secondary master.
Short Addr List
It is used to configure short address (polling address)of slave device in HART network, range is 0-15.And it has many options.
Preambles
Synchronization mark for sending HART frame time, range is 2-20. And it can set according to specific request of HART slave device.
User Command Count
The number of users custom commands and it cannot be read. It shall increase automatically when the user is configuring commands.
Retry Count
After the gateway sends HART command, the number of retry times without receiving response, range 0-10.
Auto-Polling
It shall execute gateways internal HART commands (CMD0/3/13/14/15).
Poll Interval (ms)
It is the time interval between sending a command and another command, range is 256-65535ms. If the polling time is shoter than response timeout, then the time for sending next command shall be delayed until the response time is over.
Response Timeout (ms)
The maximum time to set the gateway is waiting for the device response, range is 256-65535ms. The time shall be set according to maximum data frame length, and it is about frame length*9.16ms. If it is set too short, it may bring in data package lost.
4.6 Parameter Configuration for Custom HART Command
The user may user Custom Command Configuration Data in configuration software to add HART commands, to obtain more data information from device in the field. The user may configure 100 HART commands at most. After the configuration, click Download The Current Page Parametersto download the new configuration.
Figure 22 Custom Command Configuration Data Interface
Shown as Figure 22, after clicking Addto add one HART command, another line shall be added to the list above, and the left Indexshall be increased from 0 autonatically. After
- 23 -
choosing a command, the user may modfy the command property and uses Modifyto finish it. Deleteshall delete the selected command. And each added command shall have the same property:
Custom HART command parameters description is shown as following:
Table 14 Custom HART Command Parameter Description
Parameter Name
Parameter Description
Index
Current command index, range is 0-99; The configuration software shall adjust without configuration.
Short Address
To configure the current command shall belong to which HART slave device, range is 0-15.
Command Number
HART Command No. range is 0-255.
Output Mode
It is used to chooser command execute way, including initialization output, polling output, alter output and no output. Initialization output: The commands shall be powered on
gateway and related HART slave device shall send on-line once.
Polling output: The commands shall output periodicly. Alter output: The command shall execute when the sending
buffer zone alters.
No output: The commands dont output automatically.
(TX) Internal Address
It is used to set memory starting address of command output data, and range is 2000-6999. More related HART information shall be referred in Appendix A.
(TX) Byte Count
It is used to set byte length of command output data.
(RX) Internal Address
It is used to set memory starting address of command input data, and receive the receive data range in buffer.The range is 2000-6999. More related HART information shall be referred in Appendix A.
(RX) Byte Count
It is used to set byte length of command input data.
(TX) From Register Address
It is used for the user to address easily via Modbus master setting parameter, range is 1000-3499. The configuration software shall adjust without configuration.
(TX) Register Count
The user shall adjust according to starting address and length without configuration.
(RX) To Register Address
It is used for the user to address easily via Modbus master setting parameter, range is 1000-3499. The configuration software shall adjust without configuration.
(RX) Register Count
The user shall adjust according to starting address and length without configuration.
4.6.1 Address Automatic Mapping
When the user has added HART commands, and configured all the parameters (except starting address of sending buffer zone and starting address of receiving buffer zone), the configuration software shall distribute starting address in input output zone automatically
- 24 -
without conflict, according to uses configuration type length in input output zone. Click to finish the automatic distribution.
4.6.2 Address Conflict Detection
Through conflict detection function The user may check distribution status for all the configured commands input and output data in memory, to check if there is a conflict.
Click to see Figure 23.
Figure 23 Address Conflict Detection
The tree list in the left shows the configured HART slave devices, and lists all the HART commands configured by the user.In the right it shows the memory distribution in current input and output zone. After clicking a command, memory distribution in the right shall display the storage position for input and output data of current commands in blue. And the conflict shall be marked in red.
4.6.3 Memory Data Display
Memory Data Display Fuction makes it easier for the user to check memory input and output data exchange status and modify the output data. When the gateways Modbus channel is not connected with users Modbus master system, the user may use configuration software to debug HART bus and HART slave device. The operations are as following:
(1) Make MC at debugging mode:
- 25 -
Table 15 Definations of MC Position in Debugging Mode
MC
Bit 2
ON
Bit 1
ON
(2) Use a serial line (or 485/422 convert serial line)to connect gateways RS232
interface and PC serial port, and then power the gateway on, at this time, the gateway is under debugging mode.
(3) Start configuration software, after G1003 is powered on, click to see memory
display shown as Figure 24.
Figure 24 Memory Display
As Figure 24, input and output data shall display each memorys current calue in tems of table. When the user is to modify output data, click Stop, modify the data, and click Send Data. Note: In configuration mode, the user shall write HART command data in output data zone ahead of time for the configured HART command.
4.7 Excel Save Configuration Parameter
After configuration for gateways parameters, the user shall click , to save current pages
- 26 -
Modbus configuration data, Modbus configuration data and custom command configuration data as .Excel file, for reference in the future.
4.8 Library File Save Configuration Parameter
After configuration for gateways parameters, the user shall click Save, to save current pages Modbus configuration data, Modbus configuration data and custom command configuration data as .xml file, shown as Figure 25.
Figure 25 Library File Save
Choose HART in the library type, and input the name G1003, and click Save, then G1003.xml file has beed added to HART index under the tree list in the left. If the user needs to configure another network, with the configuration parameter is as the same as the gateway. The user shall upload G1003.xml file and download the configured parameters.
4.9 Configuration Example and Verification
We shall take Modbus master simulation software to read HART slave device data information obtained from gateway with the polling address as an example, to introduce the operational steps for G1003.
4.9.1 Example
Please refer to 4.3 for hardware connection, configuration software start and G1003 on-line. And at this time, the gateway shall be under configuration mode. Modbus configuration data is shown as Figure 26, and after the configuration, the user shall click Download The Current Page Parameters.
- 27 -
Figure 26 Modbus Parameter Configuration Example
HART configuration data is shown as Figure 27, and after the configuration, the user shall click Download the current page parameters.
Figure 27 HART Parameter Configuration Example
To configure 2 HART custom commands, command 2 and command 34: Command 2 is to read loop current value and range percentage and command 34 is to write damping value. We shall configure command 2 as polling output and command 34 is alter output. Please refer to Figure 28 for more details and after the configuration, the user shall click Download The Current Page Parameters.
- 28 -
Figure 28 Custom Command Parameter Configuration Example
Switch the gateway mode to normal working mode and restart again. At this time the gateway shall execute configured HART commands and obtain device info with with slave address 0.
4.9.2 Verificaion
The user shall connect a HART pressure transmitter to G1003s HART interface, and connect RS232 (or RS485/RS422 via 485/422 to RS232 converter), shown as Figure 29.
24VDC
Power Supply
+
-
250Ω
4~20mA
HART-
HART+
HART Pressure Transmitter
Loop power-Use external
resistance
24VDC
Power Supply
+
-
G1003
+
-
Power
Interface
RS232
Interface
HART
Interface
Figure 29 Connect G1003 to A Pressure Transmitter
The user man use to start memory display, shown as Figure 30.
- 29 -
Figure 30 Memory Display
Command 2 is “Read loop current and percent of range, and there is only response data and no request data. The first 4 byte groups make up the floating current valve, and the last 4 byte groups make up the floating percentage. Command 34 is Write PV damping value and the user shall write finished floating number in the command 34s sending zone(e.g. 0x3FC00000), and Send Data. When the gateway has sent command 34 and received slave response successfully, the response data of command 34 shall be displayed in input zone, and that is receiving zone for command 34.
- 30 -
Gateway Status Chapter 5
Shown as Figure 31, click the configuration software tool bars gateway status monitor , the user may check gateways current working status and if the slave device in HART network is on-line or not.
Figure 31 Gateway Status Monitor
The current working mode represents gateways present working mode, and the user may judge if the MC is at the requested position. Gateway status monitor prepresents numbers of gateways sending HART command and receiving HART response. The 2 statuses shall only change when the gateway is working in debugging mode and normal working mode. Device status lists 16 devices on-line or off-line information. When the related device logo is grey, it means the device is off-line (The gateway and the related device are not connected successfully). When the related device logo is green, it means HART slave device is on-line. Gateway error info indicates if the configuration parameters are wrong. When the related device logo is red, it means there is some error. When the related device logo is black, it means there no error.
- 31 -
Gateway Maintenance Chapter 6
Simple Maintenance
LED
Colour
Normal
Status
Abnormal
Status
Reasons
Solution
PW
Yellow
On
Off
Power failure
Check power and connection
Internal failure
Contact technical support
HT
Yellow
and
Green
Flickering
Off
Wrong gateway configuration
Check configuration parameter, if there is HART command in the configuration
Gateway is under configuration mode.
Checks gateway mode
Power Failure
Check power and connection
Internal failure
Contact technical support
MB
Yellow
and
Green
Flickering
Off
No Modbus device connection
Connect Modbus device correctly
Wrong configuration
Check if the configuration module parameter is correct
Power Failure
Check power and connection
Internal failure
Contact technical support
No.
Abnomal Reason
Reason
Solution
1
Configuration software establishment serial port failure
a. The serial port to
establish is occupied.
a. Turn off the occupied serial port
or use other serial ports.
2
Configuration software search device fails
a. The gateway is not
powered correctly.
b. The connection
between gateway and computer is wrong.
a. Check if gateway power meets
the requirements.
b. Check if the gateway connects
with PO correctly via RS232, RS485 or RS485 interface.
3
Configuration software download paramter fails
a. The gateway is not
powered correctly.
b. The connection
between gateway and computer is wrong.
c. The gateway is not
under configuration mode.
a. Check if gateway power meets
the requirements.
b. Check if the gateway connects
with PO correctly via RS232, RS485 or RS485 interface.
c. Check if MC is at configuration
mode (1:ON, 2:OFF), after the gateway mode is switched, the user shall cut the electricity off to make it effective.
4
Patch dowmload multiple gateways parameter fails
a. Some gateway is not
connected correctly.
b. Some serial port is not
connected with gateway.
c. Check the gateways
power.
a. Check all the gateways
hardware connections.
b. Check if the number of serial
ports is related to the number of gateway.
c. Check if gateway power meets
the requirements.
5
Receiving negative response or no response for Modbus master read write gateway data
a. The gateway is not in
the correct mode.
b. Function code error.
a. Check if gateway power meets
the requirements.
b. Check the data to read is read
only data (FC:4)or read and write data (FC:3,6,16).
Daily maintenance means cleaning device only. Fault maintenance: Please return to the factory if theres fault.
- 32 -
Technical Specificaions Chapter 7
7.1 Performance
Name
Description
Gateway Power
9~30VDC
Modbus Interface
RS-232/RS-422/RS485
HART Interface
HART digital signal
Consumption
1W
Interface Input
Inpedance
≥5KΩ
HART Interface Voltage
Insulation Value
50VDC
HART Output Amplitude
500mVpp (500Ω)
Humidity Range
(5~95)%RH
Working Temperature
-20~70
Storage Temperature
-20~70
Isolation Voltage
Modbus and HART interface, 500VAC
Protection Level
IP20
EMC
GB/T 18268.1-2010 GB/T 18268.23-2010
Weight
0.2kg
Construction material
HousingABS/PA66ClipPOMcoatingPolyester epoxy resin
HART Master Type
The Primary or secondary master can be selected.
HART Network Topology
Support HART point to point or multi-drop working mode, and can connect 15 instruments at most
Burst Mode(Burst)
Support HART slave device burst mode
HART Customized
Command
Support 100 HART customized commands at most, each 5000 bytes for HART input output zone and date buffer zone.
HART Modem Mode
Gateway can be set as HART modem mode.
HART Sampling Resistor
Optional for internal sampling resistor or external resistor
Modbus Baud Rate
300,600,1200,2400,4800,9600,19200,38400,57600,115200bps, optional
- 33 -
Modbus Communication
Mode
Support Modbus slave RTU and ASCII communication mode
Modbus Function Code
0x03/0x04/0x06/0x10
7.2 Default Communication Parameter
Modbus Default Communication Parameter
Normal working mode /
configuration mode / debug mode
HART Modem mode
Baud Rate
19200
1200
Date Bits 8 8
Rarity
Even
Odd
Stop Bits 1 1
CRC Byte Order
Normal
None
Node Address
1
Communication Mode
RTU
HART Default Communication Parameter
Network Mode
Point to point
Master Type
Master
Short Addr List
0
Preambles
5
User Command Count
0
Retry count
3
Auto-Polling
Enable
Poll interval (ms)
256ms
Response timeout (ms)
500ms
- 34 -
Appendix A Gateway Memory and Register
Description
Function
Type
Gateway
memory offset
Corresponding
Modbus register
address
Usage description
Register repair
Read
only register
operated by
function code 4
InData
2000 ~ 6999
1000 ~ 3499 User defined HART command data input field, to cache response data from HART slave device
Slave station
device data for
HART short
address 0
each device has
102 byte, that is 51
registers
7000
3500 H State byte indicating if Command 0,3,13,14,15 is sent successfully
0000 H 7001
3500 L First byte of HART slave station response state
0000 L 7002
3501 H Second byte of HART slave station response state
0001 H 7003
3501 L Minimum number of preambles required for the request message from the master to the slave
0001 L 7004 ~ 7005
3502 Manufacturer ID
0002 7006 ~ 7007
3503 Device type
0003
7008
3504 H Minimum number of preambles to be sent with the response message from the slave to the master
0004
H
7009
3504 L HART protocol major revision number
0004 L 7010
3505 H HART slave station device revision level
0005 H 7011
3505 L HART slave station device software revision level
0005 L 7012
3506 H HART slave station device hardware revision level
0006
H
7013
3506 L Flags
0006
L
7014 ~ 7016
3507 ~ 3508 H Device ID
0007 ~ 0008 H 7017
3508 L Maximum number of device variables
0008 L 7018 ~ 7019
3509 configuration change counter
0009 7020
3510 H Primary Variable Units Code
0010 H 7021
3510 L Secondary Variable Units Code
0010 L 7022
3511 H Tertiary Variable Units Code
0011
H
7023
3511 L Quaternary Variable Units Code
0011
L
7024 ~ 7031
3512 ~ 3515 Tag
0012 ~ 0015 7032 ~ 7047
3516 ~ 3523 Descriptor
0016 ~ 0023 7048 ~ 7050
3524 ~ 3525 H Date
0024 ~ 0025 H 7051
3525 L Extended device status byte
0025
L
7052 ~ 7054
3526 ~ 3527 H Transducer serial no.
0026 ~ 0027
H
7055
3527 L Minmum span unit
0027 L 7056
3528 H Primary Variable Alarm option code
0028 H 7057
3528 L Primary Variable transfer function
0028 L 7058
3529 H Primary Variable range unit
0029 H 7059
3529 L Write protection code
0029 L 7060 ~ 7061
3530 Private label distributor code
0030
7062 7065
3531 ~ 3532 Primary Variable
0031 ~ 0032
7066 ~ 7069
3533 ~ 3534 Secondary Variable
0033 ~ 0034 7070 ~ 7073
3535 ~ 3536 Tertiary Variable
0035 ~ 0036 7074 ~ 7077
3537 ~ 3538 Quaternary Variable
0037 ~ 0038 7078 ~ 7081
3539 ~ 3540 Upper transducer limit
0039 ~ 0040
7082 ~ 7085
3541 ~ 3542 Lower transducer limit
0041 ~ 0042
7086 ~ 7089
3543 ~ 3544 Minimum SPAN
0043 ~ 0044 7090 ~ 7093
3545 ~ 3546 PV upper range value
0045 ~ 0046 7094 ~ 7097
3547 ~ 3548 PV lower range value
0047 ~ 0048 7098 ~ 7101
3549 ~ 3550 PV damping value
0049 ~ 0050 1
7102 ~ 7203
3551 ~ 3601 Slave station device data from HART short address 1
2
7204 ~ 7305
3602 ~ 3652 Slave station device data from HART short address 2
3
7306 ~ 7407
3653 ~ 3703 Slave station device data from HART short address 3
4
7408 ~ 7509
3704 ~ 3754 Slave station device data from HART short address 4
5
7510 ~ 7611
3755 ~ 3805 Slave station device data from HART short address 5
6
7612 ~ 7713
3806 ~ 3856 Slave station device data from HART short address 6
7
7714 ~ 7815
3857 ~ 3907 Slave station device data from HART short address 7
8
7816 ~ 7917
3908 ~ 3958 Slave station device data from HART short address 8
9
7918 ~ 8019
3959 ~ 4009 Slave station device data from HART short address 9
10
8020 ~ 8121
4010 ~ 4060 Slave station device data from HART short address 10
11
8122 ~ 8223
4061 ~ 4111 Slave station device data from HART short address 11
12
8224 ~ 8325
4112 ~ 4162 Slave station device data from HART short address 12
13
8326 ~ 8427
4163 ~ 4213 Slave station device data from HART short address 13
14
8428 ~ 8529
4214 ~ 4264 Slave station device data from HART short address 14
15
8530 ~ 8631
4265 ~ 4315 Slave station device data from HART short address 15
Gateway
status data
8632 ~ 8633
4316 Sending HART request frame's count
8634 ~ 8635
4317 Receiving HART request frame's count
8636 ~ 8637
4318
gateway configuration error message0 means no error
8638 ~ 8639
4319 HART slave station off-line info, 16bit,bit0~bit1 means device 0~15,1 means off-line
8640 ~ 8641
4320 Gateway software revision
8642 ~ 8643
4321 Gateway hardware revision
8644
4322 H Gateway current mode(value 0:adjustment,1:HART modem,2:configuration,3:normal)
8645
4322 L Reserved
Readable &
writeable
3/6/16
OutData
2000 ~ 6999
1000 ~ 3499 User defined HART command data output zone, to save HART request frame required data
- 35 -
Instructions Each HART slave station basic data registers address calculation method:
=3500+51*Polling address+Register offsetting.
Register byte order
Register N high byte
Register N low byte
Register N+1 high byte
Register N+1 low byte
8 bit integral data (88)
0x58
--
--
--
16 bit integral data (1616)
0x06
0x50
--
--
32 bit integral data (32323232)
0x01
0xED
0x36
0xA0
32 bit Floating point data (32.32)
0x42
0x01
0x47
0xAE
When a HART slave station device that connected with G1003’s HART interface off-line (power down), G1003 will keep the latest HART slave station device information before power down.
- 36 -
Appendix B HART Protocl
HART protocol, proposed by Rosemount, is a kind of communication protocol used between
intelligent instrument and control cabnet device. It’s a transitional protocol from 4~20mA
analogue signal to digital signal. To overlay a digital signal on 4~20mA analogue signal, the original analogue signal is still valid, and they two will not affect each other. HART protocol wired part refers to standard physical layer, data link layer and application layer from OSI seven layers models. HART protocol wired part’s physical layer regulates signal Transmission method and the transmission medium. It uses Bell 202 standard FSK to overlay digital signal to 4~20mA current circuit. It uses 1200Hz sine wave represents logic 1, and 2200Hz for logic 0current
peak is plus or minus 0.5mA.
+0.5 mA
0.5 mA
0 mA
20 mA
4 mA
Analogue output represents
process variable
Data ommunication
(HART Protocol)
Figure 32 HART physical layer
HART wired part DDL defines HART wired frame format. The request and response frame format is showd as blow.
Preamble Delimiter Address Command Data length [Data] Check Byte
Figure 33 HART frame format
Name
Descriptions
Preamble
2~20 0xFFsynchronizing signal
Dlimiter
Indicate frame type and address type
Address
HART slave device address, short address (polling address) and long address
Command
Command number0~253
Byte count
Indicate the quantity of bytes in data field
Data
Send data or response data (output data or input data). When it is response frame, the first two bytes in data field is response code and device state.
Check byte
Exclusive OR check byteall Exclusive OR operation from the leading delimiter to data
- 37 -
field end
HART application layer includes three kinds of HART command. It’s used to operate data,
including universal command, common command and special command. HART universal command is introduced as below:
Command 0 Read Unique Identifier Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0
Unsigned-8
“254”
1-2
Enum
Expanded Device type
3
Unsigned-8
Minimum number of Preambles required for the request message from the Master to the Slave. This number includes the two preambles used in asynchronous Physical Layers (along with the Delimiter) to detect the start of message.
4
Unsigned-8
HART Protocol Major Revision Number implemented by this device. For HART Revision 7, this value must be the number 7.
5
Unsigned-8
Device Revision Level
6
Unsigned-8
Software Revision Level of this device. Levels 254 and 255 are reserved.
7
Unsigned-5
(Most Significant 5 Bits) Hardware Revision Level of the electronics in this particular device. Does Not Necessarily Trace Individual Component Changes. Level 31 is Reserved.
7
Enum
(Least Significant 3 Bits) Physical Signaling Code
8
Bits
Flags
9-11
Unsigned-24
Device ID. This number must be different for every device manufactured with a given Device Type.
12
Unsigned-8
Minimum number of preambles to be sent with the response message from the slave to the master.
13
Unsigned-8
Maximum Number of Device Variables.
14-15
Unsigned-16
Configuration Change Counter
16
Bits
Extended Field Device Status
17-18
Enum
Manufacturer Identification Code
19-20
Enum
Private Label Distributor
21
Enum
Device Profile
- 38 -
Command 1 Read Primary Variable Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0
Enum
Primary Variable Units
1-4
Float
Primary Variable
Command 2 Read Loop Current and Percent of Range Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-3
Float
Primary Variable Loop Current (units of milli-amperes)
4-7
Float
Primary Variable Percent of Range (units of percent)
Command 3 Read Dynamic Variables and Loop Current Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-3
Float
Primary Variable Loop Current (units of milli-amperes)
4
Enum
Primary Variable Units Code
5-8
Float
Primary Variable
9
Enum
Secondary Variable Units
10-13
Float
Secondary Variable
14
Enum
Tertiary Variable Units Code
15-18
Float
Tertiary Variable
- 39 -
19
Enum
Quaternary Variable Units Code
20-23
Float
Quaternary Variable
Command 4 Reserved
Command 5 Reserved
Command 6 Write Polling Address, that is Device Short Address
Request Data Bytes
Byte
Format
Description
0
Unsigned-8
Polling Address of Device
1
Enum
Loop Current Mode
Response Data Bytes
Byte
Format
Description
0
Unsigned-8
Polling Address of Device
1
Enum
Loop Current Mode
Command 7Read Loop Configuration Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0
Unsigned-8
Polling Address of Device
1
Enum
Loop Current Mode
Command 8Read Dynamic Variable Classifications Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0
Enum
Primary Variable Classification
1
Enum
Secondary Variable Classification
- 40 -
2
Enum
Tertiary Variable Classification
3
Enum
Quaternary Variable Classification
Command 9Read Device Variables with Status Request Data Bytes
Byte
Format
Description
0
Unsigned-8
Slot 0: Device Variable Code
1
Unsigned-8
Slot 1: Device Variable Code
2
Unsigned-8
Slot 2: Device Variable Code
3
Unsigned-8
Slot 3: Device Variable Code
4
Unsigned-8
Slot 4: Device Variable Code
5
Unsigned-8
Slot 5: Device Variable Code
6
Unsigned-8
Slot 6: Device Variable Code
7
Unsigned-8
Slot 7: Device Variable Code
Response Data Bytes
Byte
Format
Description
0
Bits
Extended Field Device Status
1
Unsigned-8
Slot 0: Device Variable Code
2
Enum
Slot 0: Device Variable Classification
3
Enum
Slot 0: Units Code
4-7
Float
Slot 0: Device Variable Value
8
Bits
Slot 0: Device Variable Status
9
Unsigned-8
Slot 1: Device Variable Code
10
Enum
Slot 1: Device Variable Classification
11
Enum
Slot 1: Units Code
12-15
Float
Slot 1: Device Variable Value
16
Bits
Slot 1: Device Variable Status
17
Unsigned-8
Slot 2: Device Variable Code
18
Enum
Slot 2: Device Variable Classification
19
Enum
Slot 2: Units Code
20-23
Float
Slot 2: Device Variable Value
24
Bits
Slot 2: Device Variable Status
25
Unsigned-8
Slot 3: Device Variable Code
26
Enum
Slot 3: Device Variable Classification
- 41 -
27
Enum
Slot 3: Units Code
28-31
Float
Slot 3: Device Variable Value
32
Bits
Slot 3: Device Variable Status
33
Unsigned-8
Slot 4: Device Variable Code
34
Enum
Slot 4: Device Variable Classification
35
Enum
Slot 4: Units Code
36-39
Float
Slot 4: Device Variable Value
40
Bits
Slot 4: Device Variable Status
41
Unsigned-8
Slot 5: Device Variable Code
42
Enum
Slot 5: Device Variable Classification
43
Enum
Slot 5: Units Code
44-47
Float
Slot 5: Device Variable Value
48
Bits
Slot 5: Device Variable Status
49
Unsigned-8
Slot 6: Device Variable Code
50
Enum
Slot 6: Device Variable Classification
51
Enum
Slot 6: Units Code
52-55
Float
Slot 6: Device Variable Value
56
Bits
Slot 6: Device Variable Status
57
Unsigned-8
Slot 7: Device Variable Code
58
Enum
Slot 7: Device Variable Classification
59
Enum
Slot 7: Units Code
60-63
Float
Slot 7: Device Variable Value
64
Bits
Slot 7: Device Variable Status
65-68
Time
Slot 0 data time stamp
Command 11Read Unique Identifier Associated With Tag Request Data Bytes
Byte
Format
Description
0-5
Packed
Tag
Response Data Bytes
Byte
Format
Description
Same as Command 0 Read Unique Identifier.
- 42 -
Command 12Read Message Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-23
Packed
Message
Command 13Read Tag, Descriptor, Date Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-5
Packed
Tag
6-17
Packed
Descriptor
18-20
Date
Date code
Command 14Read Primary Variable Transducer Information Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-2
Unsigned-24
Transducer Serial Number
3
Enum
Transducer Limits and Minimum Span Units Code
4-7
Float
Upper Transducer LimitUTL
8-11
Float
Lower Transducer LimitLTL
12-15
Float
Minimum Span
- 43 -
Command 15Read Device Information Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0
Enum
PV Alarm Selection Code
1
Enum
PV Transfer Function Code
2
Enum
PV Upper and Lower Range Values Units Code
3-6
Float
PV Upper Range ValueURV
7-10
Float
PV Lower Range ValueLRV
11-14
Float
PV Damping Value (units of seconds)
15
Enum
Write Protect Code
16
Enum
Reserved. Must be set to "250"
17
Bits
PV Analog Channel Flags1 input0 output
Command 16Read Final Assembly Number Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-2
Unsigned-24
Final Assembly Number
Command 17Write Message Request Data Bytes
Byte
Format
Description
0-23
Packed
Message String
Response Data Bytes
Byte
Format
Description
0-23
Packed
Message String
- 44 -
Command 18Write Tag, Descriptor, Date Request Data Bytes
Byte
Format
Description
0-5
Packed
Tag
6-17
Packed
Descriptor
18-20
Date
Date code
Response Data Bytes
Byte
Format
Description
0-5
Packed
Tag
6-17
Packed
Descriptor
18-20
Date
Date code
Command 19Write Final Assembly Number Request Data Bytes
Byte
Format
Description
0-2
Unsigned
Final Assembly Number
Response Data Bytes
Byte
Format
Description
0-2
Unsigned
Final Assembly Number
Command 20Read Long Tag Request Data Bytes
Byte
Format
Description
None
Response Data Bytes
Byte
Format
Description
0-31
Latin-1
Long Tag
Command 21Read Unique Identifier Associated With Long Tag Request Data Bytes
Byte
Format
Description
0-31
Latin-1
Long Tag
- 45 -
Response Data Bytes
Byte
Format
Description
Same as Command 0 Read Unique Identifier.
Command 22Write Long Tag Request Data Bytes
Byte
Format
Description
0-31
Latin-1
Long Tag
Response Data Bytes
Byte
Format
Description
0-31
Latin-1
Long Tag
Command 38Reset Configuration Changed Flag Request Data Bytes
Byte
Format
Description
0-1
Unsigned-16
Configuration Change Counter
Response Data Bytes
Byte
Format
Description
0-1
Unsigned-16
Configuration Change Counter
Command 48Read Additional Device Status Request Data Bytes
Byte
Format
Description
0-5
Bits or Enum
Device-Specific Status
6
Bits
Extended Device Status
7
Bits
Device Operating Mode0x00
8
Bits
Standardized Status 0
9
Bits
Standardized Status 1
10
Bits
Analog Channel Saturated
11
Bits
Standardized Status 2
12
Bits
Standardized Status 3
13
Bits
Analog Channel Fixed
14-24
Bits or Enum
Device-Specific Status
- 46 -
Response Data Bytes
Byte
Format
Description
0-5
Bits or Enum
Device-Specific Status
6
Bits
Extended Device Status
7
Bits
Device Operating Mode0x00
8
Bits
Standardized Status 0
9
Bits
Standardized Status 1
10
Bits
Analog Channel Saturated
11
Bits
Standardized Status 2
12
Bits
Standardized Status 3
13
Bits
Analog Channel Fixed
14-24
Bits or Enum
Device-Specific Status
- 47 -
Appendix C Modbus Protocl
Statement:The objective of this document is only to present the MODBUS protocol to users.
1) Modbus protocol is mainly used between controllers. By Modbus, two controllers can
communicate with each other or they can rely on network (e.g. Ethernet) to communicate with other devices. At present many devices use Modbus protocol.
2) According to ISO/OSI 7 layer network model, standard Modbus protocol defines
Physical layer, Link layer and Application layer.
Physical layer:Define the asynchronous serial communication based on RS232 and RS485 Link layer:Regulate the media access control based on station number identification method of master/slave;
Application layer : Regulate information standard (message format) and communication service function;
Figure 34 Modbus Protocol Model
3) Currently many Modbus devices are based on RS232/48 and also changed Modbus
communication, with only Modbus application layer (information standard) and other
communication protocls’bottom layer. For example, bottom layer uses Ethernet +TCP/IP
and bottom layer uses radio extensive frequency communication etc.
Modbus Protocol main ponits
1) Modbus is master/slave communiation protocol. Master station send message initiatively,
and only the slave station which has the same calling address with master station will send response message.
2) Message is broadcast mode when sent by 0 address, not necessary for slave station’s
response.
- 48 -
3) Modbus defines two kinds of Character transfer mode: ASCII mode、RTU(binary system)
mode, and they cannot be mix-up.This product is suitable for these two modes.
Features
RTU mode
ASCII mode
Coding
binary system
ASCIIPrint character0-9a-zA-Z
Each character
bit
start bit:1BIT
start bit:1BIT
Data bits
data bit8BITS
data bit7BITS
Check bit
parity check bit (selectable):1 bit
parity check bit (selectable)1 bit
Stop bit
Stop bit1 or 2
Stop bit1 or 2
Message check
CRC
LRC
4) Transmission error check
Transmission error check is inspected by odd-even check and redundancy check. When there’s check error, message processing stops and meanwhile slave station
stops communication and response to message.
Once commnunication error happens, message is not reliable. Modbus master will
response as “communication error has happened” if Modbus master station hasn’t
received response from slave station for some time.
5) Message levelcharacter leveluses CRC-16.
6) Modbus message RTU format
No less than 3.5
characters’message
interval time
Address
Function
Data
CRC
check
No less than 3.5
characters’message
interval time
8 BITS
8 BITS
N ×8 BITS
16
BITS
7) Modbus message ASCII format
Start
Address
Function
Data
LRC check
End
1 CHAR
2 CHARS
2 CHARS
n CHARS
2 CHARS
2 CHARS
CRLF
Microcyber Corporation
Add: 17-8 Wensu Street, Hunnan New District, Shenyang, China 110179 Tel: 86-24-31217278 Fax: 86-24-31217293 E-mail: international@microcyber.cn Website: www.microcyber.cn
Loading...