A Sierra Monitor Company
Driver Manual
(Supplement to the FieldServer Instruction Manual)
FS-8700-01 Modbus RTU
&
FS-8700-08 Modbus ASCII
There are several similarities between these two drivers and
we have incorporated them into the same manual to ensure
that our information stays current. Although both drivers
are referenced in this manual, they are different drivers and
need to be ordered separately."
APPLICABILITY & EFFECTIVITY
Effective for all systems manufactured after May 1, 2001
Instruction Manual Part Number: T28700-01
Rev. A.
Applicability and Effectivity
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Table of Contents
Table of Contents
1.
Modbus RTU/ Modbus ASCII Description ....................................................................... 3
2.
Driver Scope of Supply..................................................................................................... 4
2.1. Supplied by FieldServer Technologies for this driver.................................................... 4
2.2. Provided by Supplier of 3rd Party Equipment ................................................................ 4
3.
Hardware Connections ..................................................................................................... 5
4.
Configuring the FieldServer as a Modbus RTU or Modbus ASCII Client. ..................... 6
4.1. Data Arrays/Descriptors............................................................................................... 6
4.2. Client Side Connection Descriptors.............................................................................. 7
4.3. Client Side Node Descriptors ....................................................................................... 8
4.4. Client Side Map Descriptors......................................................................................... 9
4.4.1.
FieldServer Related Map Descriptor Parameters .................................................. 9
4.4.2.
Driver Related Map Descriptor Parameters........................................................... 9
4.4.3.
Timing Parameters................................................................................................ 9
4.4.4.
Map Descriptor Examples. ...................................................................................10
5.
Configuring the FieldServer as a Modbus RTU or Modbus ASCII Server ....................11
5.1. Server Side Connection Descriptors ...........................................................................11
5.2. Server Side Node Descriptors.....................................................................................12
5.3. Server Side Map Descriptors ......................................................................................13
5.3.1.
FieldServer Specific Map Descriptor Parameters.................................................13
5.3.2.
Driver Specific Map Descriptor Parameters .........................................................13
5.3.3.
Map Descriptor Examples ....................................................................................14
Appendix A. Advanced Topics – Modbus RTU ..................................................................15
Appendix A.1. Data Types ..................................................................................................15
Appendix A.2. Single Writes................................................................................................16
Appendix A.3. Read/write Operation ...................................................................................16
Appendix A.4. Managing Floating points with Modbus ........................................................17
Appendix A.5. Connection to York Modbus Microgateway ..................................................18
Appendix A.6. Node_Offline_Response ..............................................................................19
Appendix B. Modbus ASCII - Examples of FieldServer setup for typical clients ............20
Appendix B.1. FieldServer with GE Cimplicity as client .......................................................20
Appendix B.2. FieldServer with Intellution FIX as a client....................................................20
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
1.
Page 3 of 21
Modbus RTU/ Modbus ASCII Description
The Modbus RTU and Modbus ASCII drivers allow the FieldServer to transfer data to and from
devices over either RS-232 or RS-485 using Modbus RTU or Modbus ASCII protocol
respectively. The driver was developed for Modbus Application Protocol Specification V1.1a"
from Modbus-IDA. The specification can be found at www.modbus.org. The FieldServer can
emulate either a Server or Client.
The information that follows describes how to expand upon the factory defaults provided in the
configuration files included with the FieldServer.
There are various register mapping models being followed by various vendors
To cover all these models FieldServer uses the following three Models
•
•
•
Modicon_5digit – Use this format where addresses are defined in 0xxxx, 1xxxx,
4xxxx format. A maximum of 9999 registers can be mapped of each type.
FieldServer driver’s default format.
ADU –Application Data Unit address. Use this format where addresses of each
defined in the range 1-65536
PDU –Protocol Data unit address. Use this format where addresses of each
defined in the range 0-65535.
3xxxx or
This is
type are
type are
The key difference between ADU and PDU is for example if Address_Type is ADU and address
is 1, the driver will poll for register 0. If Address_Type is PDU, the driver will poll for address 1.
Note 1: If vendor document shows addresses in extended Modicon (i.e. 6 digit) format like
4xxxxx then consider these addresses as xxxxx (omit the first digit) and use either ADU or PDU
Note 2: The purpose of providing 3 different ways of addressing the Modbus registers is to allow
the user to choose the addressing system most compatible with the address list being used. At
the protocol level, the same protocol specification is used for all three with the exception of the
limited address range for Modicon_5digit.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
2.
Page 4 of 21
Driver Scope of Supply
2.1.
Supplied by FieldServer Technologies for this driver
FIELDSERVER TECHNOLOGIES PART #
FS-8915-10
FS-8917-02
FS-8917-01
FS-8917-21
FS-8700-01 (T28700-01)
2.2.
DESCRIPTION
UTP cable (7 foot) for RS-232 use
RJ45 to DB9F connector adapter
RJ45 to DB25M connection adapter
RS-485 connection adapter
Driver Manual
Provided by Supplier of 3rd Party Equipment
PART #
DESCRIPTION
Modbus RTU or Modbus ASCII device
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
3.
Page 5 of 21
Hardware Connections
It is possible to connect a Modbus RTU or Modbus ASCII device to any of the existing serial
ports on the FieldServer1. These ports simply need to be configured for the appropriate driver in
the configuration file.
Configure the Modbus RTU or Modbus ASCII device according to manufacturer’s instructions.
1
Not all ports shown are necessarily supported by the hardware. Consult the appropriate Instruction
manual for details of the ports available on specific hardware.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
4.
Page 6 of 21
Configuring the FieldServer as a Modbus RTU or Modbus ASCII Client.
For a detailed discussion on FieldServer configuration, please refer to the FieldServer
Configuration Manual. The information that follows describes how to expand upon the factory
defaults provided in the configuration files included with the FieldServer (See “.csv” sample files
provided with the FieldServer).
This section documents and describes the parameters necessary for configuring the FieldServer
to communicate with a Modbus RTU or Modbus ASCII Server.
4.1.
Data Arrays/Descriptors
The configuration file tells the FieldServer about its interfaces, and the routing of data
required. In order to enable the FieldServer for Modbus RTU or Modbus ASCII
communications, the driver independent FieldServer buffers need to be declared in the
“Data Arrays” section, the destination device addresses need to be declared in the “Client
Side Nodes” section, and the data required from the Servers needs to be mapped in the
“Client Side Map Descriptors” section. Details on how to do this can be found below.
Note that in the tables, * indicates an optional parameter, with the bold legal value being the
default.
Section Title
Data_Arrays
Column Title
Data_Array_Name
Data_Array_Format
Data_Array_Length
Function
Legal Values
Up to 15 alphanumeric
Provide name for Data Array
characters
Provide data format. Each FLOAT, BIT, UInt16, SInt16,
Data Array can only take on Packed_Bit, Byte,
one format.
Packed_Byte, Swapped_Byte
Number of Data Objects. Must
be larger than the data
storage area required by the 1-10,000
map descriptors for the data
being placed in this array.
Example
// Data Arrays
Data_Arrays
Data_Array_Name,
DA_AI_01,
DA_AO_01,
DA_DI_01,
DA_DO_01,
Data_Array_Format,
UInt16,
UInt16,
Bit,
Bit,
Data_Array_Length
200
200
200
200
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
4.2.
Page 7 of 21
Client Side Connection Descriptors
Section Title
Connections
Column Title
Port
Function
Specify which port the device is
connected to the FieldServer
Baud*
Specify baud rate
Parity*
Data_Bits*
Stop_Bits*
Specify parity
Specify data bits
Specify stop bits
Protocol
Specify protocol used
Handshaking* Handshaking is not supported
Poll Delay*
Time between internal polls
Legal Values
P1-P8, R1-R22
110 – 115200, standard baud
rates only. 9600
Even, Odd, None
7, 8
1 (Vendor limitation)
Modbus RTU
Modbus _RTU
Modbus ASCII
MB_ASCII
None
0-32000s, 0.05s
Example
Change protocol to MB_ASCII to use Modbus ASCII protocol
//
Client Side Connections
Connections
Port, Baud,
P8,
9600,
Parity,
None,
Data_Bits,
8,
Stop_Bits,
1,
Protocol,
Modbus _RTU,
Handshaking,
None,
Poll_Delay
0.100s
2
Not all ports shown are necessarily supported by the hardware. Consult the appropriate Instruction
manual for details of the ports available on specific hardware.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
4.3.
Page 8 of 21
Client Side Node Descriptors
Section Title
Nodes
Column Title
Function
Legal Values
Up to 32 alphanumeric
characters
Node_Name
Provide name for Node
Node_ID
Modbus station address of physical
Server Node
1-255
Specify protocol used
Modbus RTU
Modbus_RTU
Modbus ASCII
MB_ASCII
Protocol
Port
Node_Type3
Address_Type4
Specify which port the device is
P1-P8, R1-R22
connected to the FieldServer
Set to Block_Mode if Remote Server
Node (RSN) only supports Write
Block_Mode
Multiple – FC16 & FC15, and does
not support FC05 or FC06
ADU,PDU, -, Modicon_5digit
Specify Register Mapping Model
Example:
Change protocol to MB_ASCII to use Modbus ASCII protocol
// Client Side Nodes
// For devices where 65536 addresses are available in each memory area.
Nodes
Node_Name,
Node_ID,
Protocol,
Port
Modbus device 1,
1,
Modbus_RTU,
P8
Modbus device 2,
2,
Modbus_RTU,
P8
// For devices where only 9999 registers are available in each memory area.
Nodes
Node_Name,
Node_ID,
Protocol,
Port
Modbus device 3,
3,
Modbus_RTU,
P8
Address_Type
ADU
PDU
3
If this parameter is not specified the default function codes will be FC 05 (Single_Coil) and FC 06
(Single_Register). Refer to Appendix A.3 for more information.
4
Optional for Modicon 5 digit devices
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
4.4.
Client Side Map Descriptors
4.4.1.
FieldServer Related Map Descriptor Parameters
Column Title
Function
Map_Descriptor_Name
Name of this Map Descriptor
Data_Array_Name
Name of Data Array where data
is to be stored in the FieldServer
Data_Array_Offset
Starting location in Data Array
Function
Function of Client Map Descriptor
4.4.2.
Node_Name
Data_Type
Function
Name of Node to
fetch data from
Specify
area
5
memory
Starting address of
read block
Address
Length
Data_Array_Low_Scale*
Data_Array_High_Scale*
Node_Low_Scale*
Node_High_Scale*
4.4.3.
Legal Values
Up to 32 alphanumeric
characters
One of the Data Array names
from “Data Array” section above
0 to maximum specified in “Data
Array” section above
RDBC, WRBC, WRBX
Driver Related Map Descriptor Parameters
Column Title
Length
of
Map
Descriptor
Scaling zero in
Data Array
Scaling max in Data
Array
Scaling zero in
Connected Node
Scaling max in
Connected Node
Legal Values
One of the Node names specified in “Client
Node Descriptor” above
Address_Type = ADU
Coil,
Discrete_Input,
Input_Register,
Holding_Register,
Single_Coil,
Single_Register
Address_Type = PDU
FC01, FC02, FC03, FC04,
FC05, FC06, FC15, FC16
Address_Type = Modicon_5digit
- (Dash), Single_Register, Single_Coil
Address_Type = ADU
1-65536
Address_Type = PDU
0-65535
Address_Type = Modicon_5digit
40001, 30001, etc
1-125 (For Analog polls),
1-800 (For Binary polls).
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 0
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 100
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 0
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 100
Timing Parameters
Column Title
Scan_Interval*
5
Page 9 of 21
Function
Rate at which data is polled
Legal Values
0-32000, 1
Optional only for Modicon_5digit addressing, and only if Single writes do not need to be forced
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Map Descriptor Examples.
Function,
RDBC,
RDBC,
RDBC,
RDBC,
// For Nodes where Address_Type is Modicon_5digit.
Map_Descriptors
Map_Descriptor_Name,
Data_Array_Name,
Data_Array_Offset,
CMD_AI_03,
DA_AI_03,
0,
CMD_AO_03,
DA_AO_03,
0,
CMD_DI_03,
DA_DI_03,
0,
CMD_DO_03,
DA_DO_03,
0,
Node_Name,
MODBUS DEVICE3,
MODBUS DEVICE3,
MODBUS DEVICE3,
MODBUS DEVICE3,
Node_Name,
MODBUS DEVICE2,
MODBUS DEVICE2,
MODBUS DEVICE2,
MODBUS DEVICE2,
Node_Name,
MODBUS DEVICE1,
MODBUS DEVICE1,
MODBUS DEVICE1,
MODBUS DEVICE1,
Data_Type,
FC04,
FC03,
FC02,
FC01,
Data_Type,
Input_Register,
Holding_Register,
Discrete_Input,
Coil,
Page 10 of 21
Address,
30001,
40001,
10001,
00001,
Address,
0,
0,
0,
0
Address,
1,
1,
1,
1,
Length,
20,
20,
20,
20,
Length,
20,
20,
20,
20,
Length,
20,
20,
20,
20,
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Function,
RDBC,
RDBC,
RDBC,
RDBC,
Data_Array_Offset,
0,
0,
0,
0,
// For Nodes where Address_Type is PDU
Map_Descriptors
Map_Descriptor_Name,
Data_Array_Name,
CMD_AI_02,
DA_AI_02,
CMD_AO_02,
DA_AO_02,
CMD_DI_02,
DA_DI_02,
CMD_DO_02,
DA_DO_02,
Function,
RDBC,
RDBC,
RDBC,
RDBC,
Data_Array_Offset,
0,
0,
0,
0,
// For Nodes where Address_Type is ADU
Map_Descriptors
Map_Descriptor_Name,
Data_Array_Name,
CMD_AI_01,
DA_AI_01,
CMD_AO_01,
DA_AO_01,
CMD_DI_01,
DA_DI_01,
CMD_DO_01,
DA_DO_01,
// Client Side Map Descriptors
// Note: All three examples below are addressing the same Modbus registers.
4.4.4.
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Scan_Interval
1.000s
1.000s
1.000s
1.000s
Scan_Interval
1.000s
1.000s
1.000s
1.000s
Scan_Interval
1.000s
1.000s
1.000s
1.000s
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
5.
Page 11 of 21
Configuring the FieldServer as a Modbus RTU or Modbus ASCII Server
For a detailed discussion on FieldServer configuration, please refer to the FieldServer
Configuration Manual. The information that follows describes how to expand upon the factory
defaults provided in the configuration files included with the FieldServer (See “.csv” sample files
provided with the FieldServer).
This section documents and describes the parameters necessary for configuring the FieldServer
to communicate with a Modbus RTU or Modbus ASCII Client.
The configuration file tells the FieldServer about its interfaces, and the routing of data required.
In order to enable the FieldServer for Modbus RTU or Modbus ASCII communications, the
driver independent FieldServer buffers need to be declared in the “Data Arrays” section, the
FieldServer virtual Node(s) needs to be declared in the “Server Side Nodes” section, and the
data to be provided to the clients needs to be mapped in the “Server Side Map Descriptors”
section. Details on how to do this can be found below.
Note that in the tables, * indicates an optional parameter, with the bold legal value being the
default.
5.1.
Server Side Connection Descriptors
Section Title
Connections
Column Title
Port
Function
Specify which port the device is connected
to the FieldServer
Baud*
Specify baud rate
Parity*
Data_Bits*
Stop_Bits*
Specify parity
Specify data bits
Specify stop bits
Protocol
Specify protocol used
Legal Values
P1-P8, R1-R26
110 – 115200, standard baud
rates only
Even, Odd, None
7, 8
1 (Vendor limitation)
Modbus RTU
Modbus_RTU
Modbus ASCII
MB_ASCII
None
Handshaking* Handshaking is not supported.
Example
Change protocol to MB_ASCII to use Modbus ASCII protocol
// Server Side Connections
Connections
Port,
P1,
Baud,
9600,
Parity,
None,
Data_Bits,
8,
Stop_Bits,
1,
Protocol,
Modbus_RTU,
Handshaking
None
6
Not all ports shown are necessarily supported by the hardware. Consult the appropriate Instruction
manual for details of the ports available on specific hardware.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
5.2.
Page 12 of 21
Server Side Node Descriptors
Section Title
Nodes
Column Title
Node_Name
Node_ID
Protocol
Address_Type7
Function
Provide name for Node
Node ID of physical Server Node
Specify protocol used
Specify Register Mapping Model
Legal Values
Up to 32 alphanumeric characters
1 – 255
Modbus RTU
ADU,PDU, -, Modicon_5digit
Example
Change protocol to MB_ASCII to use Modbus ASCII protocol
// Server Side Nodes
// For devices where 65536 addresses are available in each memory area.
Nodes
Node_Name,
Node_ID,
Protocol
MB_Srv_11,
11,
Modbus_RTU
MB_Srv_12,
12,
Modbus_RTU
// For devices where only 9999 registers are available in each memory area.
Nodes
MB_Srv_13,
13,
Modbus_RTU
MB_Srv_14,
14,
Modbus_RTU
7
Address_Type
ADU
PDU
Modicon_5digit
-
Optional for Modicon 5 digit devices
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
5.3.
Server Side Map Descriptors
5.3.1.
FieldServer Specific Map Descriptor Parameters
Column Title
Function
Map_Descriptor_Name
Name of this Map Descriptor
Data_Array_Name
Name of Data Array where data
is to be stored in the FieldServer
Data_Array_Offset
Starting location in Data Array
Function
Function
Descriptor
5.3.2.
Node_Name
Data_Type
of
Server
Map
Legal Values
Up
to
32
alphanumeric
characters
One of the Data Array names
from “Data Array” section above
0 to maximum specified in “Data
Array” section above
Server
Driver Specific Map Descriptor Parameters
Column Title
8
Length
Address
Data_Array_Low_Scale*
Data_Array_High_Scale*
Node_Low_Scale*
Node_High_Scale*
Node_Offline_Response
8
Page 13 of 21
Function
Name of Node to fetch
data from
Specify memory area
Length of Map
Descriptor
Starting address
read block
Legal Values
One of the Node names specified in
“Client Node Descriptor” above
Address_Type = ADU
Coil, Discrete_Input, Input_Register,
Holding_Register,
Single_Coil,
Single_Register
Address_Type = PDU
FC01, FC02, FC03, FC04,
FC05, FC06, FC15, FC16
Address_Type = Modicon_5digit
- (Dash), Single_Register, Single_Coil
1-10000.
of
Scaling zero in Data
Array
Scaling max in Data
Array
Scaling zero in
Connected Node
Scaling max in
Connected Node
Set the FieldServer
response to the
Modbus RTU Client
when the Server Node
supplying the data has
gone offline
Address_Type = ADU
1-65536
Address_Type = PDU
0-65535
Address_Type = Modicon_5digit
40001, 30001, etc
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 0
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 100
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 0
Any signed 32 bit integer in the range:
-2,147,483,648 to 2,147,483,647. 100
No_Response,
Old_Data,
Zero_Data,
FFFF_Data,
Refer to Appendix A.6 for further
information.
Optional only for Modicon_5digit addressing, and only if Single writes do not need to be forced
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Data_Array_Offset,
0,
0,
Address,
1,
1,
Length,
200,
200,
Data_Array_Low_Scale,
0,
0,
Data_Array_High_Scale
100,
100,
Data_Array_High_Scale
100,
100,
Node_Low_Scale
0,
0,
Node_Low_Scale
0,
0,
Node_Low_Scale
0,
0,
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Data_Array_High_Scale
100,
100,
Data_Array_Low_Scale,
0,
0,
Page 14 of 21
Data_Array_Low_Scale,
0,
0,
Length,
200,
200,
Length,
200,
200,
Address,
0,
0,
Address,
30001,
40001,
Data_type
FC04
FC03
Data_type
Input_Register
Holding_Register
Node_name,
MBP_Srv_13,
MBP_Srv_13,
Node_name,
MB_Srv_12
MB_srv_12
Function,
Server,
Server,
Function
Server,
Server,
Function
Server,
Server,
// For Nodes where Address_Type is Modicon_5digit.
Map_Descriptors
Map_Descriptor_Name,
Data_Array_Name,
Data_Array_Offset,
SMD_AI_01,
DA_AI_01,
0,
SMD_AO_01,
DA_AO_01,
0,
// Server Side Map Descriptors where Node Address_Type is PDU
Map_Descriptors
Map_Descriptor_Name
Data_Array_Name
Data_Array_Offset,
SMD_AI_02,
DA_AI_02,
0,
SMD_AO_02,
DA_AO_02,
0,
// For Nodes where Address_Type is ADU
Map_Descriptors
Map_Descriptor_Name
Data_Array_Name
SMD_AI_01,
DA_AI_01,
SMD_AO_01,
DA_AO_01,
Node_name,
MB_Srv_11
MB_srv_11
Map Descriptor Examples
// Server Side Map Descriptors where Node Address_Type is ADU
// Note: All three examples below are addressing the same Modbus registers.
5.3.3.
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Node_High_Scale
10000
10000
Node_High_Scale
10000
10000
Node_High_Scale
10000
10000
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 15 of 21
Appendix A. Advanced Topics – Modbus RTU
Appendix A.1. Data Types
If Node parameter Address_Type is set as ADU or PDU, then Data_Type must be specified
as follows
For Address_Type ADU :
Address range
1 - 65536
1 – 65536
1 – 65536
1 - 65536
Data_Type
Coil
Discrete_Input
Input_Register
Holding_Register
Function Code (Write)
15
n/a.
n/a.
16
Function Code (Read)
1
2
4
3
For Address_Type PDU :
Address range
0 - 65535
0 – 65535
0 – 65535
0 – 65535
Data_Type
FC01
FC02
FC04
FC03
Function Code (Write)
15
n/a.
n/a.
16
Function Code (Read)
1
2
4
3
For Address_Type Modicon_5digit
When a Modbus address range is specified, a particular Data Type is implied. The defaults
are as follows:
Address range
40001 - 49999
30001 - 39999
10001 - 19999
00001 - 09999
Data_Type
Register
Analog _Input
Digital_Input
Coil
Function Code (Write)
16
n/a.
n/a.
15
Function Code (Read)
3
4
2
1
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 16 of 21
Appendix A.2. Single Writes
For pure write operations where the function = WRBC or WRBX, the driver defaults to using
Function Codes 15 and 16 (Multiple writes). It is possible to force the driver to use Function
Codes 5 and 6 (Single Writes) by manipulating the Data_Type parameter as follows:
For Address_Type ADU:
Address range
1 - 65536
1 - 65536
Data_Type
Single_Coil
Single_Register l
Function Code (Write)
5
6
For Address_Type PDU:
Address range
0 - 65535
0 - 65535
Data_Type
FC05
FC06
Function Code (Write)
5
6
For Address_Type Modicon_5digit
Address range
40001 - 49999
30001 - 39999
Data_Type
Single_Register
Single_Coil
Function Code (Write)
6
5.
Example: FC 6 = Write Single Register
Add a parameter to the Modbus client side Map Descriptor called Data_Type.
If you specify the Data_Type as Single_Register and the Function as WRBC or WRBX,
then a Modbus poll with FC 6 will be generated.
Logically Single Register implies a length of one, and even if you try to set the length longer
in the csv file, the length is limited to 1 in the driver.
Appendix A.3. Read/write Operation
When using the driver as a Modbus master, the function RDBC allows read/write capability
with Register and Coil data types. If defaults are used, then Function codes 5 and 6 (Single
Writes) are used to write data back to the registers being read, regardless of data length
being read. If multiple writes (FC 15 and 16) are needed for Read/write operation, the user
needs to specify the Node_Type parameter in the Client Side Nodes Section and set it to
Block_Mode.
Note that block writes of length 1 are currently all that is supported.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Page 17 of 21
Data_Array_Name,
DA_AI_01,
DA_AO_01,
Data_Array_Offset,
0,
0,
Function,
Server,
Server,
Node_Name,
MBP_Srv_11,
MBP_Srv_11,
Address,
30001,
40001,
Length,
200,
200,
Data_Array_Low_Scale,
0,
0,
Data_Array_High_Scale,
100,
100,
Node_Low_Scale,
0,
0,
Node_High_Scale,
10000
10000
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
This example multiplies the values in the data array by 100 (10000 on Node_High_Scale is 100X larger than 100 on
Data_Array_High_Scale). This is most commonly used when the user wants to introduce values after the decimal point. For
example, a value of 75.6 will be sent as 7560, which can then be rescaled by the Modbus master.
Map_Descriptors
Map_Descriptor_Name,
SMD_AI1,
SMD_AO1,
Example :
Transferring non-integer values with one register
It is possible to represent values higher than 32767 using one register in one of two ways:
• Declare data arrays as type Uint16 (Unsigned integer). This will give you a range from 0 to 65535.
• Use the scaling function on the FieldServer, which will allow you to set up any range, with 16 bit resolution.
The following example shows how scaling can be achieved on the Server side of the configuration. Note that scaling can also be
done on the Client side to scale down a value that was scaled up by a Modbus vendor. Further information regarding scaling can be
found in the FieldServer Configuration manual.
Modbus as a standard does not support floating point formats. Many vendors have written higher level communications software to
use two 16 bit registers to represent floating point or 32 bit integers. This requires conversion software on both ends of the
communication channel. The FieldServer supports this function and also provides other options to resolve this issue.
Appendix A.4. Managing Floating points with Modbus
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 18 of 21
Transferring 32 bit values with two registers
If a Modbus Server sends two consecutive registers to the FieldServer representing either a
floating point value or a 32 bit integer value, the FieldServer can combine and decode these
registers back into their original format. To do this, the user must read the registers into an
integer data array, and then use the Moves function to move the data to a floating point or
32 bit integer data array. The “function” field in the move must be populated with the correct
move function required. Details of the available function fields are listed in the FieldServer
configuration manual along with a more detailed explanation of moves. Note that functions
also exist to split a floating point value into two integers using the reverse operation.
A diagrammatic representation of this process is depicted below:
Source Data
Array
Modbus
Device
Two 16 bit
integers
polled:
e.g:
40001,
length 2
Together, they
combine
to
form a 32 bit
IEEE Floating
point number.
Modbus
Poll
------------------------Offset 0: 40001
------------------------Offset 1: 40002
-------------------------
Special
Move
Float Data Array
------------------------Offset 40: Float value
-------------------------
Unreadable
content
Sensible data
The example below shows how a floating point value is retrieved from two Modbus registers
that were placed in an integer data array.
Example
Data_Arrays
Data_Array_Name, Data_Format, Data_Array_Length
DA1,
int16,
20
DA2,
float,
10
Moves
Function,
2.i16-1.float-sw,
Source_Data_Array,
DA1,
Source_Offset,
0,
Target_Data_Array,
DA2,
Target_Offset
6
This Move will cause two integers at offsets 0 and 1 in the integer Data Array DA1 to be
copied to offset 6 in the float Data Array DA2. In the process of copying the values, the
integers will be combined and treated as an IEEE 32 bit floating point number.
Appendix A.5. Connection to York Modbus Microgateway
If connecting the FieldServer to a York Modbus Microgateway, the Node_ID of the
Microgateway is defined by the address DIP switches. If switch 4 is set to ‘On’ and the other
switches are set to ‘off’ then Node_ID of the Microgateway is ‘247’, the parity is ‘Even’, and
the stop bits are 1. Other Node_ID combinations can be found in the York Modbus
Microgateway Installation Manual.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 19 of 21
Appendix A.6. Node_Offline_Response
This function is specific to the Modbus RTU driver.
In systems where data is being collected from multiple Server Nodes and made available on
a FieldServer configured as a Modbus RTU Server, when a Server Node goes offline the
default behavior of the FieldServer would be to stop responding to polls for this data. This
might not be what the user wants. Various options exist making it possible to signal that the
data quality has gone bad without creating error conditions in systems sensitive to the
default option.
The following
options
can be configured under the Node parameter,
Node_Offline_Response, to set the response of the FieldServer to the Modbus RTU Client
when the Server Node supplying the data is offline:
•
•
•
•
No_Response - this is the default option. The FieldServer simply does not respond when
the corresponding Server Node is offline.
Old_Data - The FieldServer will respond, but with the last known value of the data. This
maintains the communication link in an active state, but may hide the fact that the Server
Node is offline.
Zero_Data - The FieldServer will respond, but with the data values set to zero. If the
user normally expects non-zero values, this option will signal the offline condition without
disrupting communications.
FFFF_Data - The FieldServer will respond, but with the data values set to FFFF (hex). If
the user normally expects other values, this option will signal the offline condition without
disrupting communications.
Example:
Nodes
Node_name,
DEV11,
DEV12,
DEV15,
DEV16,
Node_ID,
11,
12,
15,
16,
Protocol,
Modbus_rtu,
Modbus_rtu,
Modbus_rtu,
Modbus_rtu,
Node_Offline_Response,
No_Response,
Old_Data,
Zero_Data,
FFFF_Data,
port
-
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 20 of 21
Appendix B. Modbus ASCII - Examples of FieldServer setup for typical clients
Appendix B.1. FieldServer with GE Cimplicity as client
•
•
•
•
•
•
•
•
•
•
•
•
•
Run the Cimplicity “Workbench” and create a “New Project” with a unique “Project
Name” option of “Basic Control” and protocol “Modbus ASCII”.
Check the project properties and continue with the “Project Wizard Setup” that appears.
Add Modbus port giving it a description.
Create and configure the devices, select “new item”.
Name the device, select the port, give it a description (e.g. FieldServer), and choose
“SYSTEM” resource.
Create and configure the points.
Select “new item”, name the point and choose the appropriate device.
Under the “General” tab, point properties require a description. Note that the elements
must have a value greater than 8.
Under the “Device” tab, properties need the appropriate address (e.g. 40001 and also
require the leading 0’s), change the update criteria to “On Scan”.
When the project is configured, run by pressing the “play” button.
Expect the Cimplicity driver to connect and poll the FieldServer for a range of valid
addresses, and then proceed to poll for just the configured Points.
From the start menu choose the “Point Control Panel”, select edit and add the project
you want to view. Note, to log on the User name “ADMINISTRATOR” must be supplied
Use “Modbus ASCII Diagnostics” to connect to host and then read the register.
Appendix B.2. FieldServer with Intellution FIX as a client
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Install Intellution FIX, choosing the MB1 Modbus ASCII I/O driver
Run from Start menu and choose “Intellution Fix”.
Choose “System Configuration Utility”.
Modify SCADA, add the MB1 Modbus ASCII I/O driver
Configure the Modbus ASCII Driver.
Device is D11, select 5-digit address, add the FieldServer virtual Node ID to station
address
Set up poll record
SAVE the configuration.
Open “StaRTUp”
Open “Mission Control” from the “Apps” menu and confirm Fix is polling.
To display the data create a link in Fix draw, add link, data link.
Give it a tagname, allow data entry, numeric entry and set enable option.
If tag is not in database, select “Add”, choose “AR”. Then set output enable , device
MB1, I/O address d11.
Save the settings
Use “Quickview” from the “View” menu to confirm the reading of data without ???
appearing
Change the value and wait a few seconds to ensure the change really occurred.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
FS-8700-01_Modbus_RTU_(T28700-01) Driver Manual
Page 21 of 21
THIS PAGE INTENTIONALLY LEFT BLANK
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web:www.FieldServer.com
Tel: (408) 262-2299 Fax: (408) 262-2269 Toll_Free: 888-509-1970 email: support@FieldServer.com
Download PDF

advertising