0% found this document useful (0 votes)
92 views16 pages

FS 8704 03 - ModbusTCP

The document provides information about configuring and using the FS-8704-03 ModbusTCP driver. It describes the driver functionality, hardware connections, data mapping, and configuration of the FieldServer as both a Modbus TCP client and server.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views16 pages

FS 8704 03 - ModbusTCP

The document provides information about configuring and using the FS-8704-03 ModbusTCP driver. It describes the driver functionality, hardware connections, data mapping, and configuration of the FieldServer as both a Modbus TCP client and server.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

A Sierra Monitor Company

Driver Manual
(Supplement to the FieldServer Instruction Manual)

FS-8704-03 ModbusTCP

APPLICABILITY & EFFECTIVITY

Effective for all systems manufactured after January 2010

Driver Version: 1.01


Document Revision: 8
FS-8704-03 Modbus TCP Driver Manual Table of Contents

TABLE OF CONTENTS

1 Modbus/TCP Description ......................................................................................................................... 3


2 Driver Scope of Supply ............................................................................................................................. 3
2.1 Supplied by FieldServer Technologies for this Driver ...................................................................................... 3
rd
2.2 Provided by Supplier of 3 Party Equipment ................................................................................................... 3

3 Hardware Connections ............................................................................................................................. 4


4 Data Array Parameters ............................................................................................................................. 5

5 Configuring the FieldServer as a Modbus/TCP Client.................................................................................. 6


5.1 Client Side Connection Parameters .................................................................................................................. 6
5.2 Client Side Node Parameters ............................................................................................................................ 6
5.3 Client Side Map Descriptor Parameters ........................................................................................................... 7
5.3.1 FieldServer Related Map Descriptor Parameters ........................................................................................ 7
5.3.2 Driver Related Map Descriptor Parameters................................................................................................. 8
5.3.3 Timing Parameters ........................................................................................................................................ 8
5.3.4 Map Descriptor Example............................................................................................................................... 9

6 Configuring the FieldServer as a Modbus/TCP Server................................................................................ 10


6.1 Server Side Connection Parameters ............................................................................................................... 10
6.2 Server Side Node Parameters ......................................................................................................................... 11
6.3 Server Side Map Descriptor Parameters ........................................................................................................ 11
6.3.1 FieldServer Specific Map Descriptor Parameters ...................................................................................... 11
6.3.2 Driver Specific Map Descriptor Parameters ............................................................................................... 12
6.3.3 Map Descriptor Examples ........................................................................................................................... 13

Appendix A. Useful Features ........................................................................................................................... 14


Appendix A.1. Node_Offline_Response ....................................................................................................................... 14

Appendix B. Reference ................................................................................................................................... 15


Appendix B.1. Data Types .............................................................................................................................................. 15
Appendix B.1.1. For Address_Type ADU : ............................................................................................................. 15
Appendix B.1.2. For Address_Type PDU :.............................................................................................................. 15
Appendix B.1.3. For Address_Type Modicon_5digit ............................................................................................ 15
Appendix B.2. Single Writes .......................................................................................................................................... 15
Appendix B.2.1. For Address_Type ADU: .............................................................................................................. 15
Appendix B.2.2. For Address_Type PDU: .............................................................................................................. 16
Appendix B.2.3. For Address_Type Modicon_5digit ............................................................................................ 16
Appendix B.2.4. Example: FC 6 = Write Single Register ...................................................................................... 16
Appendix B.3. Read/write Operation ........................................................................................................................... 16
Appendix B.4. Driver Error Messages ........................................................................................................................... 16

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-8704-03 Modbus TCP Driver Manual Page 3 of 16

1 MODBUS/TCP DESCRIPTI ON

The Modbus TCP Driver allow the FieldServer to transfer data to and from devices over either RS-232 or RS-485
using Modbus TCP Protocol. The Modbus TCP driver uses port 502. 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, 3xxxx or 4xxxx format. A
maximum of 9999 registers can be mapped of each type. This is FieldServer driver’s default format.

 ADU –Application Data Unit address. Use this format where addresses of each type are defined in the
range 1-65536

 PDU –Protocol Data unit address. Use this format where addresses of each type are defined in the range
0-65535.
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.

2 DRIVER SCOPE OF SUPPL Y

2.1 Supplied by FieldServer Technologies for this Driver

FieldServer Technologies PART # Description


1
FS-8915-10 UTP cable (7 foot) for RS-232 use

2.2 Provided by Supplier of 3 r d Party Equipment

Part # Description
2
Modbus/TCP Server, e.g. Quantum PLC
Modbus/TCP Host Node, e.g. Intellution Fix, Wondereware Intouch, GE Cimplicity, Quantum PLC
3
(Master).

1
This cable is necessary for connection to the driver. It is shipped with the FieldServer and not separately with the driver.
2
If FieldServer used as Modbus/TCP Client.
3
If FieldServer used as Modbus/TCP Server

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-8704-03 Modbus TCP Driver Manual Page 4 of 16

3 HARDWARE CONNECTIONS

Configure the PLC according to manufacturer’s instructions.

PLC

Ethernet Interface
SITE FS-8915-10
ETHERNET

FS-8915-10

(408)-262-2299

FIELDSERVER
MODBUS TCP
CONNECTION DIAGRAM

BASE NAME: DATE: 6/29/04


FILE NAME: BY: MC

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-8704-03 Modbus TCP Driver Manual Page 5 of 16

4 DATA ARRAY PARAMETERS

Data Arrays are “protocol neutral” data buffers for storage of data to be passed between protocols. It is necessary
to declare the data format of each of the Data Arrays to facilitate correct storage of the relevant data.

Section Title
Data_Arrays
Column Title Function Legal Values

Up to 15 alphanumeric
Data_Array_Name Provide name for Data Array
characters

UINT 16, UINT 32, SINT 16,


Provide data format. Each Data Array can only take on
Data_Array_Format SINT 32, BIT, FLOAT,
one format.
Packed_Bit

Number of Data Objects. Must be larger than the data


Data_Array_Length storage area required by the Map Descriptors for the data 1 – 255
being placed in this array.

Example

// Data Arrays
Data_Arrays
Data_Array_Name , Data_Array_Format , Data_Array_Length
DA_AI_01 , Float , 200
DA_AO_01 , Float , 200
DA_DI_01 , Bit , 200
DA_DO_01 , Bit , 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-8704-03 Modbus TCP Driver Manual Page 6 of 16

5 CONFIGURING THE FIEL DSERVER AS A MO DBUS/TCP 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 TCP Server.

The configuration file tells the FieldServer about its interfaces, and the routing of data required. In order to enable
the FieldServer for Modbus TCP 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 * indicates an optional parameter, with the bold legal value being the default.

5.1 Client S ide Connection Parameters

Section Title
Connections
Column Title Function Legal Values
Adapter Specify which adapter this protocol uses N1
Protocol Specify protocol used Modbus/TCP
Poll Delay* Time interval between polls 0-32000 s, 0.05 s.

Example:

// Client Side Connections

Connections
Adapter , Protocol , Poll_Delay
N1 , Modbus/TCP , 0.05s

5.2 Client S ide Node P arameters

Section Title
Nodes
Column Title Function Legal Values
Up to 32 alphanumeric
Node_Name Provide name for Node
characters
Node_ID Station Address of Remote Server Node 1 – 255
Protocol Specify protocol used Modbus/TCP
Adapter Specify which adapter this protocol uses N1
Valid IP address, e.g.
IP_address IP address of client PLC
192.168.1.13

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-8704-03 Modbus TCP Driver Manual Page 7 of 16

4 Set to Block_Mode if Remote Server Node (RSN) only supports Write


Node_Type Block_Mode
Multiple – FC16 & FC15, and does not support FC05 or FC06
5 ADU,PDU, -,
Address_Type Specify Register Mapping Model
Modicon_5digit

Example For new devices where


65536 registers could be
// Client Side Nodes available in each memory
Nodes area
Node_Name , Node_ID , Protocol , Adapter , Address_Type , IP_Address
Modbus device 1 , 1 , Modbus/TCP , N1 , ADU , 192.168.1.172
Modbus device 2 , 2 , Modbus/TCP , N1 , PDU , 192.168.1.172

// Client Side Nodes For devices where only


9999 registers could be
Nodes
available in each memory
Node_Name , Node_ID , Protocol , Adapter area
Modbus device 3 , 3 , Modbus/TCP , N1

5.3 Client S ide Map Descriptor Parameters

5.3.1 FieldServer Related Map Descriptor Parameters


Column Title Function Legal Values
Map_Descriptor_Name Name of this Map Descriptor Up to 32 alphanumeric characters
Dame of Data Array where data is to be One of the Data Array names from
Data_Array_Name
stored in the FieldServer Section 4
0 to (Data_Array_Length -1) as specified
Data_Array_Offset Starting location in Data Array
in Section 4
Function Function of Client Map Descriptor Rdbc, Wrbc, Wrbx, Passive

4 If this parameter is not specified the default function codes will be FC 05 (Single_Coil) and FC 06 (Single_Register). Refer to Error! Reference
source not found. for more information.
5 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-8704-03 Modbus TCP Driver Manual Page 8 of 16

5.3.2 Driver Related Map Descriptor Parameters


Column Title Function Legal Values
Name of Node to fetch
Node_Name One of the Node names specified in Section 5.2
data from
Address_Type = ADU
Coil, Discrete_Input, Input_Register, Holding_Register,
Single_Coil, Single_Register
6 Address_Type = PDU
Data_Type Specify memory area
FC01, FC02, FC03, FC04,
FC05, FC06, FC15, FC16
Address_Type = Modicon_5digit
- (Dash), Single_Register, Single_Coil
Address_Type = ADU
1-65536
Starting address of read Address_Type = PDU
Address
block 0-65535
Address_Type = Modicon_5digit
40001, 30001, etc
Length in items to record
Length 1 – 125 (depending on type)
from PLC
Any signed 32 bit integer in the range:
Data_Array_Low_Scale* Scaling zero in Data Array
-2,147,483,648 to 2,147,483,647. 0
Any signed 32 bit integer in the range:
Data_Array_High_Scale* Scaling max in Data Array
-2,147,483,648 to 2,147,483,647. 100
Scaling zero in Connected Any signed 32 bit integer in the range:
Node_Low_Scale*
Node -2,147,483,648 to 2,147,483,647. 0
Scaling max in Connected Any signed 32 bit integer in the range:
Node_High_Scale*
Node -2,147,483,648 to 2,147,483,647. 100

5.3.3 Timing Parameters


Column Title Function Legal Values
Scan_Interval* Seconds per Scan 0-32000, 20

6
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
FS-8704-03 Modbus TCP Driver Manual Page 9 of 16

5.3.4 Map Descriptor Example.


// Client Side Map Descriptors
// Note: All three examples below are addressing the same Modbus registers.

// For Nodes where Address_Type is ADU


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Data_Type , Address , Length , Scan_Interval
CMD_AI_01 , DA_AI_01 ,0 , Rdbc , MODBUS DEVICE1 , Input_Register ,1 , 20 , 1.000s
CMD_AO_01 , DA_AO_01 ,0 , Rdbc , MODBUS DEVICE1 , Holding_Register ,1 , 20 , 1.000s
CMD_DI_01 , DA_DI_01 ,0 , Rdbc , MODBUS DEVICE1 , Discrete_Input ,1 , 20 , 1.000s
CMD_DO_01 , DA_DO_01 ,0 , Rdbc , MODBUS DEVICE1 , Coil ,1 , 20 , 1.000s

// For Nodes where Address_Type is PDU


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Data_Type , Address , Length , Scan_Interval
CMD_AI_02 , DA_AI_02 ,0 , Rdbc , MODBUS DEVICE2 , FC04 ,0 , 20 , 1.000s
CMD_AO_02 , DA_AO_02 ,0 , Rdbc , MODBUS DEVICE2 , FC03 ,0 , 20 , 1.000s
CMD_DI_02 , DA_DI_02 ,0 , Rdbc , MODBUS DEVICE2 , FC02 ,0 , 20 , 1.000s
CMD_DO_02 , DA_DO_02 ,0 , Rdbc , MODBUS DEVICE2 , FC01 ,0 , 20 , 1.000s

// For Nodes where Address_Type is Modicon_5digit.


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Address , Length , Scan_Interval
CMD_AI_03 , DA_AI_03 ,0 , Rdbc , MODBUS DEVICE3 , 30001 , 20 , 1.000s
CMD_AO_03 , DA_AO_03 ,0 , Rdbc , MODBUS DEVICE3 , 40001 , 20 , 1.000s
CMD_DI_03 , DA_DI_03 ,0 , Rdbc , MODBUS DEVICE3 , 10001 , 20 , 1.000s
CMD_DO_03 , DA_DO_03 ,0 , Rdbc , MODBUS DEVICE3 , 00001 , 20 , 1.000s

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-8704-03 Modbus TCP Driver Manual Page 10 of 16

6 CONFIGURING THE FIEL DSERVER AS A MO DBUS/TCP 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 TCP Client.

The configuration file tells the FieldServer about its interfaces, and the routing of data required. In order to enable
the FieldServer for Modbus TCP 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.

6.1 Server Side Connection Parameters

Section Title
Connections
Column Title Function Legal Values
Adapter Specify which adapter this protocol uses. N1
Protocol Specify protocol used Modbus/TCP

Example:

// Server Side Connections

Connections
Adapter , Protocol
N1 , Modbus/TCP

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-8704-03 Modbus TCP Driver Manual Page 11 of 16

6.2 Server Side Node Parameters

Section Title
Nodes
Column Title Function Legal Values
Up to 32 alphanumeric
Node_Name Provide name for node
characters
Node_ID Node ID of physical server node 1 – 255 (Optional)
Protocol Specify protocol used Modbus/TCP
7 ADU,PDU, -,
Address_Type* Specify Register Mapping Model
Modicon_5digit
No_Response,
Set the FieldServer response to the Modbus TCP Client Old_Data,
Node_Offline_Response when the Server Node supplying the data has gone Zero_Data,
offline FFFF_Data,
Refer to Appendix A.1

Note that for this protocol, the IP address for the FieldServer is configured using the "I" menu option on the
Remote User Interface.

Example

// Server Side Nodes


// For devices where 65536 addresses are available in each memory area.
Nodes
Node_Name , Node_ID , Protocol , Address_Type
MB_Srv_11 , 11 , Modbus/TCP , ADU
MB_Srv_12 , 12 , Modbus/TCP , PDU
// For devices where only 9999 registers are available in each memory area.
Nodes
MB_Srv_13 , 13 , Modbus/TCP , Modicon_5digit
MB_Srv_14 , 14 , Modbus/TCP ,-

6.3 Server Side Map Descriptor Parameters

6.3.1 FieldServer Specific Map Descriptor Parameters


Column Title Function Legal Values
Map_Descriptor_Name Name of this Map Descriptor Up to 32 alphanumeric characters
Dame of Data Array where data is to be One of the Data Array names from
Data_Array_Name
stored in the FieldServer Section 4.
0 to (Data_Array_Length 1-1) as
Data_Array_Offset Starting location in Data Array
specified in Section 4.
Function Function of Client Map Descriptor Passive

7
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-8704-03 Modbus TCP Driver Manual Page 12 of 16

6.3.2 Driver Specific Map Descriptor P aram eters


Column Title Function Legal Values
Name of Node this Map One of the node names specified in “Node_Name”
Node_Name
description is associated with above
Address_Type = ADU
Coil, Discrete_Input, Input_Register,
Holding_Register, Single_Coil, Single_Register
8 Address_Type = PDU
Data_Type Specify memory area
FC01, FC02, FC03, FC04,
FC05, FC06, FC15, FC16
Address_Type = Modicon_5digit
- (Dash), Single_Register, Single_Coil
Address_Type = ADU
1-65535
Address_Type = PDU
Length Length of Map Descriptor
1-65535
Address_Type = Modicon_5digit
1-9999
Address_Type = ADU
1-65536
Address_Type = PDU
Address Starting address of read block
0-65535
Address_Type = Modicon_5digit
40001, 30001, etc
Any signed 32 bit integer in the range: -
Data_Array_Low_Scale* Scaling zero in Data Array
2,147,483,648 to 2,147,483,647, 0
Any signed 32 bit integer in the range:
Data_Array_High_Scale* Scaling max in Data Array
-2,147,483,648 to 2,147,483,647, 100
Any signed 32 bit integer in the range: -
Node_Low_Scale* Scaling zero in Connected Node
2,147,483,648 to 2,147,483,647, 0
Any signed 32 bit integer in the range: -
Node_High_Scale* Scaling max in Connected Node
2,147,483,648 to 2,147,483,647, 100

8
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
FS-8704-03 Modbus TCP Driver Manual Page 13 of 16

6.3.3 Map Descriptor Examples


All three examples below are addressing the same Modbus registers.

// Server Side Map Descriptors where Node Address_Type is ADU


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Data_Type , Address , Length , Data_Array_Low_Scale , Data_Array_High_Scale , Node_Low_Scale , Node_High_Scale
SMD_AI_01 , DA_AI_01 ,0 , Passive , MB_Srv_11 , Input_Register , 1 , 200 ,0 , 100 ,0 , 10000
SMD_AO_01 , DA_AO_01 ,0 , Passive , MB_srv_11 , Holding_Register , 1 , 200 ,0 , 100 ,0 , 10000

// Server Side Map Descriptors where Node Address_Type is PDU


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Data_Type , Address , Length , Data_Array_Low_Scale , Data_Array_High_Scale , Node_Low_Scale , Node_High_Scale
SMD_AI_02 , DA_AI_02 ,0 , Passive , MB_Srv_12 , FC04 ,0 , 200 ,0 , 100 ,0 , 10000
SMD_AO_02 , DA_AO_02 ,0 , Passive , MB_srv_12 , FC03 ,0 , 200 ,0 , 100 ,0 , 10000

// For Nodes where Address_Type is Modicon_5digit.


Map_Descriptors
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Address , Length , Data_Array_Low_Scale , Data_Array_High_Scale , Node_Low_Scale , Node_High_Scale
SMD_AI_01 , DA_AI_01 ,0 , Passive , MBP_Srv_13 , 30001 , 200 ,0 , 100 ,0 , 10000
SMD_AO_01 , DA_AO_01 ,0 , Passive , MBP_Srv_13 , 40001 , 200 ,0 , 100 ,0 , 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
FS-8704-03 Modbus TCP Driver Manual Page 14 of 16

Appendix A. Useful Features

Appendix A.1. Node_Offline_Response

In systems where data is being collected from multiple Server Nodes and made available on a FieldServer
configured as a Modbus TCP 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 TCP 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.
When configured as a Server this parameter can force a desired exception response as follows:

 Node_Offline_Message or Exception_4 - FieldServer's response will be Exception 4

 Gateway_Path_Unavailable or Exception_A - FieldServer's response will be Exception A

 Gateway_Device_Failed or Exception_B - FieldServer's response will be Exception B


Example:

Nodes
Node_Name ,Node_ID ,Protocol , Node_Offline_Response , Port
DEV11 , 11 , Modbus/TCP , No_Response ,-
DEV12 , 12 , Modbus/TCP , Old_Data ,-
DEV15 , 15 , Modbus/TCP , Zero_Data ,-
DEV16 , 16 , Modbus/TCP , FFFF_Data ,-
DEV17 , 17 , Modbus/TCP , Exception_4. ,-
DEV18 , 18 , Modbus/TCP , Gateway_Path_Unavailable ,-

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-8704-03 Modbus TCP Driver Manual Page 15 of 16

Appendix B. Reference

Appendix B.1. Data Types

If Node parameter Address_Type is set as ADU or PDU, then Data_Type must be specified as follows

Appendix B.1.1. For Address_Type ADU :

Address range Data_Type Function Code (Write) Function Code (Read)


1 - 65536 Coil 15 1
1 – 65536 Discrete_Input n/a. 2
1 – 65536 Input_Register n/a. 4
1 - 65536 Holding_Register 16 3

Appendix B.1.2. For Address_Type PDU :

Address range Data_Type Function Code (Write) Function Code (Read)


0 - 65535 FC01 15 1
0 – 65535 FC02 n/a. 2
0 – 65535 FC04 n/a. 4
0 – 65535 FC03 16 3

Appendix B.1.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 Data_Type Function Code (Write) Function Code (Read)


40001 - 49999 Register 16 3
30001 - 39999 Analog_Input n/a. 4
10001 - 19999 Digital_Input n/a. 2
00001 - 09999 Coil 15 1

Appendix B.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). To force the driver to use Function Codes 5 and 6 (Single Writes), manipulate the Data_Type
parameter as follows:

Appendix B.2.1. For Address_Type ADU:

Address range Data_Type Function Code (Write)


1 - 65536 Single_Coil 5
1 - 65536 Single_Register l 6

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-8704-03 Modbus TCP Driver Manual Page 16 of 16

Appendix B.2.2. For Address_Type PDU:

Address range Data_Type Function Code (Write)


0 - 65535 FC05 5
0 - 65535 FC06 6

Appendix B.2.3. For Address_Type Modicon_5digit

Address range Data_Type Function Code (Write)


40001 - 49999 Single_Register 6
30001 - 39999 Single_Coil 5

Appendix B.2.4. Example: FC 6 = Write Single Regi ster

Add a parameter to the Modbus client side Map Descriptor called Data_Type.

If Data_Type is specified as Single_Register and Function as Wrbc or Wrbx, then a Modbus poll with FC 6 will be
generated.

Logically Single Register implies a length of 1, thus the length is limited to 1 in the driver.

Appendix B.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. To enavle If multiple writes (FC 15 and 16) it is
necessary to specify the Node_Type parameter in the Client Side Nodes Section and set it to Block_Mode. Block
writes of length 1 are currently all that is supported.

Appendix B.4. Driver Error Messages

Message Description/Action
MB_TCP:#01 FYI. Server This message is printed when the TCP frame contains more bytes than a single
response extra bytes Modbus_TCP message but insufficient extra bytes to form a second complete Modbus
ignored. Cnt=%d %#x message. There is no explanation for the 'padding' bytes, but since the Driver ignores
MB_TCP:#02 FYI. the extra bytes and processes the complete message correctly, the message can be
Master poll extra bytes ignored. The driver prints this message once. It is suppressed on subsequent
ignored. Cnt=%d %#x occurrences.
The driver has detected enough bytes in the TCP frame for two complete Modbus_TCP
MB_TCP:#03 Err. TCP
messages. The second message is ignored. If this is a problem, re-configure the
Frame has multiple
remote node so that only one Modbus_TCP message is contained in a single TCP
MB_TCP messages.
frame. The driver prints this message once. It is suppressed on subsequent
Ignored 2nd
occurrences

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

You might also like