Model 3201
Hydrostatic Interface Unit
Modbus™ Protocol
Product Manual
Model 3201
Hydrostatic Interface Unit
Modbus
Read this manual before working with the product. For personal and system
safety, and for optimum product performance, make sure you thoroughly
understand the contents before installing, using, or maintaining this product.
Within the United States, Rosemount Inc. has two toll-free assistance numbers.
Customer Central: 1-800-999-9307 (
North American1-800-654-7768 (
Response Center: Equipment service needs.
Forequipment service or support needs outside the United States, contact your
local Rosemount representative.
™
Protocol
NOTICE
7:00 a.m. to 7:00 p.m. CST)
Technical support, quoting, and order-related questions.
The products described in this document are NOT designed for nuclearqualified applications.
Using non-nuclear qualified products in applications that require nuclearqualified hardware or products may cause inaccurate readings.
For information on Rosemount nuclear-qualified products, contact your local
Rosemount Sales Representative.
SNF-0004
Rosemount, the Rosemount logotype, and SMARTFAMILY are registered trademarks of Rosemount Inc.
HART is a registered trademark of the HARTCommunication Foundation.
Modbus is a trademark of Modicon Inc.
Princo is a trademark of Princo Intruments Inc.
Cover Photo:
T
N
I
E
D
R
P
IN
U.
A.
S.
3201-001AB
Fisher-Rosemount satisfies all obligations coming from legislation
to harmonize product requirements in the European Union.
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
Table of Contents
SECTION 1
Overview of the
HIU-MODBUS
Implementation
This Protocol Guide explains the operation of the
Rosemount
Protocol per Modicon
B (1985) implemented in the Model 3201
Hydrostatic Interface Unit (HIU). This Protocol
Guide supplements the Model 3201 Hydrostatic
Interface Unit (HIU) Product Manual. For detailed
instructions on operating the HIU, consult the HIU
Product Manual, MAN 4640.
®
implementation of the Modbus™
®
document PI-MBUS-300 Rev
MODBUS IMPLEMENTATION
A Rosemount implementation of the Modbus
protocol provides a standard form of digital
communications for the Hydrostatic Tank Gauging
(HTG) application. An effort has been made to
parallel the PLC implementation to the greatest
extent possible, so that the HIU communicates with
existing Modbus hosts.
Check compatibility carefully to ensure that the
HIU is properly configured for the data format
expected by the Host. Exceptions made because of
the unique requirements of the HTG application
have been noted. However, this is no guarantee that
the interpretation made here will be the same as
that followed by the Modbus host.
A Rosemount implementation of the Modbus
protocol provides for the passing of measured and
calculated variables, configuration information, and
diagnostics in data registers. Data is sent in these
registers as floating-point values, integer values,
numeric codes relating to configuration lists, status
summary words (packed bits), or individual status
flags (single bits).
The Modbus Communication and Power (MCAP)
output from the HIU is transmitted to the Model
3402 Application Interface Module (AIM) where it is
converted to a standard RS-485 or RS-232 Modbus
signal.
Table 1-1 lists the Modbus functions implemented
in the HIU:.
TABLE 1-1. Modbus Functions Implemented in the HIU.
Function
Code
01ReadBitsRead output status (logic coils)
02ReadBitsRead input status (discrete inputs)
03ReadInteger, Code, Status word, Floating PointRead output registers(holding registers)
04ReadInteger, Code, Status word, Floating PointRead input registers
05WriteBitsForce single coil
06WriteInteger, Code, Status word, Floating PointPresetsingle register
08N/ARepeat of “loopback” messageLoopback test
15WriteBitsForce multiple coils
16WriteInteger, Code, Status word, Floating PointPresetmultiple registers
17ReadCodeReturn Slave ID
Exception:
Because the HIU does not distinguish between inputs and outputs, function codes 01 and 02 as they apply to bits, and function codes 03 and 04 as
they applytonumeric values refertothe same data registers.For example, eitherfunctioncode 03 or function code04can be used to readthe integer
form of the true mass variable at data address 0053.
FunctionInformation TypeModbus Nomenclature
1-1
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
1-2
SECTION
2Modbus Functions
and Data Format
INTRODUCTION
The Modbus data in the HIU is arranged in
integer registers, floating-point registers, and status
bits. The assignments for these registers are found
in Sections 5, 6, and 7.
Function codes 03, 04, 06, and 16 are used with
integer registers and floating point registers.
Function codes 01, 02, 05, and 15 are used with
status bits.
Both integer and floating-point registers have
space reserved to reorder the registers for maximum
communication throughput.
A complete description of all the preceding
commands, except floating point, can be found in
“Modicon Modbus Protocol Reference Guide”
(document number PI-MBUS-300 Rev B).
NOTE
When reading or writing data to the HIU and using
commands 03, 04, or 16, the maximum allowable
registers to read and write to with a single command
is 125 (as defined by Gould Modicon).
User-assignable Registers
The data written or returned in the first fifty
integer or twenty five floating-point registers can be
assigned by the user. This provides a means of
arranging non-consecutive register information in a
sequential order so that it can efficiently be accessed
with a multiple-register read or write command.
Registers 0 through 49 in the integer map contain
the assigned data for either integer or floating-point
registers. Integer registers 200 through 249 contain
the register assignments for the integer and
floating-point map. The registers containing data
assignments are codes representing the register
number of the associated data. In addition to the
configuration of the data register assignments via
Modbus, the register assignments may be configured
via a HART-based communicator.
Integer Registers
Modbus Message Glossary
This table defines terminology used in the communication examples.
Address: user-assigned address of the slave device.
Function Code: the function the slave is to perform.
Start Reg.HO: high-orderdata addressbyte ofthe firstregisterto read
or write.
Start Reg. LO:low-orderdata address byteofthe first register to read
or write.
#ofReg.HO:high-order byte of the number of registers to read or
write.
#ofReg.LO:low-order byte of the first register to read or write.
Byte Count: number of data bytes.
Data MSB: data register's most significant byte.
Data LSB: data register's least significant byte.
Status Bit HO: high-order data address byte of the first bit to read or
write.
Status Bit LO: low-order data address byte of the first bit to read or
write.
Error Check: message checksum LRC (Longitudinal Redundancy
Check) in ASCII mode, or CRC (Cyclical Redundancy Check) in RTU
mode.
Integer registers are the most commonly used type
of Modbus data and are supported by most Modbus
hosts. In the HIU Implementation, the Modbus
registers are arranged in one of the following four
formats:
1. Integer Data - a scaled number from 0 to the
maximum Modbus integer
2. Character Data - 2 ASCII characters per 16 bit
register (ex. date, password)
3. Coded Data - Multiple choice configuration
data chosen from a coded list
4. Packed Bits - Register form of 16 pac ked single
bits
The integer, character, and coded data registers
contain all of the information needed to configure
and read process data. Any Integer register may be
read with function code 03 or function code 04. These
same registers may be written one at a time with
function code 06 or multiple registers can be written
with function code 16.
2-1
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
The HIU rejects the entire message if an attempt
is made to write a register with data that is out-ofbounds or not considered to be of legal value. Out-ofbounds data includes coded data values outside of
the values listed in each coded data table, integer
values larger than the maximum Modbus integer
and reserved registers with values other than zero.
This rejection scheme has been chosen to add
security by helping to prevent the accidental writing
of data to incorrect registers.
Integer Data
The integer data is a whole number between 0 and
the maximum Modbus integer (inclusive). The
maximum Modbus integer is a user-configurable
variable that is a whole number between 0 and
65,535 (inclusive). The integer data must also be
scaled for each data type by entering the desired
units, a zero point, and a full scale point. For the
integer value to be correctly interpreted, these
scaling factors must match the format expected by
the host system. Scaling of the integer parameters is
accomplished through floating-point registers or by
using a HART-based interface. Table 2-1 shows an
example of integer data written to the HIU.
The following communication example shows
the request for one register starting at register 56
(0038 Hex).
1 In all communicationexamples, the error checkvalue is dependent on
Function
Code
010300380001XX
Function
0103024124XX
the mode of transmission.
Code
Start
Reg HO
Count
Byte
Start
Reg LO
#ofRegHO#ofRegLOError
Data
MSB
Data
LSB
Check
1
Error
Check
1
If a variable goes out-of-bounds (outside the zero
or full scale points), a value equal to the maximum
Modbus integer +1 is returned. When writing to any
register that contains a variable that is a dynamic
output from the HIU, the value will be written over
on the next system update.
Character Data
Character data, such as dates or passwords, are
returned in registers in ASCII data format. Each
Modbus register represents two ASCII characters.
Table 2-2 shows an example of character data
written to the HIU.
TABLE 2-2. Integer Data.
Maximum Modbus Integer = 65,534
The data returned for data address 56 is 16,676
(4124 Hex). This value must be scaled using the
following formula to give it meaning.
Coded Data represents a table look-up value. Data
written to these registers must be a valid table entry
or the entire message is rejected. Table 2-3 shows an
example coded data at data address 88 (0058 Hex)
representing pressure units. The value 11 (000B
Hex) returned from the HIU corresponds to KPa in
the pressure unit look-up table.
TABLE 2-3. Coded Data.
Host Request
Address
HIU Response
Address
Coded Data
Hexadecimal Representation:000B (decimal 11)
Pressure Units Table Representation:kPA
Function
Code
010300580001XX
Function
Code
010302000BXX
Start
Reg HO
Byte
Count
Start
Reg LO
Data
MSB
#ofRegHO#ofReg
Data
LSB
LO
Error
Check
Error
Check
Packed Bits
Packed bits represent 16 individual status bits
packed into one register. The status bits have been
packed this way for systems that prefer handling
only register information. These bits may also be
read or written individually using a bit command.
The bits within the packed registers are grouped by
data or function type. T able 2-4 shows an example of
packed bits with alarm status information at data
address 76 (004C Hex) returned by the HIU.
TABLE 2-4. Packed Bits.
Host Request
Address
HIU Response
Address
Packed Bit Data
Binary Representation (bits 16-0):0000 0000 0001 0010
Bit #1 is on indicating Lo Alarm
Bit #4 is on indicating an Unathorized Mass Movement
Function
Code
0103004C0001XX
Function
Code
0103020012XX
Start
Reg HO
Byte
Count
Start
Reg LO
Data
MSB
#ofRegHO#ofReg
LO
Data
LSB
Error
Check
Error
Check
FLOATING-POINT REGISTERS
Although not specifically addressed by the Modbus
protocol specification, floating-point numbers have
been implemented per IEEE 754. Floating point
numbers reduce the complexity required in scaling
integer values and provide a means to transmit
numbers used by the HIU that are not easily scaled,
such as the K0 through K4 configuration
parameters.
Floating-point Data
The HIU is capable of a two 16-bit registers
format. An example and description follow.
NOTE
Although this type of data does not require scaling,
it is important that the measurement unit selected
in the HIU be the same as that expected by the host.
In addition, where possible, data is available in both
integer and floating-point formats.
The Two 16-bit Registers Format
Function code 03 or 04 are used to read floatingpoint registers in this format. Function codes 06 or
16 are used to write floating-point registers in this
format. An example of reading a floating-point
register from the HIU is shown in Table 2-5.
TABLE 2-5. Reading a Two 16-bit Floating-point Register.
Floating-point registers that are defined as
reserved have 0 as their only legal value. A write
command to a reserved floating-point register with a
value other than zero will be rejected.
Section 6 lists floating-point register assignments
using the two 16-bit registers format.
#of
#of
Reg
Reg LO
HO
DataDataData
LSB
Error
Check
Error
Check
Status bits that are defined as reserved have 0 as
their only legal value. A write command that
contains a packed bit register with reserved bit of
value 1 will be rejected.
2-3
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
STATUS BITS
In the HIU Implementation, status bits contain
alarms, commands, and status information. The
state of a Modbus status bit is defined as either ON
(true) or OFF (false). The ON state is represented by
a “1.” The status bits may be read with function code
1 or 2. They may be written one at a time with
function code 5 or multiple bits may be written with
function code 15. Status bits that are defined as
reserved have zero as their only legal value. When
writing bits, the entire write message will be
rejected if reserved bits are not written with a value
of zero. This rejection scheme has been chosen to add
security by helping to prevent the accidental writing
of data to incorrect bits. An example of a read
message for bits 2 through 6 as returned by the HIU
is shown in Table 2-6.
TABLE 2-6. Status Bits.
Host Request
Address
HIU Response
Address
Status Bit Data
Binary Representation (bits): 1 0010
Bit #2: HI Alarm OFF
Bit #3: HI Alarm ON
Bit #4: Unauthorized Mass Movement Alarm OFF
Bit #5: Standard Density Alarm OFF
Bit #6: Critical Zone Alarm ON
Function
010200020004XX
Function
01020112XX
Start BitHOStart BitLO#ofBitHO#ofBit
Code
Code
Byte
Count
DataError
Check
LO
Error
Check
DATA OUT OF RANGE
When integer data calculated by the HIU is
outside the zero, and full scale points or is out of
range, the value of the maximum Modbus integer + 1
is returned. The “data out of range” convention does
not apply to the status bits, packed status bits,
character data, and coded data.
LOOPBACK TEST
Per the Modbus specification, function code 8
initiates a loopback test. The purpose of this test is
to check the communication system. It does not
affect the operation of the HIU. The HIU supports
only diagnostic code 00. This is a request to return
query data. Upon receiving a loopback message
containing this code, the HIU will echo the message
sent by the master . The entire message returned will
be identical to the message transmitted by the
master, field-per-field. An example of a loopback
message is shown in Table 2-8.
TABLE 2-8. Loopback Message.
Host Request
Address
Host Response
Address
Function
Code
01080000F326XX
Function
Code
01080000F326XX
CodeHOCode
LO
CodeHOCode
LO
DataData
DataData
Error
Check
Error
Check
EXCEPTION RESPONSES
The exception responses returned by the HIU are
listed in Table 2-7.
TABLE 2-7. Exception Responses.
ExceptionResponseReason
01
02
03
Messages that are received with a parity error,
checksum error or message format error will be
ignored. In addition, the HIU will reject any write
message that is sent containing a data register or bit
defined as reserved if it does not have a value of 0.
An entire block will be rejected if this convention is
not followed for every reserved register or bit within
the block.
2-4
Illegal Function
Illegal Data Address
Illegal Data Value
Message is not allowed
Data address (bit or register)
requested is not defined
Data value being written is
out of range
SECTION
3Modbus
Hardware Implementation
The Model 3201 HIU communicates and is
powered using the same pair of wires. The protocol is
Manchester-encoded Modbus (MCAP), whic h is then
converted to standard RS-485/232 Modbus via the
Model 3402 Application Interface Module (AIM).
The recommended wiring configurations are as
follows:
MCAP Signal Wiring
one twisted shielded pair, 18 AWG. Wiring
distance is approximately 5,000 feet with 14 HIUs
or SAMs in any combination with 2 HART devices
connected to the HIU. For specific details on
grounding and wiring connections, see the product
manual for the Model 3201 HIU, MAN 4640.
Modbus Host Signal Wiring
Modbus RS-485, one or two twisted shielded pair,
18 AWG. Wiring distance is approximately 5,000
feet. Modbus RS-232, standard serial
communication with RJ45 type connector and 25or 9-pin connector. Wiring distance is
approximately 50 feet. For specific details on
grounding and wiring connections, see the product
manual for the Model 3402 AIM, MAN 4641.
3-1
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
3-2
SECTION
4
Modbus Configuration
The Model 3201 HIU needs to be configured to
establish communications. The HART-based
communicator allows the user to set the HIU
Modbus port to match the Modbus host and Model
3402 AIM.
HIUs are addressed to provide a unique identifier
for the host. The HIU address is configurable
through a HART-based communicator. This address
may range from 1 to 247 and must be unique. Each
HIU only responds when a query has been sent to its
unique address by the host device.
In addition to the choice of transmission mode and
associated configuration parameters, the HIU must
be configured for a transmission speed or baud rate.
Allowable MCAP baud rate values for the Model
3201 HIU include: 38400 or 9600. These parameters
can also be configured using the HART-based
Communicator connected directly to the HIU. A
summary of the configuration information required
by the HIU in order to implement Modbus is given in
Table 4-1.
TABLE 4-1. Modbus Configuration Summary.
Configuration ItemValid Entries
Modbus Address1 to 247YesYes
Baud Rate38400, 9600YesYes
Maximum Integer
Size
Integer Scaling
Factors
Unit SelectionCoded ListYesYes
Whole Number
0-65,534
Floating Point #YesYes
Modbus
Configurable
YesYes
HART-based
Communicator
4-1
Rosemount Model 3201 Hydrostatic Interface Unit Modbus Protocol
4-2
Loading...
+ 36 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.