Service Manual: 4590 Tank Side Monitor
Service Manual: 4590 Tank Side Monitor
Service Manual
Modbus Communication Protocol
www.varec.com
Varec, Inc.
5834 Peachtree Corners East, Norcross (Atlanta), GA 30092 USA
Tel: +1 (770) 447-9202 Fax: +1 (770) 662-8939
4590
Copyright
All rights reserved. Printed in the United States of America. Except as permitted under
the United States Copyright Act of 1976, no part of this publication may be reproduced,
stored in a retrieval system or transmitted in any form or by any means- electronic,
mechanical, photocopying, recording or otherwise- without the prior written permission
of the Publisher:
Varec, Inc.
5834 Peachtree Corners East
Norcross (Atlanta) GA 30096
USA
Trademarks Acknowledged
Varec, Inc. recognizes all other trademarks. Trademarks of other products mentioned in
this document are held by the companies producing them.
i
Tank Side Monitor
Disclaimer of Warranties
The contract between the Seller and the Buyer states the entire obligation of the Seller.
The contents of this document shall not become part of or modify any prior or existing
agreement, commitment or relationship between the Seller and Buyer. There are no
express or implied warranties set out in this document. The only warranties that apply
are those in the existing contract between the Seller and Buyer.
Varec, Inc. products have not been tested by Varec, Inc. under all possible operational
conditions, and Varec, Inc. may not have all the data relative to your application. The
information in this document is not all inclusive and does not and cannot take into
account all unique situations. Consequently, the user should review this product
literature in view of his/her application. If you have any further questions, please contact
Varec, Inc. for assistance.
Terms of Use
The information provided in this document is provided “as is” without warranty of any
kind. Varec, Inc. disclaim all warranties, either express or implied, including the
warranties of merchantability and fitness for a particular purpose. In no event shall
Varec, Inc. or its suppliers be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special damages, even if
Varec, Inc. or its suppliers have been advised of the possibility of such damages.
Use of parts that are not manufactured or supplied by Varec, Inc. voids any Varec, Inc.
warranty and relieves Varec, Inc. of any obligation to service the product under warranty.
Varec, Inc. recommends the use of only Varec, Inc. manufactured or supplied parts to
maintain or service Varec, Inc. products.
ii Service Manual
4590 Contents
Contents
1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2.1 Parity Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2.2 Description of the Basic Configuration Parameters ID (9211) . . . . . . . . . . . . 7
3.2.3 Description of the Extended Configuration Parameters Word Type (9221) . . 7
5 Exception Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6 Hardware Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.1 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2 RS-485 Modbus Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
iii
Contents Tank Side Monitor
iv Service Manual
4590 Introduction
1 Introduction
This protocol guide explains the operation of the Modbus protocol per Modicon
document PI-MBUS-300 Rev C (1991) implemented in the Varec 4590 Tank Side Monitor
(TSM).
The Modbus protocol defines the format of data and the techniques used to control the
flow of data. In Modbus, the flow of data between two devices uses a master/slave type
arrangement. The 4590 TSM acts as a Modbus slave and runs on the EIA (RS)-485
version of the Modbus communications board.
1
Introduction Tank Side Monitor
2 Service Manual
4590 Implementation
2 Implementation
The implementation of Modbus protocol for the 4590 TSM provides a standard form of
digital communication. Every effort has been made to parallel current implementations
so that the 4590 TSM communicates with existing Modbus masters.
Check compatibility carefully to ensure that the 4590 TSM is properly configured for the
data format expected by the host computer. Due to the unique application requirements
of the 4590 TSM, exceptions have been made and noted.
Note! This is no guarantee, however, that the interpretation made here will be the same as
that followed by the Modbus master.
The 4590 TSM implementation of 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, word values, numeric
codes related to configuration lists, status summary words (packed bits) or individual
status flags (single bits).
One master and up to 31 4590 TSMs as Modbus slaves may be multidropped on a single
EIA (RS) 485 communication bus.
The Modbus functions implemented in the 4590 TSM are listed in the following table.
Modbus functions
03 Read Word, code, status word, floating point Read output registers
04 Read Word, code, status word, floating point Read input registers
16 Write Word, code, status word, floating point Force multiple registers
3
Implementation Tank Side Monitor
4 Service Manual
4590 Configuration
3 Configuration
The Modbus port on the 4590 TSM must be configured to establish communications.
The local display or Time-of-Flight (ToF) tool allows the user to set the 4590 TSM
Modbus port to match the Modbus master.
4590 TSM addresses provide unique identification for the host. The 4590 TSM address
is configurable through the local display or ToF tool. This address may range from 1 to
147 and must be unique for each Modbus device on a loop. Each 4590 TSM only
responds when a query has been sent to its unique address by the host.
The Modbus protocol defines two modes of transmission, Remote Terminal Unit (RTU)
or ASCII (American Standard Code for Information Interchange). The choice between
these two modes is dependent on the preference of the host. RTU is often the preferred
protocol because of its improved error detection capabilities and higher throughput.
ASCII mode uses ASCII printable characters to represent hexadecimal values, this mode
of transmission requires almost twice as many characters to pass information compared
with the RTU transmission mode.
Note! The 4590 TSM only supports the RTU mode of communications.
The 4590 TSM supports both input and output register and coil assignments.
5
Configuration Tank Side Monitor
3.2 Parameters
The EIA485 port must be configured for a transmission speed (baud rate). Allowable
values are 1200, 2400, 4800, 9600 bits per second. This item must be configured using
the local display or ToF tool. A summary of the configuration information required by
the 4590 TSM in order to implement Modbus is provided in the following table. Default
values are highlighted.
1. The mode value affects the format for the floating point data returned by the 4590 TSM
The following table explains, how the data is sent when one of the available parity
settings is selected in the 4590 TSM Modbus Menu. The column "RTU Settings" is
important when the 4590 TSM is connected to a RTU8130, it shows how the RTU8130
has to be set up.
NRF parity RTU Settings Parity bit Stop bits Data bits Startbits
1. default Values
6 Service Manual
4590 Configuration
This Value set the ID of the 4590 TSM. Never setup two TSM with the same ID on the
same loop.
Setup the baud rate for communication speed (600, 1200, 2400, 4800, 9600).
This is the setup for the parity bit (Odd, Even, None, One Stop Bit).
Set the format of the floating point value (no swap, swap data, WW swap).
Set Signed or Unsigned configuration for the integer registers. The 0% and 100% range
has to be defined before otherwise a valid integer value could not be calculated.
The data value that would be filled in, if an error occurred during transferring the data
to the UART. (0xFF, 0x00).
Float Vals.: all values in the TSM SW 1.x (see Section 7.1.4) register map is transferred
as float values to the host
Integer Vals.: all value in the TSM SW 1.x (see Section 7.1.5) register map is transferred
as integer values to the host (signed or unsigned, based on the global
settings - menu 9221)
Activate bus termination. Termination resistors should be placed at each end of the
communication bus to minimize reflections on the line.
Note! Bus termination is normally not needed at baud rates of 9600 or less.
Note! Do not use bus termination if the field communication is installed in a "star" configu-
ration. Use bus termination only for daisy-chained field wiring.
This section set the start value of the CRC register, default value is 0xFFFF but some
Modbus Masters are working with 0x0000.
7
Configuration Tank Side Monitor
8 Service Manual
4590 Functions and Data Formats
The Modbus data in the 4590 TSM is arranged in word registers, floating point registers
and status bit registers. The assignment for these registers is found in “Modbus register
assignments”.
The 4590 TSM also supports a two 16-bit register floating point data format. Function
codes 03 and 04 are used to read these floating point register pairs while function code
16 is used to write the floating point register pairs.
A complete description of all the Modbus commands, can be found in the Modicon
Modbus Protocol Reference Guide, document number PI-MBUS-300.
Word registers holding 16 bits of data (sometimes referred to as integers) are the most
commonly used type of Modbus data and are supported by most Modbus hosts. In the
4590 TSM implementation, the Modbus word registers are used to transfer one of the
following four formats:
The word and coded data registers contain all of the information needed to configure
and read process data. Any word 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.
The word data (unsigned) is a whole number between 0 and 65,535 stored as a 16 bit
binary number.
Coded data responds to a look-up table value. Data written to these registers must be
a valid table entry or the value is rejected. For example, within the 4590 TSM the units
of a value are represented by the HART standard value look-up table (see “Modbus
register assignments”). Therefore, if the Units value read from a HART device was 45
(002D Hex), the units would be Meters.
9
Functions and Data Formats Tank Side Monitor
State Description
0 Unknown
1 Inactive
2 Active
3 Invalid
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.
The bits within the packed registers are grouped by data or function type.
When configuring an Varec Model 8130 RTU to read these values (NOT using the default
RTU "TSM" interface point), you should make sure the “Operational Mode” parameter of
the MIREG point on the Model 8130 RTU is set to 1.
Although not part of the Modbus protocol specification, floating point numbers have
been implemented using the IEEE 754 standard 32-bit representation [see the IEEE
Computer Society (1985) "IEEE Standard for Binary Floating-Point Arithmetic, IEEE
Std 754-1985" for complete technical information on this format]. Floating point
numbers increase accuracy and reduce the complexity required in scaling word values
and provide a means to transmit numbers used by the 4590 TSM that are not easily
scaled.
The 4590 TSM makes these values available through a pair of 16-bit Modbus registers.
Function code 03 or 04 are used to read a floating point register pair. Function code 16
is used to write floating point register pairs. The pair of registers holding the floating
point MUST ALWAYS be read and written with a single command.
When configuring a Varec Model 8130 RTU to read these values (NOT using the default
RTU "TSM" interface point), you should have the 4590 TSM Modbus Mode parameter set
to 0 (default) and use a MFPREG point on the Model 8130 RTU with it's Mode parameter
set to 1.
10 Service Manual
4590 Functions and Data Formats
When this mode was activated in software version 1.x, ALL floating point values in the
Modbus map were converted into integer values using the same scaling factors. This
means there were only two options:
2. read all registers as integer values converted by the same scaling factor
Improvements:
1. in software version 2.x the floating-point and integer values using their own block
of registers. This makes it possible to read for example the level as floating-point
and temperature as integer value.
2. every group (like Level or Temperature) uses their own scaling factor (see Menu
9251 "Integer Scaling")
11
Functions and Data Formats Tank Side Monitor
12 Service Manual
4590 Exception Responses
5 Exception Responses
The exception responses returned by the 4590 TSM are listed below:
10 (0x0A) Value read only Data address being written is read only
In addition, messages that are received with a parity error, checksum error or message
format error will be ignored.
13
Exception Responses Tank Side Monitor
14 Service Manual
4590 Hardware Implementation
6 Hardware Implementation
The 4590 TSM uses a 3-Wire EIA485 hardware interface to communicate with the
Modbus master. EIA485 is a high speed differential communications network which
allows up to 32 devices to operate on one network. The 4590 TSM and Modbus master
share a twisted triad of wires to communicate.
The communication distance EIA485 can reliably travel is dependent on baud rate
(communication speed), wire quality, environmental electrical noise, wiring
configuration and the number of multi-dropped 4590 TSMs. The recommended wire for
EIA485 systems is 18-gauge or larger, shielded, twisted triad. The shield should be
grounded at the Modbus master (control system or computer) end.
6.1 Termination
Note! Bus termination is normally not needed at baud rates of 9600 or less.
Note! Do not use bus termination if the field communication is installed in a "star" configu-
ration. Use bus termination only for daisy-chained field wiring.
There are various methods of interfacing a RS-485 Modbus loop to the control system,
such as an Varec Model 8130 RTU or a PC RS-485 interface. The method used will
depend on the system and software being installed. However, if a direct PC RS-485
interface is required, it is recommended that this be an internal industrial specification
interface card (e.g. ISA, PCI, PCMCIA) providing galvanic isolation and lightning
protection and not an external RS-232 to RS-485 converter.
15
Hardware Implementation Tank Side Monitor
16 Service Manual
4590 Modbus Register Assignments
17
Modbus Register Assignments Tank Side Monitor
Discrete Value:
Valid values are 0 (zero) or 1. Trying to write a value > 1 will set the current value
automatically to 0 (zero).
18 Service Manual
4590 Modbus Register Assignments
The following table describes the meaning of the bits in a status value.
3..4 reserved 0 1
8..11 reserved 0 1
13..15 reserved 0 1
19
Modbus Register Assignments Tank Side Monitor
20 Service Manual
4590 Modbus Register Assignments
21
Modbus Register Assignments Tank Side Monitor
22 Service Manual
4590 Modbus Register Assignments
23
Modbus Register Assignments Tank Side Monitor
24 Service Manual
4590 Modbus Register Assignments
25
Modbus Register Assignments Tank Side Monitor
The 4590 TSM Modbus map provides a compatible sub map to replace the Varec 4200
Multi-Function Transmitter without changing Modbus master settings, depending on
parameters used.
26 Service Manual
4590 Modbus Register Assignments
27
Modbus Register Assignments Tank Side Monitor
28 Service Manual
4590 Modbus Register Assignments
Non-i.s. analog output parameters Data address Modbus register Data type Access
29
Modbus Register Assignments Tank Side Monitor
30 Service Manual
4590 Modbus - Example Telegram
Rx 08 03 0B BC 00 02 07 52
Tx 08 03 04 41 93 33 30 93 C6
31
Modbus - Example Telegram Tank Side Monitor
32 Service Manual
4590 Tables and Reference Information
"The encoding of the units transmitted by the 4590 TSM follow the HART units coded
table".
The highlighted units are supported by the 4590 TSM Tank parameters. Other generic
HART devices may provide any of these values.
9.1.1 Temperature
32 Degrees Celsius °C
33 Degrees Fahrenheit °F
34 Degrees Rankin °R
9.1.2 Pressure
7 Bars bar
8 Millibars mbar
11 Pascals PA
12 Kilopascals kPA
13 Torr torr
14 Atmospheres ATM
33
Tables and Reference Information Tank Side Monitor
9.1.4 Velocity
34 Service Manual
4590 Tables and Reference Information
9.1.5 Volume
40 Gallons gal
41 Liters lt
43 Cubic Meters m3
9.1.6 Length
44 Feet ft
45 Meters m
47 Inches in
48 Centimeters cm
49 Millimeters mm
9.1.7 Time
50 Minutes min
51 Seconds sec
52 Hours hr
53 Days day
35
Tables and Reference Information Tank Side Monitor
9.1.8 Mass
60 Grams g
61 Kilograms kg
63 Pounds lb
36 Service Manual
4590 Tables and Reference Information
9.1.11 Viscosity
36 Millivolts mV
58 Volts V
39 Milliamperes mA
37 Ohms Ohm
37
Tables and Reference Information Tank Side Monitor
69 Newton Meter NM
89 Deka Therm
9.1.16 Power
9.1.18 Miscellaneous
38 Herts Hz
56 Microsiemens uMho
57 Percent %
59 pH pH
66 Milli Siemens per Centimeter mSiemen/cm
68 Newton N
38 Service Manual
4590 Tables and Reference Information
143 Degrees °
153 Picofarads pF
9.1.19 Special
251 No Units
253 Special
246
247
248
249 Ampere A
39
Tables and Reference Information Tank Side Monitor
40 Service Manual
4590
NOTES
41
Your official representative
Your offical representative
www.varec.com
Varec, Inc.
5834 Peachtree Corners East, Norcross (Atlanta), GA 30092 USA
Tel: +1 (770) 447-9202 Fax: +1 (770) 662-8939
© 2006 Varec, Inc. All Rights Reserved. This document is for information purposes only. Varec, Inc. makes no warranties, express or implied, in this summary.
The names of actual companies and products mentioned herien may be the trademarks of their respective owners.