Xylem Expert 7060, Expert 7070 User Manual

Description of the
Communication protocol
for Series 30 and Series40 pressure transmitters from KELLER
Class.Group = 5.20
Version 3.0
1 Introduction............................................................................................................................................................................3
2 Bit transfer layer (physical layer) .........................................................................................................................................3
2.1 Introduction ........................................................................................................................................................................... 3
2.2 Characteristic ........................................................................................................................................................................3
2.3 RS485 half-duplex details .....................................................................................................................................................4
3 Data-link layer.........................................................................................................................................................................5
3.1 Transmission format for the serial interface .......................................................................................................................... 5
3.2 Format of a message ............................................................................................................................................................6
3.3 Principle of message interchange ......................................................................................................................................... 7
4 MODBUS communication......................................................................................................................................................9
4.1 MODBUS Communication Basics......................................................................................................................................... 9
4.2 Using MODBUS with KELLER products ............................................................................................................................... 9
The MJK
4.3 Description of MODBUS functions ............................................................................................................................... ....... 10
4.4 Modbus Communication Examples............................................................................................................................... ...... 10
4.5 Function 3: MODBUS Register Read............................................................................................................................... ... 10
4.6 Function 6: MODBUS Single Register Write....................................................................................................................... 11
4.7 Function 8: MODBUS Echo Test ........................................................................................................................................ 11
4.8 Function 16: MODBUS Register WRITE.............................................................................................................................12
4.9 MODBUS Register Map ...................................................................................................................................................... 13
4.10 Device Operation Command List ...................................................................................................................................... 16
5 Description of Keller bus functions ...................................................................................................................................17
5.1 Example: read pressure value with exception handling ...................................................................................................... 17
5.2 Function 30: Read coefficient.............................................................................................................................................. 18
5.3 Function 31: Write coefficient.............................................................................................................................................. 20
5.4 Function 32: Read configuration ......................................................................................................................................... 21
5.5 Function 33: Write configuration ......................................................................................................................................... 21
5.6 Function 48 : Initialise and release............................................................................................................................... ....... 23
5.7 Function 66 : Write and read new device address ............................................................................................................. 24
5.8 Function 69 : Read serial number ............................................................................................................................... ....... 24
5.9 Function 73 : Read value of a channel (floating point)....................................................................................................... 25
5.10 Function 74 : Read value of a channel (integer) ...............................................................................................................26
5.11 Function 95 : Commands for setting the zero point .......................................................................................................... 27
5.12 Function 100 : Read configuration .................................................................................................................................... 28
5.13 Function 101 : Write configuration .................................................................................................................................... 28
6 Appendix...............................................................................................................................................................................30
6.1 Interface converter ..............................................................................................................................................................30
6.2 floating-point format IEEE754 ............................................................................................................................................. 30
6.3 Error handling and recognition ............................................................................................................................................ 31
6.4 Calculation of the CRC16 checksum .................................................................................................................................. 33
6.5 Description of the software driver (DLL).............................................................................................................................. 34
6.6 Changes.............................................................................................................................................................................. 37
6.7 Software versions................................................................................................................................................................ 37
6.8 Support................................................................................................................................................................................ 37
Communication protocol Serie30 Page 2/37
1 Introduction
This document describes the communications protocol for the Series 30 digital pressure transmitters from KELLER
MJK
Druckmesstechnik. In addition to these transmitters, other devices such as data loggers or manometers are also offered. These products are distinguished by the designation CLASS. Within this device class, the individual device groups are differentiated by the designation GROUP. All Series 30 pressure transmitters bear the CLASS designation 5.
The software version number consists of following components:
short-designator:
Class Group Year Week
Device group SW-Version
Series 30 and 40 5 20 SW-Version: release year SW-Version: release week
In this document, the software version is defined by Class.Group-Year.Week, e.g. 5.20-5.50.
The protocol itself is based on MODBUS, but incorporates optimised functions for the device, these functions are called Keller bus functions. However, minimum (only fct3) MODBUS RTU functionality is implemented for devices CLASS.GROUP = 5.20 with firmware 2.40 and newer. Full MODBUS support is provided from firmware 5.20-10.XX on.
See Appendix for an overview of differnet versions.
2 Bit transfer layer (physical layer)
2.1 Introduction
The physical connection is provided by the RS485 serial interface. This guarantees good interference immunity and enables a flexible bus structure, i.e. several devices can be administrated as slaves by a single master. In order to minimise the scope of
cabling, the RS485 is used in half-duplex mode. This means that 2 wires are required for communications and 2 wires for power
infeed.
2.2 Characteristic
In order to operate several devices at one serial interface, they are simply all connected in parallel (RS485A, RS485B, GND and +Vcc). Before incorporating the devices into the bus, each device must be programmed with a different address.
It is possible to configure a network up to a length of 1300 metres with a maximum of 128 devices. Each riser cable may be up to 14 m in length. The employed cable should correspond to specification EIA RS485.
max. 1300m
max. 14m
master
dev. ndev. 2dev. 1
Communication protocol Serie30 Page 3/37
4.3 Description of MODBUS functions
This section describes the MODBUS functions supported by Series 30 transmitters (device Class.Group = 5.20) Overview:
F3: Read registers on MODBUS address space F6: Write single register on MODBUS address space F8: MODBUS Echo function F16: Write multiple registers on MODBUS address space
4.4 Modbus Communication Examples
Read P1
Read P2 Read TOB1 Read P1 and
address
250
1 1
250
1 1
request response
250 3 0 2 0 2 112 64 250 3 4 63 117 228 166 102 72 1 3 0 2 0 2 101 203 1 3 4 63 117 240 123 227 222 1 3 0 4 0 2 133 202 1 3 4 63 118 6 224 21 213 250 3 0 8 0 2 80 66 250 3 4 65 181 99 178 29 163 1 3 0 8 0 2 69 201 1 3 4 65 181 192 121 110 11 1 3 1 0 0 4 69 245 1 3 8 63 117 227 210 65 182
28 32 160 119
received value
0.96052 bar
0.960701 bar
0.961042 bar
22.6737 °C
22.719 °C
0.960508 bar
22.7637 °C
TOB1
Purple = MODBUS register address
4.5 Function 3: MODBUS Register Read
Read a number of subsequent registers in the MODBUS address space starting with StAdd. Note, that the data returned has to be interpreted according the definitions in “4.9 MODBUS Register Map”.
Function is implemented in devices Class.Group-Version = 5.20-2.40 and later
The number of registers read in one cycle is limited:
4 registers for devices Class.Group-Version = 5.20-10.XX and later 2 registers for earlier versions than Class.Group-Version = 5.20-10.XX
Byte-count of the answer will be an even number (1 register = 2 bytes)
Addresses that are part of double sized registers, return 0x0000 if only one register is requested
Returns NaN or Exception 4 in case of a channel error, depending on accessing a “float” or “integer” address.
Request:
DevAddr 0x03 StAdd H StAdd L # Reg H # Reg L CRC16_L CRC16_H
Response:
DevAddr 0x03 # Bytes Data H Data L Data L CRC16_L CRC16_H
Error:
DevAddr 0x83 Error CRC16_L CRC16_H
Error codes:
2 Illegal data address:
- Wrong starting-address or wrong number of registers
- Start-address not defined, register exceeding defined range return 0x0000
3 Illegal data value:
- Quantity of requested registers out of bound
- Must be <= 4 for devices Class.Group-Version = 5.20-10.XXand later
- Must be <= 2 for devices Class.Group-Version = 5.20-2.40 - 5.20-10.XX 4 Slave Device Failure:
- Value not valid (=> check status)
- Over/Underflow when requesting value as int
- Channel not active and requesting value as int
Communication protocol Serie30 Page 10/37
4.6 Function 6: MODBUS Single Register Write
This function has the same functionality as F16, but writes only 1 register.
Function is implemented in devices Class.Group-Version = 5.20-10.XX and later
A register contains 2 bytes (16 bit).
Use this function for single configuration steps, cause the returned error is easily distinguishable from other register
writes.
Note that single register operations are not allowed in the address ranges 0x03XX and 0xFFXX.
Request:
DevAddr 0x06 StAdd H StAdd L Data H Data L CRC16_L CRC16_H
Response:
DevAddr 0x06 StAdd H StAdd L Data H Data L CRC16_L CRC16_H
Error:
DevAddr 0x86 Error CRC16_L CRC16_H
Error codes:
2 Illegal data address
- address not accessible by function 6
- Start-address not defined (for writing)
3 Illegal data value
- frame length incorrect
4 Slave Device Failure
- The data written is outside the defined data range
4.7 Function 8: MODBUS Echo Test
This function may be used to perform a quick line check. It just returns the data received.
Function is implemented in devices Class.Group-Version = 5.20-10.XX and later
Data may be any 2 byte value
Request:
DevAddr 0x08 0x00 0x00 Data H Data L CRC16_L CRC16_H
Response:
DevAddr 0x08 0x00 0x00 Data H Data L CRC16_L CRC16_H
Error:
DevAddr 0x88 Error CRC16_L CRC16_H
Error codes:
3 Illegal data value:
- The data following the function code was not the fixed data (0x00, 0x00).
Communication protocol Serie30 Page 11/37
4.8 Function 16: MODBUS Register WRITE
Write a number of subsequent registers on the MODBUS address space starting with StAdd.
Function is implemented in devices Class.Group-Version = 5.20-10.XX and later
A register contains 2 bytes (16 bit).
The number of registers written in one cycle is limited to 2 (0x02) for Class.Group-Version = 5.20-10.XX
Byte-count of the answer will be an even number (1 register = 2 bytes).
Addresses above 0xFF00 are virtual command registers that simply execute a task on the slave. Please refer to chapter
“4.9 MODBUS Register Map” for more information.
Writing float values (0x03XX and 0xFFXX) always requires 2 data registers.
#Reg in the response declares the number of actually written registers (in case an error occurs, this amount is not the
same as in the request)
Request:
DevAddr 0x10 StAdd H StAdd L # Reg H # Reg L # Bytes Data H Data L
Data H Data L CRC16 L CRC16 H
Response:
DevAddr 0x10 StAdd H StAdd L # Reg H # Reg L CRC16_L CRC16_H
Error:
DevAddr 0x90 Error CRC16_L CRC16_H
Error codes:
2 Illegal data address:
- Undefined starting-address or wrong number of registers
- Start-address not defined (for writing)
3 Illegal data value:
- The amount of data is out of bound
- Byte-Count is not twice the # Reg.
4 Slave Device Failure:
- Attempted to write into a protected register
- The data written is outside the defined data range
Communication protocol Serie30 Page 12/37
4.9 MODBUS Register Map
Process Value Read Range (0x000x):
compatible with Class.Group-Version = 5.20-10.XX and former
format is float according to chapter “6.2 floating-point format IEEE754”, channel error returns NaN, over-/underflow is
represented by +/-infinity
corresponding functionality to Keller Bus functions F73
MODBUS StAdd
(0xHILO)
0x0000 Calculated value (customer specific format) HWord
0x0002 Pressure of sensor1 HWord
0x0004 Pressure of sensor2 HWord
0x0006 Temperature HWord
0x0008 Temperature of sensor1 HWord
0x000A Temperature of sensor2 HWord
Channel Read/
Write
CH0 R ---
P1 R bar
P2 R bar
T R °C
TOB1 R °C
TOB2 R °C
Unit Description
Calculated value (customer specific format) LWord
Pressure of sensor1 LWord
Pressure of sensor2 LWord
Temperature LWord
Temperature of sensor1 LWord
Temperature of sensor2 LWord
Process Value Read Range (0x001x):
compatible with Class.Group-Version = 5.20-10.XX and later (4 instead of 2 byte signed integers)
Overflow returns “2147483647”, an underflow “-2147483648”
format is 4 byte signed integer
corresponding functionality to Keller Bus functions F74
MODBUS StAdd
(0xHILO)
0x0010 Calculated value (customer specific format) HWord
0x0012 Pressure of sensor1 HWord
0x0014 Pressure of sensor2 HWord
0x0016 Temperature HWord
0x0018 Temperature of sensor1 HWord
0x001A Temperature of sensor2 HWord
Channel Read/
Write
CH0 R ---
P1 R 1/100 mbar
P2 R 1/100 mbar
T R 1/100 °C
TOB1 R 1/100 °C
TOB2 R 1/100 °C
Unit Description
Calculated value (customer specific format) LWord
Pressure of sensor1 LWord
Pressure of sensor2 LWord
Temperature LWord
Temperature of sensor1 LWord
Temperature of sensor2 LWord
Process Value Read Range (different mapping) (0x0100):
compatible with Class.Group-Version = 5.20-10.XX and later
format is float according to chapter “6.2 floating-point format IEEE754”, channel error returns NaN, over-/underflow is
represented by +/-infinity
used for accessing data in one cycle (e.g. P1 and TOB1)
MODBUS StAdd
(0xHILO)
0x0100 Pressure of sensor1 [bar] HWord
0x0102 Temperature of sensor1 [°C HWord
0x0104 Pressure of sensor2 [bar] HWord
0x0106 Temperature of sensor2 [°C] HWord
Read/
Write
R P1
R TOB1
R P2
R TOB2
Reg.
Name
DESCRIPTION
Pressure of sensor1 [bar] LWord
Temperature of sensor1 [°C] LWord
Pressure of sensor2 [bar] LWord
Temperature of sensor2 [°C] LWord
Communication protocol Serie30 Page 13/37
Device Configuration Range (0x02xx):
compatible with Class.Group-Version = 5.20-10.XX and later
all registers contain 16 bit [15..8][7..0] (1 register), high byte = 0x00 if not specified differently
corresponding functionality to Keller Bus functions F32, F33, F66 and F69
MODBUS StAdd
(0xHILO)
0x0200 R/W UART UART settings:
0x0201 R FILTER_bck Factory setting for filter value. 0x0202 R S/N-H Serial Number High Bytes 0x0203 R S/N-L Serial Number Low Bytes 0x0204 R CFG_P Active pressure channels (high priority):
0x0205 R CFG_T Active Temperature channels (low priority):
0x0206 R/W CFG_CH0 Calculated channel: Byte value (decimal)
0x0207 R/W CNT_T Temperature measurement interval in seconds. 0x0208 R/W CNT_TCOMP
Read/
Write
Reg.
Name
LP_FILT
DESCRIPTION
Bit 0 .. 3: Baud rate Baud rate Value = 0: 9’600baud Baud rate Value = 1: 115’200baud Bit 4: Parity selection. 0: no Parity, 1: Parity enable Bit 5: Parity mode. 0: odd parity, 1: even parity
Bit 1: P1 Bit 2: P2
Bit 3: T (Temperature sensor) Bit 4: TOB1 (Temperature of pressure sensor P1) Bit 5: TOB2 (Temperature of pressure sensor P2)
0: inactive 1: Difference P1 – P2 2: Difference P2 – P1 3: Square root calculation sqrt(P1) 4: Square root calculation sqrt(P2) 5: Square root calculation sqrt(P1 – P2) 6: Square root calculation sqrt(P2 – P1) 11: Absolute value = |P1| 12: Absolute value = |P1 – P2| 13: Line pressure compensated differential pressure 14: straight line curve fitting of P1
Value of Bit 3 ... 0 (LowNibble): CNT_TCOMP
After CNT_T * CNT_TCOMP seconds a temperature compensation will be performed.
Value of Bit 7 ... 4 (HighNibble): Low pass filter for P1 and P2. LowpassFilter = 2
[B7 ... B4]
The formula for the low pass filter is given as:
where: P
: new filtered value
n+1
: actual measured value
P
n
P
: old filtered value
n-1
0x0209 - - Not used (return 0x0000) 0x020A R/W FILT_CTRL Filter setting for one conversion:
Bit 0: Adaptive filter for P1 and P2 (on / off) Bit 1: Low pass filter for T, TOB1 and TOB2 (on / off) Bit 2 .. Bit 4: Over sampling ration OSR = 2^(8+Bit 2 ... 4) Bit 5 .. 6: Amount of samples per averaging: 0 ..3 = 1, 2, 4 or 8 values. Factory settings see FILTER_ORG.
0x020B R DAC_CTRL Analogue output:
Bit 0: Milli Amperes output (4 .. 20mA) Bit 1: Voltage output Bit 4 = 1: P1 is linked to the analogue output Bit 4 = 0: CH0 is linked to the analogue output
Scaling see function 30/31 0x020C R STATUS Status, the same as the STAT byte from F73. 0x020D R/W DEV_ADDR Device Address 0x020E R Class:Group Firmware-Version
Communication protocol Serie30 Page 14/37
0x020F R Year:Week Firmware-Version
Device Coefficient Range (0x03xx):
compatible with Class.Group-Version = 5.20-10.XX and later
all registers contain 16 bit [15..8][7..0] (1 register)
address is calculated by (0x0300 + 2*{Coeff-No.}). {Coeff-No.} is defined in Function 30.
You must read an even number registers
format is float according to chapter “6.2 floating-point format IEEE754”
Writing only allowed with F16 (write cycle with 2 registers)
corresponding functionality to Keller Bus functions F30 and F31
MODBUS StAdd
(0xHILO)
0x036A R/W 53 bar Threshold value of the root function 0x0380 R/W 64 bar Offset of pressure sensor P1 0x0382 R/W 65 Gain factor of pressure sensor P1 0x0384 R/W 66 bar Offset of pressure sensor P2 0x0386 R/W 67 Gain factor of pressure sensor P2 0x0388 R/W 68 bar Offset of analogue output 0x038A R/W 69 Gain factor of analogue output 0x038C R/W 70 Offset of CH0 0x038E R/W 71 Gain factor of CH0 0x03A0 R 80 bar Minimum pressure of sensor P1 0x03A2 R 81 bar Maximum pressure of sensor P1 0x03A4 R 82 bar Minimum pressure of sensor P2 0x03A6 R 83 bar Maximum pressure of sensor P2 0x03A8 R 84 °C Minimum temperature of temperature sensor 0x03AA R 85 °C Maximum temperature of temperature sensor 0x03AC R 86 °C Minimum temperature of sensor P1 0x03AE R 87 °C Maximum temperature of sensor P1 0x03B0 R 88 °C Minimum temperature of sensor P2 0x03B2 R 89 °C Maximum temperature of sensor P2 0x03B4 R 90 Minimum value of channel CH0 0x03B6 R 91 Maximum value of channel CH0 0x03B8 R 92 bar Pressure for minimum analogue signal * 0x03BA R 93 bar Pressure for maximum analogue signal * 0x03BC R 94 mA, V Minimum analogue signal*,** 0x03BE R 95 mA, V Maximum analogue signal*,**
Read/
Write
Coeff-
No.
Unit DESCRIPTION
* Required for scaling the analogue output (see below) **The information for No. 94 and No. 95 may be in mA or V, according to whether the device possesses a voltage output or a current output (function 100 index 3).
Communication protocol Serie30 Page 15/37
4.10 Device Operation Command List
compatible with Class.Group-Version = 5.20-10.XX and later
Writing only allowed with F16 (write cycle with 2 registers)
This address range is NOT readable
corresponding functionality to Keller Bus function F95
Some bytes of the message are fixed, see following frame layout:
Request:
DevAddr 0x10 0xFF StAdd L 0x00 0x02 0x04 B3 B2
B1 B0 CRC16 L CRC16 H
Response:
DevAddr 0x10 0xFF StAdd L 0x00 0x02 CRC16_L CRC16_H
MODBUS StAdd
(0xHILO)
0xFF00
0xFF02
0xFF04
0xFF06
0xFF08
0xFF0A
0xFF0C
0xFF0E
Read/
Write
W Set Zero P1
W Reset Zero P1
W Set Zero P2
W Reset Zero P2
- -
- -
W Set Zero CH0
W Reset Zero CH0
Reg.
Name
DESCRIPTION
The zero point value from P1 is calculated, that the current measured value equals the
floating point number specified.
Zero Point Value from P1 is set to default (Coeff-No. 64 = 0.0)
The zero point value from P2 is calculated, that the current measured value equals the
floating point number specified.
Zero Point Value from P2 is set to default (Coeff-No. 66 = 0.0)
The zero point value from CH0 is calculated, that the current measured value equals the
floating point number specified.
only available in devices of Class.Group 5.20.
Zero Point Value from CH0 is set to default (Coeff-No. 70 = 0.0)
only available in devices of Class.Group 5.20.
Communication protocol Serie30 Page 16/37
5 Description of Keller bus functions
MJK
This section describes the functions of the bus protocol for Series 30 transmitters (device Class.Group 5.1 and 5.20) using the
MJK -
Keller bus functions (not MODBUS).
Note that all numbers are shown as decimal (not as hex, contradictory to what was described in the MODBUS-chapters)!
Overview:
F30: Read out calibration (scaling) and information floating-point values F31: Write calibration floating-point values F32: Read out configurations F33: Write configurations
F48: Initialise devices, whereby the device ID is returned
F66: Write bus address F69: Read out serial number
F73: Read out current pressure and temperature values in floating-point format
F74: Read out current pressure and temperature values in integer format F95: Zeroing functions
5.1 Example: read pressure value with exception handling
A simple example for reading out
Request P1, funct. 73:
250 73 1 161 167
a pressure value. Because only one transmitter is connected, the „transparent“ address 250 is used. To read out pressure functions 73
Timeout
Transmission error
occured -> Log-File
and 48 are necessary. When the slave replies with error no. 32
Exception
2 or 3
Invalid Channel or
message -> Check
your request
(device just recently started up, power on), then this has to be confirmed with function 48. This is helpful to detect current supply
Exception:
32
Initialize, funct. 48:
250 48 4 67
Initialize: F48
interruptions (on the power supply circuit).
Enhancement:
During start-up the device group
Timeout
Transmission error
occured -> Log-File
can be checked via function F48 to ensure that this version is supported. Further information is available:
Exception:
2
Incorrect length ->
Check your request
F30: pressure and temperature range
F69 serial number
F48: o.k.
Check Staus Byte:
P1, TOB1, /Std:
STAT & 0b10010010 != 0?
Valid Value
received
See chapter:
Error handling and
recognition
Invalid Value
received
Communication protocol Serie30 Page 17/37
Some examples:
Read P1
Read P2 Read TOB1 Initialize
address
250
1 1
250
1 1
request response
250 73 1 161 167 250 73 63 109 186 172 0 26 27 1 73 1 80 214 1 73 63 109 177 83 0 231 97 1 73 2 81 150 1 73 63 109 178 242 0 119 232 250 73 4 162 103 250 73 65 201 184 0 0 224 204 1 73 4 83 22 1 73 65 202 81 128 0 95 54 1 48 52 0 1 48 5 20
received value
0.9286296 bar
0.9284870 bar
0.9285117 bar
25.21484 °C
25.28979 °C FW=5.20-5.50, Buffer=10, device already initialized
5.2 Function 30: Read coefficient
Request:
DevAddr 30 Nr. CRC16_H CRC16_L
Response:
DevAddr 30 B3 B2 B1 B0 CRC16_H CRC16_L
Exception errors:
2 if no. > 111 3 if message length incorrect 32 if device is not yet initialised
Note:
Every coefficient can be read in IEEE754 format (floating-point format 4-byte B0 .. B3) via this function. Æ Information on IEEE754: see appendix.
5.2.1 Calibration values
No. Description of coefficient Unit
53 Threshold value of the roof function bar 64 Offset of pressure sensor P1 bar 65 Gain factor of pressure sensor P1 66 Offset of pressure sensor P2 bar 67 Gain factor of pressure sensor P2 68 Offset of analogue output bar 69 Gain factor of analogue output 70 Offset of CH0 71 Gain factor of CH0 72 Upper threshold value for switching output 1** 73 Lower threshold for switching output 1** 78 Upper threshold value for switching output 2** 79 Lower threshold for switching output 2**
100… 111 free coefficients for customer use
** no longer supported for devices 5.20-10.XX and newer.
The calibration values can be read and written.
Communication protocol Serie30 Page 18/37
Loading...
+ 25 hidden pages