IFC 300
Supplementary Handbook
Signal converter with
Modbus interface for OPTIFLUX electromagnetic flowmeters
Modbus ER ( SW.REV.3.2.x )
Modbus version 1.1.x
Subject to change without notice.
KROHNE 09 / 2008
IFC 300 Modbus
Content
1 Important
information 3 2 Technical
data 3
3 Connection of instruments in bus system 4
4 Electrical
connection 4 5 Modbus protocol 5 – 16 5.1 General 5 5.2 RTU Frame format 5 5.3 Overview of supported function 6 5.4 Device identification on the Modbus interface 6 5.5 Coil
registers 7 5.5.1 GDC Controls 7 5.5.2 Start calibration function 7 5.5.3 Counter controls 7 5.6 Input
registers 8 5.7 Holding registers 9 – 12 5.7.1 Counter parameters 9 – 10 5.7.2 Process input filter parameters 11 – 12 5.7.3 Modbus parameters 12 5.8 Calibration procedures 13 – 15 5.8.1 Zero flow calibration 13 5.8.2 Coil temperature calibration 14 5.8.3 Conductivity calibration 15
5.9 Diagnostics 16
6 Form (for copying) to accompany a returned instrument 19 1 Important
information
The flow converter with the RS 485 interface card fitted, is able to communicate with an external device (PC or other suitable computer system) using the Modbus protocol. This option allows data exchange between PC or computer and single or multiple devices.
The bus configuration consists of one external device as a master and one or more converters as slaves. For bus operation the device address (menu C5.8.1), baud rate (menu C5.8.2) and ttings (menu C5.8.3, C5.8.4 & C5.8.5) must be t in the converter. All devices connected to the bus, must have different unique address but the same baud rate and ttings.
2 Technical
data
Interface RS 485, galvanically isolated
Baud rate 1200, 2400, 4800, 9600, 19200, 38400, 57600 or
115200 baud
Protocol Modbus
RTU
(available as a parate document on request) Maximum participants on Bus 32 per line, master included
(may be extended by repeaters)
Coding NRZ bit coding
Address range Modbus: 1 (247)
Transmission procedure Half duplex, asynchronous
Bus access Master / slave
Cable Screened twisted pair cable
Distances Maximum 1.2 km without repeater.
(dependant on baud rate and cable specifications)
Technical data of the Modbus interface (according to EIA standards)
Kind of signal transmission Differential
轮子妈皮肤
Maximum number of transmitter/receivers 32
堆积地貌
Maximum voltage on driver output -7 … +12 V
Minimum voltage on driver output, max. load U diff > 1,5 V
Maximum input current (off state) -20 … +20 µA
Receiver input voltage -7 V … +12 V
Sensitivity of the receiver -200 … +200 mV
Receiver input resistance > 12 kOhm
Short circuit current of transmission < 250 mA
3 Connection of instruments in bus systems
Network Biasing Resistors
For proper operation of Modbus in half duplex mode in single or multi-drop communication, it is recommended that a termination resistor (typically 120 ohm) is
applied to both ends of the data line. The simplest form of termination is line-to-line
resistor across the differential input.
In RTU mode the Modus protocol requires quiet periods on the communications bus for synchronisation. It is therefore important that the Modbus is not allowed to ‘float’, i.e. unreferenced to 0V, as this could lead to spurious signals due to noi pick-up. It is therefore necessary to employ biasing resistors at one point on the bus network,
normally the “end”.
The Modbus converter has two conditions. Default is without termination. To get the
active termination the ttings of jumper X5 and X6 on Modbus board must be changed then, e below.
4 Electrical
connection
Terminals A and B of the converter are dependant on the options lected at order.
Refer to the Standard Handbook of the converter for connection details.
Modbus connections
Terminals Description
D- Signal A (D 0)
D Signal B (D 1)
C- Common 0 V
C Not connected
Jumper ttings on the Modbus printed circuit board
Jumper
position
Description
X5 X6
1 -
2 1 – 2with termination
2 -
3 2 - 3without termination 5 Modbus
protocol
5.1 General
Using RTU (Remote Terminal Unit) format, data is transmitted as 8 bit binary characters. There are no special characters to determine the start and end of a message frame, synchronization is achieved by a minimum silent period of at least 3.5 character times before the start of each frame transmission and a maximum silent period of 1.5 character times between characters in the same frame.
5.2 RTU Frame format
The format of the Query and Respon frames vary slightly depending upon the command function. The basic form is outlined below.
Silent
Period
Slave
Address
Function
Code
Register Start Address or
Byte Count when required
No.of.Points or
Data bytes when required
CRC
3.5 T 8 bits 8 bits
8 bit byte count
16 bit address
n × 8 bits 16 bits Silent period
All transmissions must be preceded by a minimum silent period of 3.5×T, where T is the transmission time of a single character. This can be calculated from the baud at 19.2 kb no parity with 1 stop bit (10 bits), T = 520 µs.
Slave address
This is a single byte slave address which is transmitted first and must be in the range of 1-247. Address 0 is rerved for a broadcast address which all slaves should recognize, and therefore requires no respon.
Function code
This is an eight bit code in the range of 1 … 255 although only 126 functions exist as the codes 129-255 reprent an error condition. An error condition occurs
when the addresd slave does not accept the command, in which ca it responds with the function code + 128, i.e. with its MSB t to 1.
Byte count
In general this is only prent in frames that are transferring data, and has a value equal to the number of bytes contained in the data field.
The data field is limited to a maximum of 250 bytes.
Register start address
For a query command that requires data to be returned, this field will contain the 16 bit start address of the register (or data) to be returned. Note that the converter us protocol address. Therefore the register address listed is the actual number required in the Modbus command. E.g: To access input register 30006, the register start address is 30006dec = 7536hex
Number of points
For a query command that requires data to be returned, this field will contain the number of registers to be returned regardless of their bit size.
Data bytes
Contains the data requested. The converter can u big endian format (MSB first) or little endian format (LSB first).
CRC
This field contains a 16 bit CRC which is calculated on all the data bits of the message bytes.
5.3 Overview of supported functions
The following table shows MODBUS functions supported by RS485 interface
Function code hex dec Name Access
to
01 01 Read Single Coil Status of calibration functions, Counter status (Start/Stop)
03 03 Read Holding Register Cyclic Register
04 04 Read Input Register Acyclic Register
05 05 Write Single Coil
Cold Start, Warm Start, Error Ret, Start calibration function, Start / Stop Counter
08 08 Diagnostics
10 16 Writ Multiple Register Acyclic Register
2B 43 Encapsulated Interface
Transport
Transparent Channel, Read
Device Identification
5.4 Device
Identification
The device identification is according to the category regular according to the MODBUS Application Protocol Specification V1.1a. Function code 43 / 14 (0x2B / 0x0E).
Device identification on the Modbus interface
Modbus
Object Id
Object name / Description Type Content converter
0x00 VendorName 16 Byte
ASCII String
KROHNE
0x01ProductCode
10 Byte
ASCII String
CG number
production
0x02MajorMinorRevision
7 Byte
ASCII String
V1.1.00
0x03Vendor URL
32 Byte
ASCII String
0x04ProductName
16 Byte
ASCII String
Converter
0x05ModelName
16 Byte六禁
ASCII String
Modbus
0x06UrApplicationName
16 Byte
ASCII String
ur tag, displayed on
the header of the
local screen
5.5 Coil
registers
The function codes are ud for access: 0x01 = read input coil
0x05 = write single coil
Abreviations in the following tables
GDC General Device Concept
cnt counter
5.5.1 GDC
律学
Controls
Coil address Function
1000 write 1 generates a GDC cold start, write of 0 is ignored
1001 write 1 generates a GDC warm start, write 0 is ignored
1002 write 1 generates a GDC error ret, write 0 is ignored
5.5.2 Start calibration functions
Modbus
protocol
address
Description Settings
Converter
Fct. No.
2000 Zero
calibration C1.1.1
2001 Coil temperature calibration C1.1.8
2002 Electrode factor calibration
write 1 = start function
0 = -
肖像摄影read 0 = - C1.1.11
5.5.3 Counter
controls
Modbus
protocol
address
Description Settings
Converter
Fct. No.
3000 Start / Stop Counter 1
C3.1.8 /
C3.1.9
3001 Start / Stop Counter 2
C3.2.8 /
C3.2.9
3002 Start / Stop Counter 3
write:
read
:
1 = start counter
0 =stop counter
1 = cnt is running
0 = cnt is stopped C3.3.8 /
C3.3.9
3003 Ret
Counter
1 C3.1.6
3004 Ret
Counter
2 C3.2.6
3005 Ret
Counter
3
write:
read:
1 = ret counter
0 = -
0 = - C3.3.6
5.6 Input
registers
Measurement and status values are read only and can be accesd as
Modbus "Input Registers".
Cyclic GDC objects are mapped to Modbus Registers.
Also the result of a calibration procedure is accesd by an input register at Modbus Protocol Address 20000. The type are one or more float values.
Function code is 04 (0x04).
Modbus protocol address Description and
Settings
Type
钢琴曲轻音乐Number
of
registers
30000 Flow speed [m/s] float 2 30002 Volume flow [m³/s] float 2 30004 Mass flow [kg/s] float 2 30006 Coil temperature [K] float 2
30008 Conductivity [S/m]
This value may not be measured.
Depending on register 31200.
0 = off (not measured)
1 = conductivity [S/m]
2 = conductivity + empty pipe (S) [S/m]
2 = conductivity + empty pipe (F) [S/m]
float 2
30010 Diagnosis value
This value may not be measured.
Depending on register 31216.
25 = off (not measured)
31 = electrode noi [m/s]
28 = flow profile [no unit]
21 = linearity [no unit]
8 = terminal 2 DC [Volt]致士
9 = terminal 3 DC [Volt]
float 2
30012 Display channel 1
Reprents the value on the first line of the first
measurement screen in SI units
float 2
30014 Display channel 2
Reprents the value on the first line of the cond
measurement screen in SI units
float 2
30016 Operating time [s] float 2 30018 not ud, returns zero float 2
30020 Counter 1 [m³] or [kg] double
float
4
30024 Counter 2 [m³] or [kg] double
float
4小乌鸦爱妈妈
30028 Counter 3 [m³] or [kg]
(This counter is only available for converter with IO 2)
double
float
4
30032 Long status nsor byte [4] 2 30034 Long status device byte [4] 2 5.7 Holding
registers
Some parameters of the device can be accesd as Modbus holding registers. The registers are mapped to acyclic GDC objects.
Function code 03 (0x03) for read operations and
function code 16 (0x10) for write operations.
The holding registers are grouped into different ctions:
5.7.1 Counter
parameters
Modbus
protocol
address
Description and
Settings
Converter
Fct. No.
Type Number of registers 40000
Counter 1 function
1 = sum counter
2 = + counter
3 = - counter
0 = off
C3.1.1 byte 1 40001
Measurement Cnt 1
21 = volume flow
22 = mass flow
C3.1.2 byte 1 40002
Counter 2 function,
1 = sum counter
2 = + counter
3 = - counter
0 = off
C3.2.1 byte 1 40003
Measurement Cnt 2
21 = volume flow
22 = mass flow
C3.2.2 byte 1 40004
Counter3 function,
1 = sum counter
2 = + counter
3 = - counter
0 = off
C3.3.1 byte 1 40005
Measurement Cnt 3
21 = volume flow
22 = mass flow
C3.3.2 byte 1