Katronic Technologies Modbus Module Operating Instruction V 4.21
Katronic Technologies Modbus Module Operating Instruction V 4.21
VERSION 4.21
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
1.0 Introduction
Modbus slave functionality has been implemented for the Katronic range of flowmeters with the
development of a Modbus RTU RS485 plug in module.
The flowmeter acts as a slave on the Modbus with an address programmable between 1 and 247.
1.1 Mode
The Modbus RTU protocol is implemented by simply fitting the plug in module in the flowmeter.
Connection to the 2 wire bus is via the screw terminals corresponding to the slot in which the
module is fitted.
Terminal 3 is A and terminal 4 is B, but users should be aware that there is no industry-wide
convention on polarity and receiving devices may use the opposite terminal labelling.
Note, this is not to be confused with the flowmeters integral RS485 straight through connections
which form a separate serial communication channel.
The RS485 baud rate can be selected using the flowmeter HMI.
• 9600
• 19200 (Default)
If the Flowmeter slave is configured from the HMI for any other available serial baud rate then the
Modbus link defaults to 19200.
1.3 Parity
• None
• Odd
• Even (Default)
If parity is set at None then the bus master must be configured for 2 Stop bits.
If parity is set to be Odd or Even then the bus master must be configured for 1 Stop bit.
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
1.4 Modbus Address
A Modbus slave address is required for the flowmeter. This address is programmable from 1 to
247. Every device on a Modbus must have a different address in order for the bus to work
correctly.
RS485 serial data is 8 bit. The number of data bits cannot be modified.
In the flowmeter memory each Modbus register is a 16 bit word, consisting of two 8 bit bytes.
The register data in the Modbus messages are packed as 2 bytes per register, with the binary
contents right justified in each byte. For each register the first byte contains the high order bits
and the second contains the low order bits.
A floating point number is stored as 32 bits spanning 4 bytes and therefore occupies 2 Modbus
registers.
A Unicode character is stored as 16 bits spanning 2 bytes and therefore occupies 1 Modbus
register. The Unicode characters are not encoded.
Internally Katronic flowmeters store floating point values in IEEE 754 single precision format.
The user can access each floating point value from 4 different register tables. Each register table
represents a different byte order.
By reading the first register of each table the user can determine which format suites his system
when the fixed test value of 1234.56 is recognised.
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
2.0 Modbus Commands
The Katronic Modbus RTU module has implemented Modbus commands 04, 06 and 08, see table
1.
This function code is used to read from 1 to 125 contiguous input registers from the flowmeter.
Registers are addressed starting at zero. Therefore input registers numbered 1-16 are addressed
as 0-15.
Remember that each float occupies 2 registers (section 1.6) so this command returns the first 17
floating point values for channel 1, with the default byte order 1,0,3,2. The start address is
decimal 0 (table 0x0000) plus 0 (section 1.7).
This command returns the first 17 floating point values for channel 1, with byte order 2,3,0,1. The
start address is decimal 12288 (table 0x3000) plus 0.
This command returns all 45 floating point values for channel 2, with byte order 2,3,0,1. The start
address is decimal 12288 (table 0x3000) plus 256.
This command returns the first 17 floating point values for channel 2, with the default byte order
1,0,3,2. The start address is decimal 0 (table 0x0000) plus 256.
• Model Code
• Serial Number
• Tag number
• Identifier
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
Text is 16 bit Unicode, they are not encoded.
See table 2 for a complete list of registers and the data available for reading.
The user specifies an address and 16 bit data value for write.
This command zeroes the channel 1 positive totaliser. See section 3.0 below for a complete list of
registers available for control of flowmeter totalisers.
See table 2 for a complete list of registers available for writing to.
2.3 Diagnostics 08
Modbus defines a list of diagnostic counters to allow performance and error management.
These counters are accessible using the Modbus Diagnostics function code 08 followed by a sub
function code.
All counters and the diagnostic register can be cleared using the sub function code 0x0A.
See table 3 for a list of diagnostics and associated sub function codes.
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
3.0 Flowmeter flow totalisers
The user can write values to registers 600001 and 60002 to zero the individual flow totalisers on
the flowmeter.
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
4.0 Broadcast address
In broadcast address mode the master can send a command to all slaves.
Care should be taken when using broadcast address 0. For example, sending a general command
06 to one slave would also reset the totalisers on a Katronic flowmeter.
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
Table 1 Katronic Communications Command Structure
Diagnostics COMMAND
Slave ID (1 byte)
Function (1 byte=08H)
Sub function (2 bytes)
Hex Data (2 bytes)
CRC code (2 bytes)
Response
Slave ID (1 byte)
Function (1 byte)
Sub Function (2 bytes)
Hex Data (2 bytes)
CRC code (2 bytes)
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
Table 2 Register Map
Hex
Modbus
Modbus Variables # Bytes Format
Address
Address
40001 0000 Fixed test value 1234.56 4 IEEE
40002 0001
40003 0002 Channel1 flow velocity m/s 4 IEEE
40004 0003
40005 0004 Channel1 flow volumetric m3/s 4 IEEE
40006 0005
Channel1 Totaliser+ flow
40007 0006 4 IEEE
volumetric m3
40008 0007
Channel1 Totaliser- flow
40009 0008 4 IEEE
volumetric m3
40010 0009
40011 000A Channel1 flow Mass Kg/min 4 IEEE
40012 000B
Channel1 Totaliser+ flow Mass
40013 000C 4 IEEE
Kg
40014 000D
Channel1 Totaliser- flow Mass
40015 000E 4 IEEE
Kg
40016 000F
40017 0010 Channel1 HQM Watts 4 IEEE
40018 0011
Channel1 Totaliser+ HQM
40019 0012 4 IEEE
Joules
40020 0013
Channel1 Totaliser- HQM
40021 0014 4 IEEE
Joules
40022 0015
40023 0016 Channel1 Temperature in C 4 IEEE
40024 0017
40025 0018 Channel1 Temperature out C 4 IEEE
40026 0019
40027 001A Channel1 SOS m/s 4 IEEE
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
40028 001B
40029 001C Channel1 Signal strength dB 4 IEEE
40030 001D
40031 001E Channel1 Signal noise dB 4 IEEE
40032 001F
40033 0020 Pressure Pa 4 IEEE
40034 0021
40035 0022 Other 4 IEEE
40036 0023
40037 0024 Battery Level V 4 IEEE
40038 0025
Channel1 Missed
40039 0026 4 IEEE
measurements
40040 0027
40041 0028 Channel1 flow velocity f/s 4 IEEE
40042 0029
40043 002A Channel1 flow velocity in/s 4 IEEE
40044 002B
40045 002C Channel1 flow volumetric m3/h 4 IEEE
40046 002D
Channel1 flow volumetric
40047 002E 4 IEEE
m3/min
40048 002F
40049 0030 Channel1 flow volumetric l/h 4 IEEE
40050 0031
40051 0032 Channel1 flow volumetric l/min 4 IEEE
40052 0033
40053 0034 Channel1 flow volumetric l/s 4 IEEE
40054 0035
Channel1 flow volumetric
40055 0036 4 IEEE
Usgall/h
40056 0037
Channel1 flow volumetric
40057 0038 4 IEEE
Usgall/min
40058 0039
Channel1 flow volumetric
40059 003A 4 IEEE
Usgall/s
40060 003B
Channel1 flow volumetric
40061 003C 4 IEEE
bbl/d
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
40062 003D
40063 003E Channel1 flow volumetric bbl/h 4 IEEE
40064 003F
Channel1 flow volumetric
40065 0040 4 IEEE
bbl/min
40066 0041
40067 0042 Channel1 flow volumetric g/s 4 IEEE
40068 0043
40069 0044 Channel1 flow volumetric t/h 4 IEEE
40070 0045
40071 0046 Channel1 flow volumetric kg/h 4 IEEE
40072 0047
40073 0048 Channel1 flow volumetric m3 4 IEEE
40074 0049
40075 004A Channel1 flow volumetric l 4 IEEE
40076 004B
Channel1 flow volumetric
40077 004C 4 IEEE
Usgall
40078 004D
40079 004E Channel1 flow volumetric bbl 4 IEEE
40080 004F
40081 0050 Channel1 flow volumetric g 4 IEEE
40082 0051
40083 0052 Channel1 flow volumetric t 4 IEEE
40084 0053
40085 0054 Channel1 flow volumetric kg 4 IEEE
40086 0055
40087 0056 Channel1 HQM kW 4 IEEE
40088 0057
40089 0058 Channel1 HQM MW 4 IEEE
40090 0059
40091 005A Channel1 HQM J 4 IEEE
40092 005B
40093 005C Channel1 HQM kJ 4 IEEE
40094 005D
40095 005E Channel1 HQM MJ 4 IEEE
40096 005F
40097 0060 SPARE
40098 0061 SPARE
40099 0062 SPARE
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
40100 0063 SPARE
40101 0064 SPARE
40102 0065 SPARE
40103 0066 SPARE
40104 0067 SPARE
40105 0068 SPARE
40106 0069 SPARE
40107 006A SPARE
40108 006B SPARE
40109 006C SPARE
40110 006D SPARE
40111 006E SPARE
40112 006F SPARE
40113 0070 SPARE
40114 0071 SPARE
40115 0072 SPARE
40116 0073 SPARE
40117 0074 SPARE
40118 0075 SPARE
40119 0076 SPARE
40120 0077 SPARE
40121 0078 SPARE
40122 0079 SPARE
40123 007A SPARE
40124 007B SPARE
40125 007C SPARE
40126 007D SPARE
40127 007E SPARE
40128 007F SPARE
40129 0080 SPARE
40130 0081 SPARE
40131 0082 SPARE
40132 0083 SPARE
40133 0084 SPARE
40134 0085 SPARE
40135 0086 SPARE
40136 0087 SPARE
40137 0088 SPARE
40138 0089 SPARE
40139 008A SPARE
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
40140 008B SPARE
40141 008C SPARE
40142 008D SPARE
40143 008E SPARE
40144 008F SPARE
40145 0090 SPARE
40146 0091 SPARE
40147 0092 SPARE
40148 0093 SPARE
40149 0094 SPARE
40150 0095 SPARE
40151 0096 SPARE
40152 0097 SPARE
40153 0098 SPARE
40154 0099 SPARE
40155 009A SPARE
40156 009B SPARE
40157 009C SPARE
40158 009D SPARE
40159 009E SPARE
40160 009F SPARE
40161 00A0 SPARE
40162 00A1 SPARE
40163 00A2 SPARE
40164 00A3 SPARE
40165 00A4 SPARE
40166 00A5 SPARE
40167 00A6 SPARE
40168 00A7 SPARE
40169 00A8 SPARE
40170 00A9 SPARE
40171 00AA SPARE
40172 00AB SPARE
40173 00AC SPARE
40174 00AD SPARE
40175 00AE SPARE
40176 00AF SPARE
40177 00B0 SPARE
40178 00B1 SPARE
40179 00B2 SPARE
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
40180 00B3 SPARE
40181 00B4 SPARE
40182 00B5 SPARE
40183 00B6 SPARE
40184 00B7 SPARE
40185 00B8 SPARE
40186 00B9 SPARE
40187 00BA SPARE
40188 00BB SPARE
40189 00BC SPARE
40190 00BD SPARE
40191 00BE SPARE
40192 00BF SPARE
40193 00C0 SPARE
40194 00C1 SPARE
40195 00C2 SPARE
40196 00C3 SPARE
40197 00C4 SPARE
40198 00C5 SPARE
40199 00C6 SPARE
40200 00C7 SPARE
40201 00C8 SPARE
40202 00C9 SPARE
40203 00CA SPARE
40204 00CB SPARE
40205 00CC SPARE
40206 00CD SPARE
UNICOD
40207 00CE IDENTIFICATION STRING 2
E
UNICOD
40208 00CF IDENTIFICATION STRING 2
E
UNICOD
40209 00D0 IDENTIFICATION STRING 2
E
UNICOD
40210 00D1 IDENTIFICATION STRING 2
E
UNICOD
40211 00D2 IDENTIFICATION STRING 2
E
UNICOD
40212 00D3 IDENTIFICATION STRING 2
E
40213 00D4 IDENTIFICATION STRING 2 UNICOD
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
E
UNICOD
40214 00D5 IDENTIFICATION STRING 2
E
UNICOD
40215 00D6 IDENTIFICATION STRING 2
E
UNICOD
40216 00D7 IDENTIFICATION STRING 2
E
UNICOD
40217 00D8 IDENTIFICATION STRING 2
E
UNICOD
40218 00D9 IDENTIFICATION STRING 2
E
UNICOD
40219 00DA IDENTIFICATION STRING 2
E
UNICOD
40220 00DB IDENTIFICATION STRING 2
E
UNICOD
40221 00DC IDENTIFICATION STRING 2
E
UNICOD
40222 00DD IDENTIFICATION STRING 2
E
UNICOD
40223 00DE IDENTIFICATION STRING 2
E
UNICOD
40224 00DF IDENTIFICATION STRING 2
E
UNICOD
40225 00E0 IDENTIFICATION STRING 2
E
UNICOD
40226 00E1 IDENTIFICATION STRING 2
E
UNICOD
40227 00E2 IDENTIFICATION STRING 2
E
UNICOD
40228 00E3 IDENTIFICATION STRING 2
E
UNICOD
40229 00E4 IDENTIFICATION STRING 2
E
UNICOD
40230 00E5 IDENTIFICATION STRING 2
E
UNICOD
40231 00E6 IDENTIFICATION STRING 2
E
UNICOD
40232 00E7 IDENTIFICATION STRING 2
E
UNICOD
40233 00E8 IDENTIFICATION STRING 2
E
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
UNICOD
40234 00E9 IDENTIFICATION STRING 2
E
UNICOD
40235 00EA IDENTIFICATION STRING 2
E
UNICOD
40236 00EB IDENTIFICATION STRING 2
E
UNICOD
40237 00EC IDENTIFICATION STRING 2
E
UNICOD
40238 00ED IDENTIFICATION STRING 2
E
UNICOD
40239 00EE IDENTIFICATION STRING 2
E
UNICOD
40240 00EF IDENTIFICATION STRING 2
E
UNICOD
40241 00F0 IDENTIFICATION STRING 2
E
UNICOD
40242 00F1 IDENTIFICATION STRING 2
E
UNICOD
40243 00F2 IDENTIFICATION STRING 2
E
UNICOD
40244 00F3 IDENTIFICATION STRING 2
E
UNICOD
40245 00F4 IDENTIFICATION STRING 2
E
UNICOD
40246 00F5 IDENTIFICATION STRING 2
E
UNICOD
40247 00F6 IDENTIFICATION STRING 2
E
UNICOD
40248 00F7 IDENTIFICATION STRING 2
E
UNICOD
40249 00F8 IDENTIFICATION STRING 2
E
UNICOD
40250 00F9 IDENTIFICATION STRING 2
E
UNICOD
40251 00FA IDENTIFICATION STRING 2
E
UNICOD
40252 00FB IDENTIFICATION STRING 2
E
UNICOD
40253 00FC IDENTIFICATION STRING 2
E
40254 00FD IDENTIFICATION STRING 2 UNICOD
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
E
UNICOD
40255 00FE IDENTIFICATION STRING 2
E
UNICOD
40256 00FF IDENTIFICATION STRING 2
E
40257 0100
TO Channel 2 same as channel 1
40511 01FF
16 BIT
60001 0000 Channel 1 Totaliser reset 2
INT
16 BIT
60002 0001 Channel 2 Totaliser reset 2
INT
16 BIT
60003 0002 SPARE 2
INT
16 BIT
60004 0003 SPARE 2
INT
16 BIT
60005 0004 SPARE 2
INT
16 BIT
60006 0005 SPARE 2
INT
16 BIT
60007 0006 SPARE 2
INT
16 BIT
60008 0007 SPARE 2
INT
16 BIT
60009 0008 SPARE 2
INT
16 BIT
60010 0009 SPARE 2
INT
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com
Table 3 Modbus diagnostic functions
The following standard Modbus diagnostic functions are available for use;
All counters and the diagnostic register can be cleared using the sub function code 0x0A.
The following example sends command 08, sub function 00 with data 0xFFFF to Modbus device
address 01. The CRC is 0xE1BB. The flowmeter simply mirrors the message back in response.
Send 01,08,00,00,FF,FF,E1,BB
Response 01,08,00,00,FF,FF,E1,BB
The following example sends command 08, sub function 04 with data 0x0000 to Modbus device
address 01. The CRC is 0xA1CA. The flowmeter does not reply.
Send 01,08,00,04,00,00,A1,CA
Response None
Katronic Technologies Ltd. Tel. +44 (0)2476 714 111 VAT No. GB 688 0907 89 Cert. No. GB03/58999
Earls Court, Warwick Street Fax +44 (0)2476 715 446 Registered in England No. 3298028
Coventry CV5 6ET [email protected] Registered office as shown
United Kingdom www.katronic.com