b0700bg - S FDSI Driver - Modbus (Serial and TCPIP) (Includes One Spreadsheet)
b0700bg - S FDSI Driver - Modbus (Serial and TCPIP) (Includes One Spreadsheet)
*B0700BG*,*S*
B0700BG, Rev S
May 2020
https://www.se.com
Legal Information
The Schneider Electric brand and any trademarks of Schneider Electric SE and its subsidiaries referred to in this guide
are the property of Schneider Electric SE or its subsidiaries. All other brands may be trademarks of their respective
owners.
This guide and its content are protected under applicable copyright laws and furnished for informational use only. No
part of this guide may be reproduced or transmitted in any form or by any means (electronic, mechanical,
photocopying, recording, or otherwise), for any purpose, without the prior written permission of Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the guide or its content, except for a non-
exclusive and personal license to consult it on an "as is" basis. Schneider Electric products and equipment should be
installed, operated, serviced, and maintained only by qualified personnel.
As standards, specifications, and designs change from time to time, information contained in this guide may be subject
to change without notice.
To the extent permitted by applicable law, no responsibility or liability is assumed by Schneider Electric and its
subsidiaries for any errors or omissions in the informational content of this material or consequences arising out of or
resulting from the use of the information contained herein.
Contents
Figures................................................................................................................................... vii
Tables..................................................................................................................................... ix
Preface................................................................................................................................. xiii
Revision Information ............................................................................................................. xiii
Schneider Electric Products Mentioned in this Document ..................................................... xiv
Workstation Types ................................................................................................................. xiv
Related Documents ................................................................................................................ xiv
Foxboro DCS Documents ................................................................................................. xiv
Modbus Protocol Documents ............................................................................................ xv
Global Customer Support ....................................................................................................... xv
We Welcome Your Comments ................................................................................................ xv
2. Introduction ...................................................................................................................... 1
Example Configurations ............................................................................................................ 2
Simplex (Non-Redundant) Configurations .......................................................................... 2
Redundant Configurations ................................................................................................... 3
iii
B0700BG – Rev S Contents
iv
Contents B0700BG – Rev S
Timestamping ......................................................................................................................... 57
Cyclic Group Write/Read (Function Code 23) ....................................................................... 57
7. Modbus Protocol............................................................................................................. 67
Modbus Protocol Options ....................................................................................................... 67
Modbus Function Codes Supported .............................................................................. 67
Modbus Protocol Operation ................................................................................................... 68
Modbus Exception Codes ....................................................................................................... 74
8. Troubleshooting.............................................................................................................. 77
Serial Communications (FBM230/231) .................................................................................. 78
Port Parameters and Configuration .................................................................................... 79
Device Communication Status and Error Counters For FBM 230/231 .............................. 79
Port Counters ................................................................................................................ 81
Device Counters ............................................................................................................ 84
Ethernet Communications (FBM232/233) ............................................................................. 90
Device Communication Status and Error Counters For FBM 232/233 .............................. 90
Good Messages Sent ...................................................................................................... 91
Good Messages Received ............................................................................................... 91
Reset Counters .............................................................................................................. 91
Response Timeout Counter ........................................................................................... 91
Modbus Error Returns ............................................................................................................ 92
Timestamp Diagnostics ........................................................................................................... 92
FDSI Time Synchronization .............................................................................................. 92
Bad Timestamp Points ....................................................................................................... 93
v
B0700BG – Rev S Contents
vi
Figures
2-1. Non-Redundant Configuration Example, Serial (FBM230) .......................................... 2
2-2. Non-Redundant Configuration Example, Ethernet (FBM232) ..................................... 2
2-3. Non-Redundant FBM232 Configuration for MEB ....................................................... 3
2-4. Redundant Configuration Example, Serial (FBM231) .................................................. 3
2-5. Redundant Configuration Example, Ethernet (FBM233) ............................................. 4
2-6. Redundant FDSI 233s Configuration with External Interlink ....................................... 4
2-7. Redundant FDSI 233s Configuration with Single Ported Devices ................................. 5
2-8. Redundant FBM 233 Configuration for MEB .............................................................. 5
4-1. Typical Sequence for Installing and Configuring the Foxboro DCS
System with FDSI ....................................................................................................... 11
4-2. Control Database Configuration for Use with the Modbus Master Driver
on an FBM232 and an FCP280, FCP270, or ZCP270 ............................................... 19
5-1. Phasing Example ......................................................................................................... 55
vii
B0700BG – Rev S Figures
viii
Tables
2-1. Modbus Function Codes ............................................................................................... 1
4-1. Baud Rate/Response Timeout Values .......................................................................... 14
4-2. Parameter Definitions for ECB200 ............................................................................. 20
4-3. PORTEX Values ......................................................................................................... 20
4-4. Parameter Definitions for ECB202 ............................................................................. 21
4-5. Parameter Definitions for ECB201 ............................................................................. 22
4-6. Example Resolution of Device Options ....................................................................... 24
5-1. Data Types and Memory Allocation for Modbus Devices ........................................... 40
5-2. DCI Blocks, Modbus Register Addresses, and Function Codes
with 5-Digit Addressing .............................................................................................. 41
5-3. DCI Blocks, Modbus Register Addresses, and Function Codes
with 6-Digit Addressing .............................................................................................. 42
5-4. Byte Swapping Options for Data Types U2, U4, S2, S4, F4 and F8 ........................... 44
5-5. Bit Swapping Options for Coils Data Type ................................................................. 48
5-6. Data Types for DCI Input/Output Blocks .................................................................. 49
5-7. Specifying “Write-Only” for DCI Output Blocks ....................................................... 53
5-8. Specifying “Immediate Read-Back” for DCI Output Blocks ....................................... 54
5-9. Control Core Services Actions to Recover DCI Blocks Marked as
“Invalid Point Address” ............................................................................................... 56
5-10. Control Software Actions to Recover DCI Blocks
Marked as “Invalid Point Address” .............................................................................. 56
6-1. SMDH ECB201 Display on FBM230/232 (Non-Redundant) ................................... 61
6-2. SMDH ECB201 Display on FBM231/233 (Redundant) ............................................ 61
7-1. Supported Modbus Function Codes ........................................................................... 67
ix
B0700BG – Rev S Tables
x
Safety Information
Important Information
Read these instructions carefully and look at the equipment to
become familiar with the device before trying to install, operate,
service, or maintain it. The following special messages may appear
throughout this manual or on the equipment to warn of potential
hazards or to call attention to information that clarifies or simplifies
a procedure.
DANGER
DANGER indicates a hazardous situation which, if not avoided, will
result in death or serious injury.
WARNING
WARNING indicates a hazardous situation which, if not avoided, could
result in death or serious injury.
CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could
result in minor or moderate injury.
NOTICE
NOTICE is used to address practices not related to physical injury.
Please Note
Electrical equipment should be installed, operated, serviced, and
maintained only by qualified personnel. No responsibility is assumed by
Schneider Electric for any consequences arising out of the use of this
material.
A qualified person is one who has skills and knowledge related to the
construction, installation, and operation of electrical equipment and has
received safety training to recognize and avoid the hazards involved.
Preface
The EcoStruxure™ Foxboro™ DCS Field Device System Integrator Modules (FDSI) Modbus®
Master driver is specifically designed to enable the integration of third-party devices that support
Modbus communication protocols into a Foxboro DCS system. You can download the Modbus
Master driver into FDSI FBM230, FBM231, FBM232, and FBM233, thus enabling the system
to translate and use vendor-defined functions of a broad range of Modbus compliant devices.
The Modbus protocol, originally a proprietary messaging specification by Gould-Modicon, has
evolved into a globally accepted open standard for communication between field devices. The
Modbus protocol specifies the master-slave/query-response message structure that controllers can
recognize and use.
Modbus is a master/slave protocol. The Modbus master driver causes the system to act as the
master, sending messages to a Modbus device acting as a slave. When the FDSI receives responses
from the messages it sends to the Modbus devices, it processes them and updates the appropriate
I/O points in the CP.
This document is intended for the use of process control engineers and operators, instrument and
maintenance engineers and other qualified and authorized personnel involved in setting up,
configuring and maintaining Foxboro DCS and I/A Series® equipment to provide Modbus
Master communications capability.
Basic information not covered in this document is covered in detail in the Field Device System
Integrators (FBM230/231/232/233) User’s Guide (B0700AH). You should be generally familiar
with the Foxboro DCS and I/A Series system, and with the Standard and Compact 200 Series
Subsystem User’s Guide (B0400FA). Detailed information relating to the various software and
hardware elements is found in the reference documents listed below.
You should also be generally aware of serial and TCP/IP communication.
Revision Information
For this revision of this document (B0700BG, Rev. S), the following changes were made:
Global
Updated with EcoStruxure terminology.
Chapter 4 “Configuration and Download Instructions”
In “Creating/Modifying a Port Configuration File for FBM230/231” on page 13,
indicated in the valid user names that each entry is not limited to three options.
Updated “Configuring the DVOPTS Parameter for FBM230/231” on page 24 and
“Configuring the DVOPTS Parameter for FBM232/233” on page 25.
Chapter 5 “Principles of Operation”
Added reference to “Timestamping” on page 57.
Chapter 6 “Detected Error Handling”
Added reference to “Modbus Write and Response Errors” on page 61.
xiii
B0700BG – Rev S Preface
Workstation Types
Be aware of the various types of workstations and their definitions as indicated below.
Term Definition
Foxboro DCS Any workstation installed with a Foxboro DCS software component,
workstation including Control Core Services, Control Software, Wonderware
Historian, I/A Series software, FCS or any combination of thereof.
Control Core Services Any Foxboro DCS workstation installed with Control Core Services or
workstation I/A Series software. This workstation is connected to the Foxboro DCS
control network.
non-Control Core Any Foxboro DCS workstation that does not have Control Core Services
Services workstation or I/A Series software installed. This type of workstation is not connected
to the Foxboro DCS control network, but can have Control Software
installed on it.
Control Software Any Foxboro DCS workstation installed with Control Software
workstation components, including Control Editors, Control HMI, Wonderware
Historian, or other components installed as part of Control Software. This
workstation may or may not also be a Control Core Services workstation.
Related Documents
The following documents provide additional and related information:
xiv
Preface B0700BG – Rev S
xv
B0700BG – Rev S Preface
xvi
1. Before You Begin
Software
The Modbus Master driver is delivered on a single CD-ROM accompanied by this user guide.
The driver is downloaded to the FBM230/231/232/233 from the file called Modbus.ziph, and
provides these FBMs with the capability to read and write Modbus device data points.
Sizing Spreadsheet
The sizing spreadsheet, FDSI_sizing_Modbus.xlsm, is provided as a guidance for configuring and
loading the FDSI within the limits of the communication interface. For more information, follow
the instructions in Appendix A “FDSI Sizing Spreadsheet Instructions” on page 95.
FDSI Configurator
The FDSI Configurator is delivered on a single CD-ROM (separate from the driver CD-ROM)
and is installed on a PC running the Windows® 7 and Windows XP® operating system. The
FDSI Configurator is responsible for creating the port configuration files and device
configuration files that are used by the Modbus FBM downloadable driver.
1. This product is known as InFusion through v2.5, or FCS v3.0-v4.x or the Control Software v5.0 or
later.
1
B0700BG – Rev S 1. Before You Begin
Hardware
The delivered driver supports the following Schneider Electric and Modbus hardware. See Field
Device System Integrators (FBM230/231/232/233) User’s Guide (B0700AH) for detailed
installation instructions.
Modbus Hardware
Serial Hardware via Modbus RTU and Modbus ASCII
Ethernet Hardware via ModbusTCP
Modbus Plus to Ethernet bridge (such as, Schneider Electric’s 174 CEV 200 40) to
communicate to Modbus Plus devices.
2
2. Introduction
The Modbus Master driver for Foreign Device System Integrators can configure an FBM230,
FBM231, FBM232, or FBM233 to interface with Modbus devices.
Devices that can successfully communicate with FDSI Modbus Master FBMs are those that
support some subset of the Modbus Function codes listed in Table 2-1.
You can install and configure the Modbus Master driver on a FBM230/231/232/233. The driver
communicates with Modbus controllers as follows:
Serially, via Modbus RTU and Modbus ASCII
Ethernet TCP/IP via Modbus TCP.
It also communicates to the Serial Modbus Plus devices through a Modbus Plus to Ethernet
Bridge (MEB). The MEB functions as a message router between the FBM232/233 and devices on
the Modbus Plus network.
The Modbus Master driver is contained in the file Modbus.ziph, which runs on any of the
appropriate FBMs (230-233). The FDSI driver is responsible for receiving the Modbus device’s
point values as well as sending Foxboro® point values.
Code Function
01 Read Coil Status
02 Read Input Status
03 Read Holding Registers
04 Read Input Registers
05 Force Single Coil
06 Preset Single Register
081 Loopback Diagnostic Test
15 Force Multiple Coils
16 Preset Multiple Registers
232 Read Write Multiple Registers
1. Supported for data diagnostic code only
2.
Only used for optional Cyclic Write
configurations on page 57
1
B0700BG – Rev S 2. Introduction
Example Configurations
Simplex (Non-Redundant) Configurations
FBM230
Termination Assembly
RS-422
RS-485
2-Wire
RS-232
Device
Device 1
Device
Device 16
FBM232
Switch/Hub
Device 1 Device 64
2
2. Introduction B0700BG – Rev S
FBM232
Switch/Hub
Redundant Configurations
FBM231 FBM231
(Main) (Backup)
RS-232 RS-232
Device
Device 1
RS-485 RS-485
Device 16
Note: Each device in this diagram needs two RS232 ports or two RS485 ports.
3
B0700BG – Rev S 2. Introduction
FBM233 FBM233
(Main) (Backup)
Switch/Hub Switch/Hub
Device 1
Device 64
FBM233 FBM233
(Main) (Backup)
Switch/Hub Switch/Hub
Dual-Ported
Device 1
Dual-Ported
Device 2
4
2. Introduction B0700BG – Rev S
Single Network
FBM233 FBM233
(Main) (Backup)
Switch/Hub
Single-Ported
Device
Figure 2-7. Redundant FDSI 233s Configuration with Single Ported Devices
NOTE
For redundant configuration connected to a single ported device (shown in
Figure 2-7), it is recommended that you configure the redundancy algorithm option
of Device Scans from Master Only (described on page 38). The default redundancy
algorithm may put excessive load on the single-ported device because both Master
and Tracker modules are querying the device.
5
B0700BG – Rev S 2. Introduction
NOTE
The redundant FBM233 configuration for MEB uses only the “Ext_Ilink”
redundancy algorithm.
6
3. Modbus Master Driver
Installation
7
B0700BG – Rev S 3. Modbus Master Driver Installation
8
4. Configuration and Download
Instructions
You can configure the Modbus Master driver and download it to an FDSI FBM.
9
B0700BG – Rev S 4. Configuration and Download Instructions
14. Download the optional device configuration file from SMDH (DB DOWNLOAD).
See the “DB Download” section in the Field Device System Integrators
(FBM230/231/232/233) User’s Guide (B0700AH).
15. Using SMDH, verify that communication to the device is enabled. See
“Enable/Disable Communication to a Device” in Field Device System Integrators
(FBM230/231/232/233) User’s Guide (B0700AH).
16. Create and edit DCI blocks for all device I/O points to be processed. See
“Configuring DCI Blocks for Points” on page 32.
17. Verify slave I/O data using the Block Detail displays. From the FoxSelect
compound/block overview utility, access the Block Detail display for each DCI block
you created and confirm its data. See Process Operations and Displays (B0700BN) for
instructions.
18. Checkpoint the database. For details, see System Management Displays (B0193JC),
I/A Series Configuration Component (IACC) User's Guide (B0700FE), Integrated
Control Configurator (B0193AV), or to “Checkpointing” in System Manager
(B0750AP).
10
4. Configuration and Download Instructions B0700BG – Rev S
This illustration shows the flow diagram indicating the sequence of operation:
Start
Install FBMs 1
and Associated
Create and Edit 7 Create and Edit 13
Foxboro DCS Equipment Create and Edit
an ECB200 for an ECB201 for
ECB202
Each (if required)
FBM230/232 Each Field Device
2 8
Connect Field Create and Edit Download Optional 14
Devices to TA/FBM(s) an ECB202 for Device Configuration
Each FBM231/233 File (.XML)
Install Configurator 3
Place FBMs and 9 Enable 15
and I/O Device Driver Communication with
FCMs (if present)
on Workstation Each Field Device
On-line
Create Port 4
Download I/O 10 Create and Edit 16
Configuration File
Device Drive DCI Blocks for
(.XML)
(Modbus.ziph) Control Strategy
Create Optional 5
Download Port 11 Verify Slave I/O Data 17
Device Configuration
File (.XML) Configuration File Using Block Detail
(.XML) Displays
Create, if required, 6
Enable Port 12 18
an ECB210 for Checkpoint the
on which the Device
FCM Hosting FBMs Database
is Connected
End
Figure 4-1. Typical Sequence for Installing and Configuring the Foxboro DCS System with FDSI
11
B0700BG – Rev S 4. Configuration and Download Instructions
Port Configuration
For FBMs connected to Modbus devices, you must use the FDSI Configurator to create or
modify a port configuration file for the desired FDSI FBM(s). For general instructions on
creating and modifying a new or existing port configuration file using the FDSI Configurator, see
the section titled “Port and Device Configuration Files” in Field Device System Integrators
(FBM230/231/232/233) User’s Guide (B0700AH).
The Modbus Master driver installation process installs seven example XML port configuration
files. The files are described here:
EtherPort.xml – Example of an FBM232 DHCP-enabled Ethernet configuration.
SerPort.xml – Example of an FBM230, 4-port serial configuration. Each port is
configured at 9600 baud, no parity, and 1 stop bit.
RedEther.xml – Example of an FBM233 DHCP-enabled redundant Ethernet
configuration.
RedSerial.xml – Example of an FBM231 redundant 4 port serial configuration. Each
port is configured at 9600 baud, no parity, and 1 stop bit.
No_DHCP.xml – Example of an FBM232 non-DHCP enabled Ethernet
configuration.
Red_Ext_Ilink.xml – Example of a FBM233 Ethernet configuration using External
Interlink redundancy.
NewSerial.xml – Example of a FBM230, 4-port serial configuration using the XML,
DUPS, and TSTAMP options.
The next subsections provide configuration details specific to configuring and modifying a
Modbus Master driver port configuration file. The first subsection describes modifying a port
configuration file for a serial FBM (FBM230/231), and the second describes modifying a port
configuration file for an Ethernet FBM (FBM232/233).
12
4. Configuration and Download Instructions B0700BG – Rev S
13
B0700BG – Rev S 4. Configuration and Download Instructions
Example 1:
MODBUS/ASCII+@20+H+TO=10
This syntax indicates that the Modbus ASCII protocol is required, the scan rate is
two seconds, the heartbeat option is set, and the response timeout value for this
device is 1 second.
Example 2:
MODBUS/RTU+@5+TO=M25
This syntax indicates that the Modbus RTU protocol is required, the scan rate is
500 milliseconds, and the response timeout value for this device is 25 millisec-
onds.
+RT=n configures the number of retries to attempt when a response timeout
occurs, where “n” (0-9) is equal to the number of retries. Default retries (2) will be
considered if “n” value is not in specified range or not configured.
+SC or +MC specifies the Modbus function code for writing to coils when the
device does not support both single and multiple write function codes. “+SC”
specifies that the device supports only function code 05 (Force Single coil) for
writing to coils. “+MC” specifies that the device supports only function code 15
(Force multiple coils) for writing to coils. “+SC” and “+MC” are mutually
exclusive options. If both options are specified (“+SC+MC” or “+MC+SC”) at the
same location (either in Port Configuration file, in DVOPTS parameter of
ECB201, or in device configuration file), the device will be marked as Invalid, if
the device configuration file support is not used at ECB201. If the device
configuration file is used at ECB201, “DB DOWNLOAD FAILED” error
message will be displayed at SMDH. And also a detected error message “Invalid
options +SC+MC specified for device” will be displayed in smon_log.
It is possible to specify the two options in different locations. In this case, the
option specified at the device level will override the option that was specified at
the port level. The option specified in the device configuration file will override
14
4. Configuration and Download Instructions B0700BG – Rev S
NOTE
The above options can also be configured at the device level in DVOPTS parameter
of the ECB201 block. See section “Configuring an ECB201 block” for details.
NOTE
In RS-485 configurations, these configuration settings apply to all devices
connected to the port.
This figure shows the Serial Port FBM General Properties Tab.
15
B0700BG – Rev S 4. Configuration and Download Instructions
This figure shows the Serial Port FBM Advanced Properties Tab. You may select Non-Redundant
FBM230 or Redundant FBM231 operation. When FBM231 is selected, the Redundancy
Algorithm edit box is enabled.
NOTE
The only redundancy algorithm supported for Modbus Serial operation is Default.
This figure shows the Serial Port FBM Custom Properties Tab. FDSI timestamping option can be
enabled by specifying “TSTAMP” in the “Custom Param 1” field. For more information on
timestamping, see “Timestamping” on page 57.
The remaining fields of the Custom Properties tab are not used by the Modbus driver, and they
should be left blank.
16
4. Configuration and Download Instructions B0700BG – Rev S
See the section titled “Port and Device Configuration Files” in Field Device System Integrators
(FBM230/231/232/233) User’s Guide (B0700AH) for detailed procedures to configure FDSI
Ethernet port IP addresses.
The next figure shows the Ethernet Port FBM Advanced Properties Tab with External Interlink
with Redundancy Option and Timestamp Options Configured.
The default string value is “Default” by which redundancy operates in the standard mode.
The algorithm string displayed in the next figure is an example of the special redundancy
algorithm available only on Modbus Ethernet to inhibit the Tracker FBM from scanning the
Modbus device. In the example shown, the Redundancy Algorithm edit box contains the
algorithm string “Ext_Ilink+UR=1000” which enables the operation of the External Interlink
redundancy scheme. For more information, see Chapter 6 “FDSI Module Redundancy” in the
Field Device System Integrators (FBM230/231/232/233) User’s Guide (B0700AH).
17
B0700BG – Rev S 4. Configuration and Download Instructions
FDSI timestamping option can be enabled by specifying “TSTAMP” in the “Custom Param 1”
field shown above. For more information on timestamping, see “Timestamping” on page 57.
The remaining fields of the Custom Properties tab are not used by the Modbus driver, and they
should be left blank.
NOTE
If the configurator is not installed on the host boot workstation hosting the CP to
which the FBM23x is connected, then do the following:
After saving, you must manually copy the file to the usr\fox\sp\files\devices
directory of the host boot workstation.
18
4. Configuration and Download Instructions B0700BG – Rev S
Figure 4-2. Control Database Configuration for Use with the Modbus Master Driver
on an FBM232 and an FCP280, FCP270, or ZCP270
Configuring an ECB200/ECB202
For each FDSI FBM, you must configure an ECB200 or ECB202. For a non-redundant FDSI
FBM, you must configure one ECB200. For each redundant FDSI FBM in a redundant pair, you
must configure an ECB202.
See the section titled “Control Block Configuration Information” in Field Device System
Integrators (FBM230/231/232/233) User’s Guide (B0700AH) for basic instructions to configure an
ECB200.
Perform the following steps in the ECB200/202 to specifically configure Modbus installations:
Set the FILEID parameter to the name of the port configuration file
(<file name>.xml).
Set the SFILID to the driver filename (MODBUS.ZIPH).
Table 4-2 and Table 4-4 describe the required parameter settings for configuration of an ECB200
or ECB202 for use with an FDSI FBM running the Modbus Master driver:
19
B0700BG – Rev S 4. Configuration and Download Instructions
Parameter
Name Setting Description
NAME * Contains the name used by the CP to access this ECB.
TYPE ECB200 Type of the block
DEV_ID FCM10X The DEV_ID parameter is a 6-character identifier of the
FBM, with the last two characters representing the
baseplate positions 00 to 08.
When the FBM is controlled by a ZCP270, the first four
characters of DEV_ID should be the same as the first four
characters of the associated FCM100Et’s DEV_ID. When
the FBM is controlled by an FCP280 or FCP270, the first
four characters can be any characters.
HWTYPE 230/232 FBM230 230 (non-redundant serial)
FBM232 232 (non-redundant Ethernet)
SWTYPE 230/232 Same as HWTYPE
PORTEX * FBM230 The valid range is 1 through 15,
representing the bit mask of the ports
present. See Table 4-3.
FBM232 1
FILEID * Set FILEID to the filename of the port configuration
XML file.
SFILID MODBUS.ZIPH Set the SFILID to the name of the downloadable driver
for Modbus, MODBUS.ZIPH.
CHAN 1, 2, 3, or 4 For FCP280 only, identifies the Primary ECB (ECBP,
ECB11) to which the ECB200 is assigned. See Integrated
Control Block Descriptions (B0193AX).
Table 4-3 provides useful PORTEX parameter values that can be configured for the FBM230 and
FBM231 (serial FBMs) and their meanings. The PORTEX parameter defaults to 0, but the valid
range is 1 to 15. Make sure you set the PORTEX parameter to a value between 1 and 15.
20
4. Configuration and Download Instructions B0700BG – Rev S
Parameter
Name Setting Description
NAME * Contains the name used by the CP to access this ECB.
TYPE ECB202 Type of the block
DEV_ID FCM10X The DEV_ID parameter is a 6-character identifier of the
FBM, with the last two characters representing the
baseplate positions 0A to 0D.
When the FBM is controlled by a ZCP270, the first four
characters of DEV_ID should be the same as the first
four characters of the associated FCM100Et’s DEV_ID.
When the FBM is controlled by an FCP280 or FCP270,
the first four characters can be any characters.
HWTYPE 231/233 FBM231 231 (redundant serial)
FBM233 233 (redundant Ethernet)
SWTYPE 231/233 Same as HWTYPE
PORTEX * FBM231 The valid range is 1 through 15,
representing the bit mask of the ports
present. See Table 4-3 above.
FBM233 1
FILEID * Set FILEID to the filename of the port configuration
XML file.
SFILID MODBUS.ZIPH Set the SFILID to the name of the downloadable driver
for Modbus, MODBUS.ZIPH.
CHAN 1, 2, 3, or 4 For FCP280 only, identifies the Primary ECB (ECBP,
ECB11) to which the ECB200 is assigned. See Integrated
Control Block Descriptions (B0193AX).
Device Configuration
Device configuration for the Modbus Master driver is performed primarily using ECB201 and
DCI blocks. There are a few options that can only be configured through the use of device
configuration files. A XML device configuration file is needed for any of the following:
For devices that have non-contiguous addresses, see “Custom Memory Map” on
page 54.
For setting points at different scan rates and different phases, see “Custom Memory
Map” on page 54.
For device option (DVOPTS) strings that exceed 32 characters, see the figure “Groups
Tab Page - FDSI Configurator” in “Groups Tab Configuration” on page 30.
For defining a cyclic write/read group, see “Cyclic Group Write/Read (Function Code
23)” on page 57.
Once you have configured the ECB201 and DCI blocks (and any optional device configuration
files), the driver builds the required Modbus scan transactions to transfer data.
21
B0700BG – Rev S 4. Configuration and Download Instructions
You can use the IOM_ID parameter to associate a DCI block with a specific device. The DCI
block must have the Compound:block name of the device ECB (ECB201).
Configuring an ECB201
Configure an ECB201 for each Modbus device that needs to be connected. See the section titled
“Control Block Configuration Information” in Field Device System Integrators
(FBM230/231/232/233) User’s Guide (B0700AH) for detailed instructions to configure an
ECB201. Table 4-5 describes the required parameter settings for configuration of an ECB201:
Parameter
Name Setting Description
NAME * The name of the block.
TYPE ECB201 Type of the block.
DEV_ID PLCName The device ID.
HWTYPE 230/231/232/233 Same as parent’s HWTYPE.
SWTYPE 230/231/232/233 Same as parent’s SWTYPE.
PARENT * The name of this device’s parent ECB200 or ECB202, in
<compound_name>:<block_name> format.
DVNAME * FBM230 Modbus Device Address1
FBM231 Modbus Device Address1
FBM232 x.x.x.x
Example: 192.168.1.25
OR
x.x.x.x/n
Example: 192.168.1.25/1
22
4. Configuration and Download Instructions B0700BG – Rev S
Parameter
Name Setting Description
DVNAME * FBM233 x.x.x.x;y.y.y.y
(Cont.) Example: 192.168.1.25;192.168.1.26
OR
x.x.x.x/m;y.y.y.y/b
Example: 192.168.1.25/1;192.168.1.26/2
NOTE
The maximum number of
characters allowed in the
DVNAME parameter is 32. If
the length of the DVNAME
parameter exceeds 32, specify the
Modbus Device Addresses in the
DVOPTS parameter using the
“+MN=xx” and “+BN=xx”
options.
23
B0700BG – Rev S 4. Configuration and Download Instructions
Parameter
Name Setting Description
PORTNO * FBM230/ 1 to 4
231
FBM232/ 1
233
FILEID * The name of the device configuration file. Applicable only
when +XML is specified.
1. A valid range of the Modbus device address in DVNAME should be 1 to 247.
2.
“Device address” in this document is the same as “Unit Identifier” in the Open Modbus/TCP Specifi-
cation document. Refer section “Modbus Protocol Documents” on page xv. The default device
address is 255. Some devices ignore the device address.
NOTE
The driver name “Modbus” must be specified in the port configuration file only.
If any options are specified in both the port configuration file and the DVOPTS parameter, the
values given in the DVOPTS parameter will override those values given in the port configuration
file; for that device.
For example:
For Port 1 the options in port configuration file are:
+@20+TO=10+H=40001+MR+RT=3
For a device under Port 1, the DVOPTS parameter is configured as:
+@10+TO=20+MC
The scan rate for this device is 1 second, the Response timeout is 2 seconds, the Heartbeat point
address is 40001, the function code used to write to coils is 15 (Force Multiple Coils), the
function code used to write to registers is 16 (Force Multiple Registers), and the number of retries
is three. See this table for easy reference.
24
4. Configuration and Download Instructions B0700BG – Rev S
NOTE
If the TSTAMP option is specified in the port configuration file (for serial, see the
figure “Serial Port FBM Custom Properties Tab” in “Creating/Modifying a Port
Configuration File for FBM230/231” on page 13; for Ethernet, see the figure
“Ethernet Port FBM Advanced Properties Tab with External Interlink Redundancy
Option and Timestamp Options Configured” in “Creating/Modifying a Port
Configuration File for FBM232/FBM233” on page 16), all devices will have
timestamp enabled.
+XML indicates that a device configuration XML file is used. When this option is used,
a device configuration XML file is REQUIRED. See “Creating/Modifying a Device
Configuration File” on page 28.
+TO=n – (Where O is the letter “O”) Applies a response timeout value, specified by n,
to this device. The timeout value is in tenths of a second. The default timeout value is
25
B0700BG – Rev S 4. Configuration and Download Instructions
500 ms (1/2 second). If TO=0, the default value is used. Vendor device product
documentation may suggest a proper response time for the device. The FDSI response
timeout period should be set to this time.
+MN=xxx – Specific for the FBM232 or the main module of the FBM233 pair; applies
the Modbus device address for the single FBM232 or the Main FBM233, where xxx
can be a 1 to 3 digit address (1 to 254). If you do not specify a device address, a
default device address of 255 is used.
+BN=xxx – Specific for the backup module of the FBM233 pair; applies the Modbus
device address for the Backup FBM, where xxx can be a 1 to 3 digit address (1 to
254). If you do not specify a device address, a default device address of 255 is used.
NOTE
The “+MN=xx” and the “+BN=xx” options must be specified in the DVOPTS
parameter only, irrespective of whether a device configuration file is used or not.
+TO=Mn (where O is the letter “O”) configures a response timeout value to be used
instead of the default value, where “n” (1 - 999) is equal to the timeout value in
milliseconds. Default time out value (500ms) will be considered if “n” value is not in
the specified range or not configured. This option is used to achieve sub-100ms
durations. Vendor device product documentation may suggest a proper response time
for the device.
+RT=n configures the number of retries to attempt when a response timeout occurs,
where “n” (0-9) is equal to the number of retries. Default retries (2) will be considered
if “n” value is not in the specified range or not configured.
+SC or +MC specifies the Modbus function code for writing to coils when the device
does not support both single and multiple write function codes. “+SC” specifies that
the device supports only function code 05 (Force Single coil) for writing to coils.
“+MC” specifies that the device supports only function code 15 (Force multiple coils)
for writing to coils. “+SC” and “+MC” are mutually exclusive options. If both options
are specified (“+SC+MC” or “+MC+SC”) at the same location (either in Port
Configuration file, in DVOPTS parameter of ECB201, or in device configuration
file), the device will be marked as Invalid, if the device configuration file support is
not used at ECB201. If the device configuration file is used at ECB201, “DB
DOWNLOAD FAILED” error message will be displayed at SMDH. And also an
error message “Invalid options +SC+MC specified for device” will be displayed in
smon_log.
It is possible to specify the two options in different locations. In this case, the option
specified at the device level will override the option that was specified at the port level.
The option specified in the device configuration file will override any option specified
in the DVOPTS parameter of the ECB201 or port configuration file. When neither
“+SC” nor “+MC” options are used, function codes 05 and 15 will be used by the
driver.
+SR or +MR specifies the Modbus function code for writing to registers when the
device does not support both single and multiple-write function codes. “+SR”
specifies that the device supports only function code 06 (Force Single register) for
writing to registers. “+MR” specifies that the device supports only function code 16
(Force multiple registers) for writing to registers. “+SR” and “+MR” are mutually
26
4. Configuration and Download Instructions B0700BG – Rev S
NOTE
The +TP option should be used only in conjunction with "Ext_Ilink" redundancy
algorithm. For more information, see “Optional Redundancy Configuration with
FBM233s with Device Scans from Master FBM Only” on page 38.
NOTE
For Modbus Plus devices through MEB:
1. An ECB201 block should be created for each Modbus Plus device under an
MEB. The IP address of the MEB should be specified in the DVNAME parameter
and the Modbus Plus device node address should be specified using the “/m”
notation in the DVNAME parameter or the “+MN=” (FBM232) or “+MN=” and
“+BN=” (FBM233) options in DVOPTS parameter of the ECB201 block.
2. The options are independently configurable for each Modbus Plus device.
3. The MEB uses the specified Modbus Device Address for routing messages to the
appropriate end device. Each end device must have a corresponding route
configured in the MEB’s routing table. See the MEB's user's guide (Schneider
Electric's Document Model no. 31005104) for instructions on configuring the
routing table.
4. For FBM233, both the FDSI Master and FDSI Backup modules communicate to
the same MEB, therefore the MN and BN values must be identical.
27
B0700BG – Rev S 4. Configuration and Download Instructions
This syntax indicates that the Modbus TCP protocol is used; there is a 1 second scan rate for
queries; the heartbeat option is applied; the Response Timeout setting is 2 seconds; the Master
FBM is connected to device address 5; and the Backup FBM is connected to device address 123.
NOTE
In the example above, the protocol and options require 30 characters in the
DVOPTS parameter. The DVOPTS parameter only allows a maximum number of
32 characters. If the string of options will cause the DVOPTS parameter to exceed
its maximum length, the options must be moved to a device configuration file. For
details on configuring the options in the device configuration file, see the next
section.
NOTE
The fields in the heartbeat section are not used by this driver. The field “Name” is a
user-defined string of characters used to define a unique configuration file. The
field DVNAME is not used, but does require some value.
28
4. Configuration and Download Instructions B0700BG – Rev S
29
B0700BG – Rev S 4. Configuration and Download Instructions
When the device configuration file is used, the required DVOPTS options or the port
configuration file options (for FBM230/231), such as +TO, +H, +DUPS, should be specified in the
Special Parameter 1 field of the “DVOPTS” group as shown in the above figure. See page 13
and page 25 for the list of options that can be used. For the “DVOPTS” group, the Scan Rate
field is not used.
For any device option that appears in multiple places, the order of precedence goes as follows
(highest to lowest):
1. Device Configuration File “DVOPTS” group
2. ECB201 DVOPTS parameter
3. Port Configuration File
30
4. Configuration and Download Instructions B0700BG – Rev S
Other than the “DVOPTS” group, all the other groups are created for the purpose of configuring
a custom memory map, as described in “Custom Memory Map” on page 54 or a cyclic write/read
group, as described in “Cyclic Group Write/Read (Function Code 23)” on page 57. For each
group of addresses, populate the following fields:
Name - Any unique alphanumeric name for the group. For Modbus Function Code
23, you must prefix the name with 'FC23_' (note the underscore at the end of prefix).
Scan Rate - The group's scan rate in milliseconds. (Any value less than 100 results in
using the default scan rate: 500 milliseconds).
Phase - The group's phase can be specified by appending “/n” to the scan rate where
“n” is the phase. The default phase value is zero. See the above figure.
The allowable phase values depend on the configured scan rate (period). The mini-
mum phase value is “0”, and the maximum phase value is:
Max Phase = (Scan Rate in milliseconds/ 100) - 1
If the specified phase value is greater than the Max Phase, the default phase of “0” will
be considered for that group.
Special Parameter 1 - The starting address for the group. For Modbus Function Code
23, configure the start and end addresses of the Input Registers. The address range
must be separated by a hyphen (-).
Special Parameter 2 - The ending address for the group. For Modbus Function Code
23, configure the start and end addresses of the Output Registers. The address range
must be separated by a hyphen (-).
Special Parameter 3 - For Modbus Function Code 23, configure optional Wait Count,
WC=n, where n is integer value with a range of 1-99.
When defining the Device configuration XML file, these rules apply:
1. ANY point address not defined in one of the groups specified WILL be set invalid
(“Invalid Point Address”) upon block creation.
2. If the scan rate specified in the group is set to a value less than 100, the default scan
rate will be utilized. The “@scan rate” DVOPTS specification will apply, if specified.
3. If certain addresses should NOT be scanned together, they should be defined in the
separate groups. A Modbus memory segment may contain multiple groups, even if no
address gaps exist.
4. No point definitions are necessary. Any point definitions specified in the device
configuration file WILL BE IGNORED.
31
B0700BG – Rev S 4. Configuration and Download Instructions
NOTE
If the configurator is not installed on the host boot workstation hosting the CP to
which the FBM23x is connected, then after saving, manually copy the file to the
usr\fox\sp\files\devices directory of the host boot workstation.
32
4. Configuration and Download Instructions B0700BG – Rev S
33
B0700BG – Rev S 4. Configuration and Download Instructions
34
4. Configuration and Download Instructions B0700BG – Rev S
Parameter
Name Setting Description
NAME pointName The name of the point.
TYPE PLSOUT Defines the block as a pulse output block
IOM_ID * The name of the associated ECB201.
CO1_PT, * Address of the pulse input or output.
CO2_PT Example of 5-digit address: 00001.
Example of 6-digit address: 000001.
35
B0700BG – Rev S 4. Configuration and Download Instructions
36
5. Principles of Operation
A Modbus Master driver can interface a Foxboro DCS system to Modbus devices.
After you configure the appropriate DCI blocks and ECBs using a control configurator such as
ICC, make sure that all ECBs are ONLINE and NOT FAILED (white) in SMDH, and enable
device communication from SMDH, the FDSI starts sending “scan” messages to the Modbus
device. The FDSI waits for responses from the device, processes the responses, and updates I/O
points in the control processor (CP). In the case of the FBM232/233 using TCP/IP
communication, the FBM runs as a TCP client and establishes a connection with the server in the
device before sending request messages.
See Chapter 7 “Modbus Protocol” for descriptions of the message format for all messages between
the Modbus device and the FDSI.
In the redundancy case, the FBM231 or 233 each communicate independently with the Modbus
device via their respective communication connection (serial or Ethernet). When the FBM
running as master fails because it loses communication with at least one Modbus device, it checks
the status of the tracker FBM. If the tracker FBM’s status is good, the master FBM requests a role
switch, causing the tracker to become the new master, and the master to become the new tracker.
For additional information on role switching in redundant configurations, see “Failover” on
page 63.
37
B0700BG – Rev S 5. Principles of Operation
3. Once the Soft Download is complete (the FBM is ONLINE - NOT FAILED),
perform a DB Download to install the port configuration XML file.
During this operation, the FBM equipment information page should indicate DCI
NOT READY. When the download completes, the equipment information page
indicates DCI READY, and the FBM changes color on the display. In most instances,
the FBM is yellow because the ECB201s are not active yet.
For more details on SMDH equipment change actions, and equipment information pages, see the
“Maintenance” chapter in Field Device System Integrators (FBM230/231/232/233) User’s Guide
(B0700AH).
38
5. Principles of Operation B0700BG – Rev S
This option is chosen by specifying “EXT_ILINK” for the redundancy algorithm parameter in
the port configuration xml file. For more information, see Chapter 6, “FDSI Module
Redundancy” in Field Device System Integrators (FBM230/231/232/233) User’s Guide (B0700AH).
Modbus Driver
Modbus Master driver operations include the creation of scan query request messages based on
contiguous DCI input block PNT_NO addresses. Up to 124 or 125 registers (16-bit) can be read
in one Modbus message transaction. Driver creates one group for first 124 registers and creates
another group for next 124 registers. In single read command, driver requests maximum of 124
registers if the last point is configured for single register else requests maximum of 125 registers if
the last point is configured for two registers. Output query messages are constructed on a change-
driven basis. The driver selects between Modbus functions 5 and 15 and between 6 and 16 based
on whether it has multiple values to write or only one value to write.
ECB201 Operation
The device ECBs must be ENABLED to communicate. By default, they are disabled when first
created. Use the SMDH Equipment Change display and select the ENABLE COMMUNICATIONS
pick. When the “Enable Communications” action takes place, the Equipment Information
display for the ECB201 indicates DCI READY, and if heartbeats have been configured, those
messages transmit once or twice.
If the +XML option is specified, then the device configuration .xml file has to be downloaded
before enabling communications. The ECB201 will be in DCI NOT READY state. Use the SMDH
Equipment Change display and select the DB DOWNLOAD. After the file is downloaded, the
ECB201 goes to DCI READY state. Then select the ENABLE COMMUNICATIONS option from the
SMDH Equipment Change display.
Assuming that good replies to the heartbeat messages are received from the Modbus device, the
Modbus query messages start and the heartbeats stop. The presence of the query messages
indicates that some DCI input blocks have been configured in the host CP for this device. If
heartbeats have not been configured, a query message is transmitted instead.
These message transactions are transparent to you. When the interface is working correctly, the
ECBs are ONLINE - NOT FAILED (white in SMDH). The associated DCI input blocks go out of
the Out Of Service (OOS) (cyan) state.
NOTE
When the +XML option is specified in the DVOPTS, any modification in the
DVOPTS parameter sets the ECB201 to DCI NOT READY state. To make the
ECB201 DCI READY, the device configuration file has to be downloaded again.
Disable Communications to the device, perform DB DOWNLOAD, and then ENABLE
COMMUNICATIONS. The ECB201 will be set to DCI READY state.
39
B0700BG – Rev S 5. Principles of Operation
Table 5-1. Data Types and Memory Allocation for Modbus Devices
NOTE
The 5x and 6x addresses are used only with the Modbus Function Code 23. See
“Cyclic Group Write/Read (Function Code 23)” on page 57.
If you attempt to configure blocks with addresses outside the valid ranges shown in Table 5-1, the
driver reports the error “invalid point address” in the point depicted in the FoxView™ default
display.
Table 5-2 and Table 5-3 shows the DCI blocks supported, the 5-digit (Table 5-2) and 6-digit
(Table 5-3) Modbus register addresses that could be used for each block type, and the
corresponding function codes used in the protocol. To configure the address, set the PNT_NO
parameter of the DCI block equal to the address in the Modbus device printed range.
40
5. Principles of Operation B0700BG – Rev S
Table 5-2. DCI Blocks, Modbus Register Addresses, and Function Codes
with 5-Digit Addressing
Modbus Device
Printed Address Modbus Protocol
DCI Block Range Address Range Modbus Function Code
BIN/PAKIN 00001-09999 0-9998 1
BIN/PAKIN 10001-19999 0-9998 2
BINR 00001-09999 0-9998 1
BINR 10001-19999 0-9998 2
BOUT/ 00001-09999 0-9998 5 or 15 for write;
PAKOUT/ 1 for read
PLSOUT
IIN 30001-39999 0-9998 4
RIN 30001-39999 0-9998 4
RINR 30001-39999 0-9998 4
PAKIN 30001-39999 0-9998 4
IIN 40001-49999 0-9998 3
IOUT 40001-49999 0-9998 6 or 16 for write;
3 for read
RIN 40001-49999 0-9998 3
RINR 40001-49999 0-9998 3
ROUT 40001-49999 0-9998 16 for write;
3 for read
PAKIN 40001-49999 0-9998 3
PAKOUT 40001-49999 0-9998 6 or 16 for write;
3 for read
IIN 50001-59999 0-9998 23 for read
RIN 50001-59999 0-9998 23 for read
PAKIN 50001-59999 0-9998 23 for read
IOUT 60001-69999 0-9998 23 for write
ROUT 60001-69999 0-9998 23 for write
PAKOUT 60001-69999 0-9998 23 for write
41
B0700BG – Rev S 5. Principles of Operation
Table 5-3. DCI Blocks, Modbus Register Addresses, and Function Codes
with 6-Digit Addressing
Modbus Device
Printed Address Modbus Protocol
DCI Block Range Address Range Modbus Function Code
BIN/PAKIN 000001-065536 0-65535 1
BIN/PAKIN 100001-165536 0-65535 2
BINR 000001-065536 0-65535 1
BINR 100001-165536 0-65535 2
BOUT/ 000001-065536 0-65535 5 or 15 for write;
PAKOUT/ 1 for read
PLSOUT
IIN 300001-365536 0-65535 4
RIN 300001-365536 0-65535 4
RINR 300001-365536 0-65535 4
PAKIN 300001-365536 0-65535 4
IIN 400001-465536 0-65535 3
IOUT 400001-465536 0-65535 6 or 16 for write;
3 for read
RIN 400001-465536 0-65535 3
RINR 400001-465536 0-65535 3
ROUT 400001-465536 0-65535 16 for write;
3 for read
PAKIN 400001-465536 0-65535 3
PAKOUT 400001-465536 0-65535 6 or 16 for write;
3 for read
IIN 500001-565536 0-65535 23 for read
RIN 500001-565536 0-65535 23 for read
PAKIN 500001-565536 0-65535 23 for read
IOUT 600001-665536 0-65535 23 for write
ROUT 600001-665536 0-65535 23 for write
PAKOUT 600001-665536 0-65535 23 for write
42
5. Principles of Operation B0700BG – Rev S
Modbus driver will set to Out of Service (OOS) all blocks that are grouped together if the group
range contains any unrecognized addresses.
The nature of this behavior can result in a large group of DCI blocks displaying OOS when one
of those DCI blocks is configured using an unrecognized address. This behavior can be even more
problematic because a new DCI block configured with an unrecognized address will cause other
DCI blocks in its group to become OOS.
For example, consider a device that only accepts addresses 30001-30010, and it initially has three
DCI blocks configured for addresses 30001, 30002, and 30010. These three blocks will initially
be in a Good state because a read query of addresses 30001-30010 is valid for the device. After
adding a new DCI block configured for address 30011, the read query will be modified to request
addresses 30001-30011. Since the device does not recognize address 30011, it returns an error for
the entire query. The Modbus driver will then set all four of the DCI blocks to OOS.
To prevent the other DCI blocks from being affected, a Device Configuration file with Custom
Memory Maps (for more information on Custom Memory Maps, see “Custom Memory Map” on
page 54) must be configured and used. The Custom Memory Map will allow you to specify the
permitted address range for your specific device. If a new DCI block is configured for an address
outside of the Custom Memory Map range, then that DCI block will be flagged with having an
invalid point address, and the other DCI blocks will not be affected.
43
B0700BG – Rev S 5. Principles of Operation
Byte Swapping Options for Data Types U2, U4, S2, S4, F4 and F8
The supported byte swapping specifications, W1, W2, and W3, are described in this table:
Table 5-4. Byte Swapping Options for Data Types U2, U4, S2, S4, F4 and F8
Specifying W2 or W3 with a 2-byte data type should result in an undefined block with an invalid
data connection error.
Bit Mirroring Option for Data Types U2, U4, S2, S4, F4 and F8
There is a bit mirroring specifier: M1. M1 specifies that bit mirroring will be performed for each
byte individually, for example, [bit 7 | ... | bit 0] is mirrored to [bit 0 | ... | bit 7].
44
5. Principles of Operation B0700BG – Rev S
Register Order\
Endianness Upper Register First Lower Register First
Little Endian W1 W2
Big Endian W3 Default
Also, as in the case of reading a single register, if bytes are transmitted LSB (least significant bit)
first, use the “M1” option in PNT_NO. The default case expects the byte to be transmitted by
the device MSB first.
Example 1: Single-register access with data in Modbus message in big endian format
IIN with PNT_NO 30001:U2
Data in device: 13000 (32C8 hex)
Data in Modbus message in big endian format:
Data Hi 32
Data Lo C8
Default 2-byte format
Data after default processing in FDSI: 32C8
Data in CP: 13000 (32C8 hex)
45
B0700BG – Rev S 5. Principles of Operation
Example 2: Single-register access with data in Modbus message in little endian format
IIN with PNT_NO 30001:U2
Data in device: 13000 (32C8 hex)
Data in Modbus message in little endian format:
Data Hi C8
Data Lo 32
Data after default processing in FDSI: C832
Data in CP: 51250 (C832 hex)
To fix this, use PNT_NO 30001:U2:W1
Data in FDSI after W1 application: 32C8
Data in CP: 13000 (32C8 hex)
Example 3: Single-register access with data in Modbus message in little endian format, and the
LSB (least significant bit) of a byte is sent out first
IIN with PNT_NO 30001:U2
Data in device: 13000 (32C8 hex)
Data in Modbus message:
Data Hi 13
Data Lo 4C
Note that 13 (00010011) is the mirror image of C8 (11001000) and 4C (01001100)
is the mirror image of 32 (00110010).
Data after default processing in FDSI: 134C
Data in CP: 4940 (134C hex)
To fix this, use PNT_NO 30001:U2:W1:M1
Data in FDSI,
After W1: 4C13
After M1 mirroring at the byte level: 32C8 (0001 0011 0001 1100)
Data in CP: 13000 (32C8 hex)
Example 4: Two-register access with lower register followed by upper register, and register
data sent out in big endian format
IIN with PNT_NO 30001:S4
Data in device: 4-byte value 1538732744 (5BB732C8 hex)
Register 30001: 13000 (32C8 hex)
Register 30002: 23479 (5BB7 hex)
Data in Modbus message: Lower register followed by upper register, and register data
sent out in big endian format:
Data Hi (Register 30001) 32
Data Lo (Register 30001) C8
Data Hi (Register 30002) 5B
46
5. Principles of Operation B0700BG – Rev S
Example 5: Two-register access with upper register followed by lower register, and register
data sent out in little endian format
IIN with PNT_NO 30001:S4
Data in device: 4-byte value 1538732744 (5BB732C8 hex)
Register 30001: 13000 (32C8 hex)
Register 30002: 23479 (5BB7 hex)
Data in Modbus message: upper register followed by lower register, and register data
sent out in little endian format.
Data Hi (Register 30002) B7
Data Lo (Register 30002) 5B
Data Hi (Register 30001) C8
Data Lo (Register 30001) 32
Data after default processing in FDSI: C832B75B
Data in CP: -936200357 (C832B75B hex)
To fix this, use IIN with PNT_NO 30001:S4:W1
Data in FDSI after W1: 5BB732C8
Data in CP: 1538732744 (5BB732C8 hex)
Example 6: Two-register access with upper register followed by lower register, and register
data sent out in big endian format
IIN with PNT_NO 30001:S4
Data in device: 4-byte value 1538732744 (5BB732C8 hex)
Register 30001: 13000 (32C8 hex)
Register 30002: 23479 (5BB7 hex)
Data in Modbus message: upper register followed by lower register, and register data
sent out in big endian format.
Data Hi (Register 30002) 5B
Data Lo (Register 30002) B7
Data Hi (Register 30001) 32
Data Lo (Register 30001) C8
Data after default processing in FDSI: 32C85BB7
Data in CP: 851991479 (32C85BB7 hex)
To fix this, use IIN with PNT_NO 30001:S4:W3
Data in FDSI after W3: 5BB732C8
Data in CP: 1538732744 (5BB732C8 hex)
47
B0700BG – Rev S 5. Principles of Operation
Example 7: Two-register access with lower register followed by upper register. Register data
sent out in little endian format, with LSB of a byte sent out first
IIN with PNT_NO 30001:S4
Data in device: 4-byte value 1538732744 (5BB732C8 hex)
Register 30001: 13000 (32C8 hex)
Register 30002: 23479 (5BB7 hex)
Data in Modbus message: lower register followed by upper register. Register data is
sent out in little endian format. Also, LSB of a byte is sent out first.
Data Hi (Register 30001) 13
Data Lo (Register 30001) 4C
Data Hi (Register 30002) ED
Data Lo (Register 30002) DA
Note that 13 is the mirror image of C8, 4C is the mirror image of 32, ED is the
mirror image of B7, and DA is the mirror image of 5B.
Data after default processing in FDSI: EDDA134C
Data in CP: -304475316 (EDDA134C hex)
To fix this, use IIN with PNT_NO 30001:S4:W2:M1
Data in FDSI,
after W2: DAED4C13
after M1 (mirroring at the byte level): 5BB732C8
Data in CP: 1538732744 (5BB732C8 hex).
Example 1: If you specified C13 with R, the first 13 bits of the Modbus 16-bit transfer are
swapped [bit 13 ... bit 1] and put into the first 13 bits of the system software word. All other bits
of the word are zero.
Example 2: If you specified C23 with R, the 16 bits of the first Modbus 16-bit transfer and the
first seven bits of the next Modbus 8-bit transfer are swapped to [bit 23 ... bit 1] and put into the
first 23 bits of the system software word. All other bits of the word are zero.
48
5. Principles of Operation B0700BG – Rev S
Default Data
DCI Block Device Data Type Swapping Options Type
IIN, IOUT S2 or U2 W1 S2
S4 W1, W2, or W3 S2
RIN, RINR, ROUT F4, F8, S4, S2, or W1, W2, or W3 F4
U2
BIN, BINR, BOUT N/A N/A Binary Value
PAKIN Cx R C32
in Coils (0x) and Input (C1 to C32 allowed)
Status (1x)
PAKIN S2 or U2 W1 U4
in Holding (4x) and S4 or U4 W1, W2, or W3 U4
Input (3x) Registers
PAKOUT Cx R C32
in Coils (0x) (C1 to C32 allowed)
PAKOUT S2 or U2 W1 U4
in Holding Registers S4 or U4 W1, W2, or W3 U4
(4x)
The Modbus driver supports three types of swap options. “Swap” here refers to a change in the
byte order in the DCI blocks compared to the byte order in the Modbus device.
The input DCI block default condition (no swapping specified) presents the data in the block as
it normally appears in the Modbus device. The output DCI block default condition (no swapping
specified) presents the data to the Modbus device in the byte arrangement that the device expects.
For PAKIN/PAKOUT blocks in Coils or Input Status, the driver supports bit mirroring
(swapping of all bits so that the least significant bits become the most significant bits).
If the data type is two bytes (16 bits) with U2 or S2, option W1 in Table 5-4 is supported. If the
data type is 4 bytes (32 bits) with U4, S4, or F4, then swap options W1, W2, and W3 are
supported. If the data type is 8 bytes (64 bits) with F8, swap options W1, W2 and W3 are
supported.
See these sections for additional details on byte swapping, mirroring, and bit swapping options:
“Byte Swapping Options for Data Types U2, U4, S2, S4, F4 and F8” on page 44
“Bit Mirroring Option for Data Types U2, U4, S2, S4, F4 and F8” on page 44
“Bit Swapping Options for Coils or Input Status Data Type” on page 48
49
B0700BG – Rev S 5. Principles of Operation
Data Types and ranges for the DCI block data types are:
U2: 2-byte unsigned integer (register). Range is 0 to 65535.
U4: 4-byte unsigned integer (two consecutive registers). Range is 0 to 4294967295
S2: 2-byte signed integer (register). Range is -32768 to +32767
S4: 4-byte signed integer (two consecutive registers). Range is -2147483647 to
+2147483646
F4: 4-byte floating point value (two consecutive registers). IEEE single precision float
F8: 8-byte floating point value (four consecutive registers). IEEE double precision
float.
PAKIN/PAKOUT Blocks
NOTE
In systems with I/A Series software v8.x or Control Core Services software v9.0 or
later, when using the PAKOUT block with the FBM224 or FDSI (FBM230-
FBM233), confirm that all bits and registers in any field device associated with the
PAKOUT block or controller are set exclusively by a single controller. If an
additional source attempts to set bits and registers to the PAKOUT block, they may
be overwritten by the primary controller, if the controller attempts to set bits or
registers in a range that overlaps or encompasses the bits or registers set by the
additional source. If you have values from a separate source which need to be co-
located in a specific order, have the second source bring its values into a separate
register, and then combine this register together with the values to be set in the
primary controller to create a separate word.
50
5. Principles of Operation B0700BG – Rev S
51
B0700BG – Rev S 5. Principles of Operation
NOTE
Since the default heartbeat form requires the use of a configured readable point,
device status cannot be monitored until such a point is configured.
An optional second heartbeat form uses the Modbus Function Code 8 (Diagnostics) message.
The Modbus Function Code 8 heartbeat form is used when the “+H” option is configured. This
option should only be used if the device has Function Code 8 support.
Finally, an optional third heartbeat form is a read command of a user-specified Modbus register.
This heartbeat form is used when the “+H=address” option is configured. This is similar to the
default heartbeat form except that you have control of which Modbus register is used in the read
command. Also, this form does not require a corresponding DCI point to be configured. If the
configured address is an invalid register, the device is marked as Invalid if the device is not using a
device configuration file. If the device configuration file is used at ECB201, “DB DOWNLOAD
FAILED” error message is displayed at SMDH. If the configured address is an invalid register, the
device is marked as failed and the error message “Invalid point address specified in +H= option”
will be displayed in smon_log.
Implementing the heartbeat options is described on page 13 and page 25.
52
5. Principles of Operation B0700BG – Rev S
the value does not exceed the single precision limits. To specify a Modbus register as a type double
precision float, the PNT_NO parameter needs to have ':F8' following the register address.
NOTE
The "+DUPS" (Duplicate Address) option does not apply to the addresses configured
for use with the cyclic write/read groups described in “Cyclic Group Write/Read
(Function Code 23)” on page 57.
Write-Only Points
You can specify that an individual output block is write-only. This specification will instruct the
Modbus Master to prevent scanning the address for reading. This modification is configured in
each output block where write-only is desired. To specify this customization, see this table.
Configuring output blocks as write-only will eliminate the corresponding read-back for those
Modbus addresses. When the number of these write-only output blocks is large, the number of
read messages will be reduced, allowing the Modbus master to spend more time on other tasks
(such as scanning other points, or writing output values) that would have otherwise been delayed.
53
B0700BG – Rev S 5. Principles of Operation
54
5. Principles of Operation B0700BG – Rev S
Address”. Additionally, since those points do not exist, the Modbus driver will NOT query those
addresses. Instead of querying points 400001 through 400125 in a single command (which
would be the normal behavior), this standard driver will query points 400001 through 400050 in
a single command. If you desire the driver to query points 400001 through 400025 in one
command and points 400026 through 400050 in a separate command, create the groups as:
Group “40000x_A” contains registers 400001 through 400025
Group “40000x_B” contains registers 400026 through 400050
Group “40000x_C” contains registers 400100 through 400150
In addition, the Custom Memory Map will allow you to define individual scan rates and phase for
each of these groups. The ability to group points and specify appropriate scan times for the group
also provides the potential for improving communications performance. For example, input
points that do not change very often can be grouped together (via Custom Memory Map
configuration) so they can be scanned together at a reduced frequency. Because these points will
not be scanned as often, the Modbus master will be able to spend more time on other tasks (such
as scanning other points, or writing output values) that would have otherwise been delayed.
The objective of specifying phase to a group is to "spread out" scan messages over a time period.
The time period is the scan rate described above. If there are 3 groups with 3 minutes scan rate,
the scan messages for all the groups are ready to be sent at the same time. By specifying different
phases for the groups the scan messages going out are not bundled for output at the same
moment.
Example: 3 messages are to be sent at a rate of once per three minutes.
1. Period = 1800 ( 3 min * 60 sec/min * 10 phases/sec)
2. The FDSI BPC is 100 milliseconds. There are 10 phases / sec. Phases 0, 600, 1200 are
specified for the three groups respectively.
As shown in Figure 5-1, when the Phase is spread out evenly over the Period, the messages are not
sent out at the same time, but spaced evenly over time. This results in better utilization of the
bandwidth, which corresponds to smaller intervals of “quiet time”, where nothing is happening
on the communication link.
NOTE
Phase values can be specified only through the use of a device configuration file.
The Custom Memory Map is configured in the device configuration file. To specify this
customization, see “Creating/Modifying a Device Configuration File” on page 28.
55
B0700BG – Rev S 5. Principles of Operation
NOTE
When modifying the port configuration file to take advantage of the new Custom
Memory Map feature, you must include the +XML option in the driver column of
the port configuration file, as described in “Creating/Modifying a Port
Configuration File for FBM230/231” on page 13.
When configuring Custom Memory Maps, it is advised that you pre-configure entries for the
entire valid address range for the device. This will minimize the need to later modify the Device
Configuration File (which causes an interruption in device communications) when new points are
added.
Due to invalid group configuration in the device configuration file, if DCI block(s) have been
marked as an “invalid point address”, modifying the Device Configuration file will not be
sufficient to recover the block. In addition to modifying the Device Configuration file, perform
one of the following actions - see Table 5-9 for the actions to take under Control Core Services
and see Table 5-10 for the actions to take under Control Software:
Table 5-9. Control Core Services Actions to Recover DCI Blocks Marked as
“Invalid Point Address”
Action(s) Scope
Make any modifications to the DCI block (or perform Delete/Undelete DCI block
operation).
Delete/undelete device ECB201. Then from System Manager, perform the device Device
DB Download, and finally, enable device communications.
Table 5-10. Control Software Actions to Recover DCI Blocks Marked as “Invalid Point Address”
Action(s) Scope
Undeploy/Deploy the DCI block DCI block
Undeploy/Deploy device ECB201. Then, from System Manager, perform the Device
device DB Download, and finally, enable device communications.
NOTE
If a few DCI blocks under a device are in the “Invalid Point Address” state,
delete/undelete these individual DCI blocks. If many points are in the “Invalid
Point Address” state, delete/undelete each respective device.
Any other actions at the FBM level, such as offline/online, will not recover the
block because “Invalid Point Address” is a non-optimal state for a DCI block and
the CP does not process such a block until it is modified. However, when the device
is deleted, points associated to this device are marked with the state “ECB Does not
exist”, causing the point state to change to recoverable. So when device is added
back, the points under it recover.
56
5. Principles of Operation B0700BG – Rev S
Timestamping
The Modbus Master driver supports the option for the FDSI to timestamp data value changes
when received from the device. By default, the CP timestamps points with CP time when it
detects change in value of the DCI read back value from the FBM. With FDSI timestamping
enabled, the FDSI will pass its recorded timestamp to the CP. Timestamping in the FDSI will
provide increased event time accuracy (especially in cases where the FDSI scan rate is much faster
than the DCI block's period).
An example of the use of timestamps is the logging of the value changes with timestamps in
AIM*Historian or Wonderware Historian.
The option to use FDSI timestamps is configured by either of the following methods:
Specifying “TSTAMP” option in the “Custom Param 1” field of the port
configuration file (for serial, see the “Serial Port FBM Custom Properties Tab” figure
in “Creating/Modifying a Port Configuration File for FBM230/231” on page 13; for
Ethernet, see the “Ethernet Port FBM Advanced Properties Tab with External
Interlink with Redundancy Option and Timestamp Options Configured” figure in
“Creating/Modifying a Port Configuration File for FBM232/FBM233” on page 16).
This will enable the timestamp option for all devices.
Specifying “+TSTAMP” option in the DVOPTS parameter of device's ECB201 block
(see “Configuring the DVOPTS Parameter for FBM230/231” on page 24 and
“Configuring the DVOPTS Parameter for FBM232/233” on page 25). This will
enable timestamp option only for the corresponding device.
The FDSI timestamping option relies upon the FDSI synchronizing its internal clock to that of
the CPs. FDSI time synchronization is only possible for FDSI’s connected to FCP280, FCP270,
or ZCP270 (via the FCM100Et).
NOTE
FDSI connected to ZCP270 via the FCM100E will not synchronize its time with
the CP.
If for some reason the time synchronization between the FDSI and the CP is interrupted, the
FDSI will revert back to the default behavior of letting the CP provide the timestamp. During this
time, the blocks will be set to “ERR/Uncertain” status (green color), and the device's ECB201 will
be set to a warning state along with a SMDH/System Manager message indicating “Timestamp
Error”.
57
B0700BG – Rev S 5. Principles of Operation
NOTE
The Cyclic Group Write/Read (Function Code 23) is only valid for use on Ethernet
FDSI FBM232/233.
NOTE
The "+DUPS" (Duplicate Address) option, described in “Allowing Duplicate
Addresses” on page 53, does not apply to the addresses configured for the cyclic
write/read groups.
NOTE
The “NR” option described in “Write-Only Points” on page 53 and the “IR” option
described in “Immediate Read-Back Points” on page 54 must not be used for blocks
associated with FC23 group.
58
5. Principles of Operation B0700BG – Rev S
To enable proper Function Code 23 behavior, all the addresses in the configured output range
must have corresponding DCI output blocks and the configured input range must have at least
one DCI input block.
Every register in the configured FC23 group output range must be mapped to a DCI output
block. If a register in the specified output range does not have a corresponding DCI output block
configured, the previously configured DCI output blocks will remain in OOS state. While in this
state, the DCI input blocks corresponding to the FC23 group will continue to be scanned with
Read Holding Registers Function Code 03 until the output blocks are set to Good state.
Initially, the FC23 group DCI Output blocks are held in OOS state while the FC23 group DCI
Input blocks are initialized with device values using Read Holding Register Function Code 03.
The FC23 group DCI output blocks are transitioned from OOS to Good state by the driver on
successful completion of two steps. First, after the configured number of read cycles are performed
successfully, the DCI output blocks are temporarily transitioned from OOS to Bad state by the
driver. Next, after a successful write/read has occurred using Function Code 23, the DCI output
blocks are finally transitioned from Bad to Good state by the driver. This sequence is designed to
allow the CP time to process the inputs and perform the user-configured calculations to set the
initial values in the DCI output blocks of the FC23 group prior to writing to the device.
The above sequence is used on occurrence of any of the following conditions:
Initial block creation
Block parameter modifications to any output block in FC23 group
FBM turning Online
ECB201 Device Enable Communications
Communications interruptions/timeout with device
Device exception response
59
B0700BG – Rev S 5. Principles of Operation
60
6. Detected Error Handling
61
B0700BG – Rev S 6. Detected Error Handling
62
6. Detected Error Handling B0700BG – Rev S
When a Modbus gateway exception response is received from the MEB for a message
three times in a row by default OR for the number of retries configured + 1 times in a
row.
Failover
The FBM231/233s each communicate independently with the Modbus device via their respective
connections. When the FBM running as Master fails to communicate with a device, it checks the
status of the Tracker module. If the Tracker is communicating with all devices, the Modbus driver
initiates a “role switch”, where the Master becomes the Tracker and the Tracker becomes the new
Master. If the present Tracker’s device communication error condition clears up, and the new
Master encounters a failure on one of its devices, the Modbus driver initiates a role switch.
When the FBM running as the Master, receives an exception response with the exception code 04
(SLAVE DEVICE FAILURE) from the device, it checks the status of the Tracker module. If the
Tracker is communicating with all devices without exception responses, the Modbus driver
initiates a “role switch”, where the Master becomes the Tracker and the Tracker becomes the new
Master.
A user can force a role switch via the SMDH equipment change action, even if the Tracker has a
failed device. If a role switch is forced by SMDH and the Tracker has one failed device but the
Master has none, the role switch does occur; however, the Modbus Master driver internally senses
that the new Tracker has no failed devices and initiates a second role switch, so that the FBM with
no failed devices becomes the Master again.
When a role switch occurs due to a failed device on one FBM, and the condition subsequently
clears up so that the device is communicating properly again, an automatic role switch does not
occur. If you want the current Tracker module to become the Master, you must “force” a role
switch via SMDH or perform an SMDH RESET change action on the current Master module.
During normal operations and assuming the Main (left) FBM is the Master, page 3 of the
ECB201’s Equipment Information display indicates “Main Port Active, Dual Ported”. When a
device fails on the Master FBM, SMDH changes the ECB colors from White to Yellow. Page 2 of
the Equip Info displays System Error and page 3 indicates:
Main Port Failed
Bkup Port Active (indicates that the backup FBM is “Master”)
Dual Ported.
The System Alarm log will indicate Role Switch due to Driver Request.
If both FBMs experience a failure that would cause an ECB201 to fail simultaneously, page 3 of
the ECB201 Equipment Information display shows:
Main Port Failed
Bkup Port Failed
Bkup Port Active (indicates that the backup FBM is “Master”)
Dual Ported.
63
B0700BG – Rev S 6. Detected Error Handling
64
6. Detected Error Handling B0700BG – Rev S
message requires about 20 ms. Add the times of all of the Modbus messages to get
the amount of time required to pass all of the Modbus messages to a device.
The turn-around-time of a PLC is between 10 and 20 ms. Modern PLC devices
may have a faster turn-around-time. However, this may vary in actual use
depending on how busy the device is. Add this time to each message.
The turn-around time of the driver is processor dependent, but is generally about
5 ms for the FDSI. Add 5 ms to each message.
For details on performance loading, see:
Field Control Processor 280 (FCP280) Sizing Guidelines and Excel® Workbook
(B0700FY)
Field Control Processor 270 (FCP270) Sizing Guidelines and Excel Workbook
(B0700AV)
Z-Module Control Processor 270 (ZCP270) Sizing Guidelines and Excel Workbook
(B0700AW).
65
B0700BG – Rev S 6. Detected Error Handling
66
7. Modbus Protocol
Function
Code Function Name Description
1 Read Coil Status Reads the ON/OFF status of discrete
outputs (0x references, coils)
2 Read Input Status Reads the ON/OFF status of discrete
inputs (1x references)
3 Read Holding Registers Reads the binary contents of holding
registers (4x references).
4 Read Input Registers Reads the binary contents of input
registers (3x references)
5 Force Single Coil Forces a single coil (0x reference) to
either ON or OFF
6 Preset Single Register Presets a value into a single holding
register (4x reference).
8 Diagnostic Sub Function 00 only
15 Force Multiple Coils Forces each coil (0x reference) in a
sequence of coils to either ON or OFF.
16 Preset Multiple Registers Presets values into a sequence of
holding registers (4x references).
23 Read Write Multiple Register Reads the binary contents of multiple
input registers (5x reference) and writes
the values into multiple registers (6x
reference).
NOTE
To use Modbus Function Code 23, the device configuration file is mandatory. This
file contains specifications related to reading and writing of the device data.
67
B0700BG – Rev S 7. Modbus Protocol
NOTE
“Device address” may also be referred to as “station address” for serial protocols.
For Example:
Read 1 coil at reference 0 (00001 in Modicon 984 unit 5)
RTU format:
05 01 00 00 00 01 XX
where:
XXrepresents CRC byte 1 and CRC byte 2.
A Modbus ASCII message format is similar to RTU format, except that the values are hex-ascii
and Start of Message (‘:’)/LRC, End of message (CR LF) characters are used to wrap the protocol.
Using the example above:
Read 1 coil at reference 0 (00001 in Modicon 984 unit 5)
ASCII format:
: 0 5 0 1 0 0 0 0 0 0 0 1 X X CR LF
where:
X Xrepresents LRC byte 1 and LRC byte 2.
In RTU format, the example requires just 7 bytes. In ASCII it requires 17 bytes.
The following function code examples do not include the device address or the CRC bytes.
68
7. Modbus Protocol B0700BG – Rev S
Request
Byte 0: FC = 01
Byte 1-2: Reference number
Byte 3-4: Bit count (1-2000)
Response
Byte 0: FC = 01
Byte 1: Byte count of response (B=(bit count+7)/8)
Byte 2-(B+1): Bit values (least significant bit corresponds to the first coil requested)
Exceptions
Byte 0: FC = 81 (hex)
Byte 1: exception code = 01 or 02
Example
Read 1 coil at reference 0 (00001 in Modicon 984) resulting in value 1:
01 00 00 00 01 => 01 01 01
Note that the format of the return data is not consistent with a big-endian architecture. Note also
that this request can be very computation-intensive on the slave if the request calls for multiple
words and they are not aligned on 16-bit boundaries.
Request
Byte 0: FC = 02
Byte 1-2: Reference number
Byte 3-4: Bit count (1-2000)
Response
Byte 0: FC = 02
Byte 1: Byte count of response (B=(bit count+7)/8)
Byte 2-(B+1): Bit values (least significant bit corresponds to the first coil requested)
Exceptions
Byte 0: FC = 82 (hex)
Byte 1: exception code = 01 or 02
69
B0700BG – Rev S 7. Modbus Protocol
Example
Read 1 discrete input at reference 0 (10001 in Modicon 984) resulting in value 1:
02 00 00 00 01 => 02 01 01
Note that the format of the return data is not consistent with a big-endian architecture. Note also
that this request can be very computation-intensive on the slave if the request calls for multiple
words and they are not aligned on 16-bit boundaries.
Request
Byte 0: FC = 03
Byte 1-2: Reference number
Byte 3-4: Word count (1-125)
Response
Byte 0: FC = 03
Byte 1: Byte count of response (B=2 x word count)
Byte 2-(B+1): Register values
Exceptions
Byte 0: FC = 83 (hex)
Byte 1: exception code = 01 or 02
Example
Read 1 register at reference 0 (40001 in Modicon 984) resulting in value 1234 hex:
03 00 00 00 01 => 03 02 12 34
Request
Byte 0: FC = 04
Byte 1-2: Reference number
Byte 3-4: Word count (1-125)
Response
Byte 0: FC = 04
Byte 1: Byte count of response (B=2 x word count)
Byte 2-(B+1): Register values
Exceptions
Byte 0: FC = 84 (hex)
Byte 1: exception code = 01 or 02
70
7. Modbus Protocol B0700BG – Rev S
Example
Read 1 input register at reference 0 (30001 in Modicon 984) resulting in value 1234 hex:
04 00 00 00 01 => 04 02 12 34
Request
Byte 0: FC = 05
Byte 1-2: Reference number
Byte 3: = FF to turn coil ON, =00 to turn coil OFF
Byte 4: = 00
Response
Byte 0: FC = 05
Byte 1-2: Reference number
Byte 3: = FF to turn coil ON, =00 to turn coil OFF (echoed)
Byte 4: = 00
Exceptions
Byte 0: FC = 85 (hex)
Byte 1: exception code = 01 or 02
Example
Write 1 coil at reference 0 (00001 in Modicon 984) to the value 1:
05 00 00 FF 00 => 05 00 00 FF 00
Request
Byte 0: FC = 06
Byte 1-2: Reference number
Byte 3-4: Register value
Response
Byte 0: FC = 06
Byte 1-2: Reference number
Byte 3-4: Register value
Exceptions
Byte 0: FC = 86 (hex)
Byte 1: exception code = 01 or 02
71
B0700BG – Rev S 7. Modbus Protocol
Example
Write 1 register at reference 0 (40001 in Modicon 984) of value 1234 hex:
06 00 00 12 34 => 06 00 00 12 34
Request
Byte 0: FC = 08
Byte 1-2: Subfunction (00)
Byte 3-4: value
Response
Byte 0: FC = 08
Byte 1-2: Subfunction (00)
Byte 3-4: value
The response to Function Code 8 (as used by the FDSI Modbus driver for heartbeat messages) is
a loop-back of the query request.
Request
Byte 0: FC = 0F (hex)
Byte 1-2: Reference number
Byte 3-4: Bit count (1-800)
Byte 5: Byte count (B = (bit count + 7)/8)
Byte 6-(B+5): Data to be written (least significant bit corresponds to the first
coil requested)
Response
Byte 0: FC = 0F (hex)
Byte 1-2: Reference number
Byte 3-4: Bit count
Exceptions
Byte 0: FC = 8F (hex)
Byte 1: exception code = 01 or 02
Example
Write 3 coils at reference 0 (00001 in Modicon 984) to values 0,0,1:
0F 00 00 00 03 01 04 => 0F 00 00 00 03
Note that the format of the input data is not consistent with a big-endian architecture. Note also
that this request can be very computation-intensive on the slave if the request calls for multiple
words and they are not aligned on 16-bit boundaries.
72
7. Modbus Protocol B0700BG – Rev S
Request
Byte 0: FC = 10 (hex)
Byte 1-2: Reference number
Byte 3-4: Word count (1-100)
Byte 5: Byte count (B=2 x word count)
Byte 6-(B+5): Register values
Response
Byte 0: FC = 10 (hex)
Byte 1-2: Reference number
Byte 3-4: Word count
Exceptions
Byte 0: FC = 90 (hex)
Byte 1: exception code = 01 or 02
Example
Write 1 register at reference 0 (40001 in Modicon 984) of value 1234 hex:
10 00 00 00 01 02 12 34 => 10 00 00 00 01
Read Write Multiple Register (FC23) 50001 read reference and 60001 write reference
Request
Byte 0: FC = 17 (hex)
Byte 1-2: Read starting address
Byte 3-4: Quantity to read(1-125)
Byte 5-6: Write starting address
Byte 7-8: Quantity to write (1-121)
Byte 9: Write byte count (2 x B)
Byte 10 -(B+5): Write Register values(Bx2 Bytes)
B: Quantity to write
Response
Byte 0: FC = 17 (hex)
Byte 1: Byte count (2 x B)
Byte 2-(B+5): Read Registers value (Bx2 Bytes)
B Quantity to read
Exceptions
Byte 0: FC = 97 (hex)
Byte 1: exception code = 01
73
B0700BG – Rev S 7. Modbus Protocol
Example
The following function code example does not include the device address or the CRC bytes.
Read 32 register at reference 0 (50001) and Write 1 register at reference 0 (60001) of value 000A
hex:
17000000200000000102000A
01 ILLEGAL FUNCTlON
The function code received in the query is not an allowable action for the
slave. This may be because the function code is only applicable to newer
controllers, and was not implemented in the unit selected. It could also
indicate that the slave is in the wrong state to process a request of this
type, for example because it is unconfigured and is being asked to return
register values.
74
7. Modbus Protocol B0700BG – Rev S
05 ACKNOWLEDGE
The slave has accepted the request and is processing it, but a long duration
of time will be required to do so. This response is returned to prevent a
timeout error from occurring in the master. The master can next issue a
Poll Program Complete message to determine if processing is completed.
07 NEGATIVE ACKNOWLEDGE
The slave cannot perform the program function received in the query.
This code is returned for an unsuccessful programming request using
function code 13 or 14 decimal. The master should request diagnostic or
error information from the slave.
75
B0700BG – Rev S 7. Modbus Protocol
76
8. Troubleshooting
You can troubleshoot the FDSI driver for Modbus devices should any suboptimal conditions
arise.
The document Field Device System Integrators (FBM230/231/232/233) User’s Guide (B0700AH)
includes a table (Table 8-3) that details the corrective actions you can take in response to status
messages that appear in the equipment information pages of the FBMs. In addition, you should
see the device documentation provided by the manufacturer to troubleshoot the devices.
If you see constant or intermittent device failure or slowdown, and the device configuration is
correct, you may want to use a serial data analyzer for FBMs 230 and 231 or an Ethernet snooper
for FBMs 232 and 233 to fully analyze any communication problems. Using the data analyzer or
snooper, look at the messages between the device and the FBM and find out if there are any data
communication issues such as parity errors.
Generally speaking, at startup, it is helpful to troubleshoot only one message at a time on a
communication link. Often users configure everything and turn everything on at once. When
trouble starts, there is some difficulty in tracking the problem(s) down. One suggestion is to start
with a small database that includes one device and one point. Observe the returned value or
troubleshoot and correct the link. Check each device on the link with one or two points and verify
that communication is OK. The heartbeat message is useful to verify the physical layer of the
communication. If the ECB201s are good (white) in SMDH with the heartbeat operational, then
the physical link should be OK. Afterwards, a better test will be with a scan query that asks for
120 values.
Not all Modbus PLC devices respond within the same time limit. A particularly “busy” PLC may
be slower to respond to queries than a less busy one. This can cause occasional “response
timeouts” and may fail an ECB201. Be aware of this and “tune” the response timeout values
accordingly.
You can also check the configuration of the ZIPH and XML filenames in the ECBs. It is easy to
misspell a file name, but difficult to troubleshoot the problems it may cause. This is particularly
the case when an existing driver or XML file is present in the FBM. Also make sure the files exist
in the d:\usr\fox\sp\files\devices directory on the host AW.
Remember: Anytime an SMDH Soft Download action is performed to reload the Modbus driver,
the action causes the FBM to reboot. Soft Download also wipes out any configuration XML files.
So a DB Download action to the FBM must always follow a Soft Download to reload the port
configuration XML file.
The Serial and Ethernet Modbus drivers support diagnostic error counters. These counter values
can be observed by configuring DCI IIN blocks with special PNT_NO values. The counters are
divided into two groups: Port level counters and Device level counters. The Modbus Serial driver
supports both groups. The Modbus Ethernet driver only supports the Device level counters.
77
B0700BG – Rev S 8. Troubleshooting
The counters indicate such port characteristics as the number of “good messages sent” and the
number of “checksum errors”. At the device level, the number of “good messages” both “sent” and
“received”, the number of “Modbus exception” responses received from the device, the
number of “Modbus gateway exception” responses, the “Last Error message” received as well as
the number of “response timeouts”. There are also “reset counter” DCI BOUT blocks that can be
configured to clear the counter values. The following sections discuss how to configure these DCI
block diagnostic counters. The counters can be valuable in diagnosing problems with the Modbus
communication link.
The Configured Options diagnostic block will display the options configured at various locations
(Port configuration file, DVOPTS parameter of ECB201 and Device configuration file) and that
are considered by the driver. If an option is specified at more than one location, the driver will
consider the options specified in the device configuration file as high priority, the options
specified in the DVOPTS parameter of ECB201 as next priority, and the options specified at Port
configuration file as last priority. The options that are not configured at any position will not
appear in the Configured Options block and the driver will consider the default values for those
options.
NOTE
The $FBM#_CPU_USAGE, $FBM#_MEM_USAGE, and $FBM#_IPADDRESS
variables are supported for the FDSI FBMs. See the “FBM Diagnostics” section in
Field Device System Integrators (FBM230/231/232/233) User’s Guide (B0700AH).
78
8. Troubleshooting B0700BG – Rev S
and the FBM by trying to make sure that as many values as possible are located in contiguous
register addresses.
The block will display all the field parameters in the sequence “mode baud_rate parity stop_bits
data_bits driver”.
If data_bits tag is not specified in the port configuration file, the default data_bits value 8 will be
displayed in the string block.
For example, if the block displays the string value as “RS-232 9600 None 1 8
Modbus/RTU+XML”, it means mode is RS-232, baud_rate is “9600”, parity is “None”,
stop_bits is “1”, data_bits is “8” and driver is “Modbus/RTU+XML”.
79
B0700BG – Rev S 8. Troubleshooting
8. Reset Counters1
Device Counters:
1. Number of good messages sent
2. Number of good messages received
3. Response timeout
4. Number of Modbus Device Exception responses
5. Number of Modbus gateway exception responses
6. Last Error message received from the gateway
7. Configured Options
8. Number of Over Scans
9. Over Scan time high
10. Group Scan time
Configuration of these counter blocks is described in following sections. These counters can be a
diagnostic aid or for monitoring the health of a communication link to the device. Optionally, the
values of the counters may also be incorporated into other user defined blocks for alarming
purposes. Ideally, the error counters should always be equal to zero.
Some error causing conditions are as follows:
A Framing Error usually indicates a noisy line, mismatched baud rates or parity
settings between the FBM and the receiver or an incoming break signal.
If there is a continuous parity error, this may indicate mismatched parity settings.
Intermittent parity errors may be an indication of a noisy communications line.
Continuous response timeouts indicate that the device is not responding to a query
and may be powered off, disconnected or have some other condition present that
prevents it from responding.
If this is a first time installation, response timeouts may indicate a possible mismatch
in the communication parameters.
1. Note:Reset Counters will clear all counters for a given port, as well as any device counters for
devices on that port.
80
8. Troubleshooting B0700BG – Rev S
Port Counters
Good Messages Sent
The number of good messages sent on a specific serial port may be monitored. Block definition is
as follows:
81
B0700BG – Rev S 8. Troubleshooting
82
8. Troubleshooting B0700BG – Rev S
83
B0700BG – Rev S 8. Troubleshooting
Reset Counters
All counter blocks will be reset to 0 when the value in this block toggles.
Device Counters
Good Messages Sent
The number of good messages sent to a specific device may be monitored. Block definition is as
follows:
84
8. Troubleshooting B0700BG – Rev S
85
B0700BG – Rev S 8. Troubleshooting
NOTE
The Gateway Exception responses are only used for Modbus TCP/IP. Therefore, the
Serial FDSI FBM230/231 will not use this diagnostic counter.
86
8. Troubleshooting B0700BG – Rev S
Configured Options
The Configured Options diagnostic STRIN block will contain the list of options that are in effect
for a particular device. The list of options in effect will be helpful when you have options
configured in multiple locations. Also, if you have configured the same option with different
values in more than one place, this diagnostic block will show which value is actually being used
by the driver.
Block definition is as follows:
87
B0700BG – Rev S 8. Troubleshooting
Options at Options at
Options at Port DVOPTS DVOPTS Group of
Serial Configuration Parameter of Device String Displayed in this
No. File ECB201 Configuration File Counter
1 +@10 P:+@10, E:, D:
2 +@10 P:, E:+@10, D:
3 +XML +@10 P:+XML, E:, D:+@10
4 +@10 +@20 P:, E:+@20, D:
5 +@10+XML +@20 P:, E:+XML, D:+@20
6 +@10+XML +@20 P:+XML, E:, D:+@20
7 +@10 +@20+XML +@30 P:, E:+XML, D:+@30
88
8. Troubleshooting B0700BG – Rev S
89
B0700BG – Rev S 8. Troubleshooting
90
8. Troubleshooting B0700BG – Rev S
Reset Counters
All counter blocks will be reset to 0 when the value in this block toggles.
91
B0700BG – Rev S 8. Troubleshooting
block will be updating, but when the Backup FBM is running as master, the “$B” block will be
updating.
Block definition is as follows:
Timestamp Diagnostics
When timestamping is enabled, DCI blocks may be created to monitor related diagnostic
information. The list of available diagnostic blocks is as follows:
1. FDSI Time Synchronization
2. Bad Timestamp Points
Configuration of these diagnostic blocks is described below.
92
8. Troubleshooting B0700BG – Rev S
93
B0700BG – Rev S 8. Troubleshooting
94
Appendix A. FDSI Sizing
Spreadsheet Instructions
The FDSI Sizing spreadsheet for the FDSI Modbus Master driver – Ethernet and Serial - can be
used to assist in the proper loading and configuration of the driver. The spreadsheet calculates the
load based on the number of points to be read and written, the scan rate and CP BPC. This will
help ensure that the configured number of points can be fully processed within the configured
scan cycle.
Requirements
The FDSI Sizing spreadsheet for the FDSI Modbus Master driver requires Microsoft Excel 2007,
or later.
Instructions
Open the file FDSI_Sizing_Modbus.xlsm in Microsoft Excel spreadsheet software. To use the
sizing spreadsheet, follow these steps:
1. Enable Macros
2. Enter Configuration Data
3. View Results
The following sections provide details of each step.
Enable Macros
The macros in the spreadsheet have to be enabled for proper calculation of the load.
To enable macros in the spreadsheet:
95
B0700BG – Rev S Appendix A. FDSI Sizing Spreadsheet Instructions
1. Open the file and click Options next to the detected Security Warning.
96
Appendix A. FDSI Sizing Spreadsheet Instructions B0700BG – Rev S
NOTE
The option to enable macros is available only when the file is initially opened. If
macros were not initially enabled, you can save the file (to preserve your edits) and
then re-open the spreadsheet and follow the instructions to enable macros.
97
B0700BG – Rev S Appendix A. FDSI Sizing Spreadsheet Instructions
1. On the Summary sheet, fill in the yellow-highlighted configuration parameter cells (as
shown by the area annotated as "1" in this figure).
98
Appendix A. FDSI Sizing Spreadsheet Instructions B0700BG – Rev S
The remaining configuration data is entered into the Inputs and Outputs sheets (that can be
accessed by the bottom tabs as shown by the area annotated “2” in the above figure).
On the Inputs sheet, enter all the input points. The critical information is the Modbus Register
address (in PNT_NO field). For the register address, use the same address syntax as recommended
for the DCI block PNT_NO parameter. The sizing spreadsheet uses the data entered to
determine the number of scan groups needed to read all the points.
On the Outputs sheet, enter all the output points. The critical information is the Modbus
Register address (in PNT_NO field), Period, and Phase. For the register address, use the same
address syntax as recommended for the DCI block PNT_NO parameter. Use the period and
phase numbers as defined for the CP block configuration. For period and phase, it is acceptable to
use the upstream source block's period and phase, if it is slower than the DCI output block. The
sizing spreadsheet uses the data entered to determine the number of scan groups needed to read all
the points and the maximum number of output requests during each scan period.
View Results
To view results, perform the following procedures:
1. In the Summary sheet, click Recalculate in the Loading section (as shown by the
area annotated as “3” in the figure in “Enter Configuration Data” on page 97).
NOTE
Click Recalculate every time the entries in the Input or Output sheet are
modified.
The loading results provide the percent time for scans (read requests) and the percent time for
writes. These percentages are relative to the scan rate. The total loading should be kept at, or
below, 85% to allow for minor delays or communication spikes. These loading results are worst
case estimates based on the data provided.
The loading results also indicate the suggested minimum number of FDSI modules needed to
accommodate all the points (assuming each FDSI is configured with the same scan time).
If the loading results indicate that the total loading is greater than 85%, some corrective action
needs to be taken to reduce the total loading. The following is a list of some suggested methods
for reducing the total loading:
Reduce block count by removing any unnecessary DCI blocks. This is especially
effective when reducing the number of DCI output blocks.
Increase device scan time.
Modify the output block period and phase. Larger block periods reduce the frequency
of outputs and distributing block phases reduce peaks in the output for a balanced
communication flow.
Increase the number of FDSI modules and distribute blocks over multiple FDSI
modules.
The References sheet displays the distribution of output points over each scan period. The
phase totals and the scan counts indicate the affect of changing the DCI output block period and
phase. Reducing the maximum scan count results in a lower total loading percentage modules.
99
Schneider Electric Systems USA, Inc.
38 Neponset Avenue
Foxboro, Massachusetts 02035–2037
United States of America