KROHNE UFC 400 Operating Manual

4.5 (2)
KROHNE UFC 400 Operating Manual

UFC 400 Supplementary instructions

Signal converter for ultrasonic flowmeters

Description of Modbus interface

Electronic Revision: ER 2.2.0_

Modbus version: 2.1.0_

© KROHNE 05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

 

CONTENTS

UFC 400

 

 

 

 

 

 

 

1 General information

4

 

 

 

1.1

Scope of the document.....................................................................................................

4

1.2

Scope of delivery...............................................................................................................

4

1.3

Modbus protocol interface ...............................................................................................

4

2 Technical data

5

 

 

 

2.1

General technical data .....................................................................................................

5

2.2

Technical data of the Modbus interface (acc. to EIA/TIA standards) ..............................

5

3 Electrical connections

6

 

 

 

3.1

Modbus connection...........................................................................................................

6

3.2

Connection to Modbus bus ...............................................................................................

6

4 Establish RS485 connection

7

 

 

5 Modbus protocol

8

 

 

 

5.1

RTU frame format.............................................................................................................

8

5.2

Data representation .........................................................................................................

9

5.2.1

8-bit values..............................................................................................................................

9

5.2.2

16-bit values............................................................................................................................

9

5.2.3

32-bit values............................................................................................................................

9

5.2.4

64-bit values..........................................................................................................................

10

5.3

Modbus Register Addresses ..........................................................................................

11

5.4

Supported Function Codes .............................................................................................

11

5.5

Error messages..............................................................................................................

11

5.6

Device identification .......................................................................................................

12

5.7

Diagnostics .....................................................................................................................

13

5.8

Parameters.....................................................................................................................

13

5.8.1 Device Control.......................................................................................................................

14

5.8.2 Device Status.........................................................................................................................

14

5.8.3 Measurement values ............................................................................................................

15

5.8.4 Measurement Status compliant with NAMUR NE 107 .........................................................

15

5.8.5

Auxiliary Values.....................................................................................................................

16

5.8.6

Totaliser ................................................................................................................................

17

5.8.7 Zero Calibration ....................................................................................................................

19

5.8.8 Process Input Parameters....................................................................................................

20

5.8.9 Modbus RS485 Communication Settings .............................................................................

21

5.8.10 NAMUR NE 107 Variable Event Group(s)............................................................................

22

6 Application sequences

23

 

 

 

6.1

Saving and restoring the configuration setting .............................................................

23

6.2

Zero Calibration..............................................................................................................

24

2

www.krohne.com

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

UFC 400

 

CONTENTS

7 Troubleshooting

25

7.1

No response to Modbus requests ..................................................................................

25

7.2

Communication errors ...................................................................................................

25

7.3

Responding with exception "Illegal Function"...............................................................

25

7.4

Responding with exception "Illegal Data Address" .......................................................

26

7.5

Responding with exception "Illegal Data Value"............................................................

26

8 Appendix

27

8.1

NAMUR NE 107 Event Group(s)......................................................................................

27

8.2

NAMUR NE 107 status signals .......................................................................................

28

8.3

Supported Modbus function codes.................................................................................

28

8.4

Number format...............................................................................................................

31

8.5

Glossary ..........................................................................................................................

31

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

www.krohne.com

3

1 GENERAL INFORMATION

 

 

UFC 400

 

 

 

 

1.1 Scope of the document

These instructions are supplementary to the signal converter handbook. For all other data, use the relevant chapters of the handbook. If you do not have this document, please contact the nearest office or download them from the manufacturer's internet site.

1.2 Scope of delivery

The information in this supplementary manual only contains the data applicable to MODBUS communication.

The technical data in the handbook shall be valid in its current version, provided that it is not rendered invalid or replaced by this supplement.

1.3 Modbus protocol interface

The Modbus interface to the signal converter is implemented in the Modbus RTU communications protocol and is done in accordance with the specification and requirements of the "Modbus Protocol Specification V1.1b".

The physical electrical parameters of the Modbus specification are defined by the EIA/TIA-485 (RS485) standard and the "Modbus over Serial Line - Specification and Implementation Guide V1.02".

Both specifications can be obtained on the official website of the Modbus organisation:

http://www.modbus.org

4

www.krohne.com

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

 

 

 

 

TECHNICAL DATA 2

 

UFC 400

 

 

2.1 General technical data

 

 

 

 

 

 

 

 

 

 

 

Interface

RS485, galvanically isolated

 

 

 

 

 

 

Baud rate

1200, 2400, 3600, 4800, 9600, 19200, 38400, 57600 or

 

 

 

115200 bps

 

 

 

 

 

 

Protocol

Modbus RTU (available as a separate document on request)

 

 

 

 

 

 

Maximum participants on bus

32 per line, master included (may be extended by repeaters)

 

 

 

 

 

 

Coding

NRZ bit coding

 

 

 

 

 

 

 

Address range

1...247

 

 

 

 

 

 

 

Transmission procedure

Half duplex, asynchronous

 

 

 

 

 

 

Bus access

Master / slave

 

 

 

 

 

 

Cable

Screened twisted pair

 

 

 

 

 

 

Distances

Maximum 1.2 km / 3937 ft without repeater (dependant on

 

 

 

baud rate and cable specifications)

 

 

 

 

 

2.2 Technical data of the Modbus interface (acc. to EIA/TIA standards)

Kind of signal transmission

Differential, 2-wire topology

 

 

Maximum number of

32

transmitter/receivers

 

 

 

Voltage range on converter input

-7...+12 V

 

 

Maximum voltage on converter output

5 V

 

 

Minimum voltage on driver output, max.

Udiff > 1.5 V

load

 

Maximum input current (off state)

-20...+20 μA

 

 

Receiver input voltage

-7...+12 V

 

 

Sensitivity of the receiver

-200...+200 mV

 

 

Receiver input resistance

> 12 kΩ

 

 

Short circuit current

< 250 mA

 

 

Termination / polarization resistors

120 Ω / 560 Ω

(if activated by factory)

 

 

 

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

www.krohne.com

5

3 ELECTRICAL CONNECTIONS

 

 

UFC 400

 

 

 

 

3.1 Modbus connection

The signal converter is hooked up onto the bus using terminals C and D:

Terminals

Description

 

 

D-

Signal A (D 0)

 

 

D

Signal B (D 1)

 

 

C-

Common 0 V

 

 

C

Not connected

 

 

Terminals A and B of the signal converter are dependant on the options selected at order. Refer to the standard handbook of the signal converter for connection details.

3.2 Connection to Modbus bus

The signal converter is designed to be connected as a slave device onto the 2-wire bus implementation of the Modbus serial physical layer definition.

In addition to the D0 and D1 signal lines the bus MUST include a "Common" signal line to act as a ground reference point for the data signals.

For proper operation of Modbus in half duplex mode in single or multi-drop communication, it is recommended that a termination resistor 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 0 V, as this could lead to spurious signals due to noise pick-up. It is therefore necessary to employ biasing resistors at one point on the bus network.

6

www.krohne.com

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

 

 

ESTABLISH RS485 CONNECTION 4

 

UFC 400

 

 

 

To establish a RS485 connection with the signal converter, prepare the master device with the appropriate default settings or use custom parameters specified via display of the signal converter.

The Modbus RS485 settings can be found in the menu C5.8 of the display. The following parameters can be configured:

Parameter

Legal values

Default values

Display Fct. No.

 

 

 

 

Slave address

1...247

1

C5.8.1

 

 

 

 

"Baude rate"

1200, 2400, 3600, 4800, 9600,

19200 bps

C5.8.2

 

19200, 38400, 57600, 115200

 

 

 

bps

 

 

 

 

 

 

Parity

Even, Odd, No

Even Parity

C5.8.3

 

 

 

 

Data format

Big Endian, Little Endian

Big Endian

C5.8.4

 

 

 

 

Transmission

0...0.04 [s]

0 s

C5.8.5

delay

 

 

 

 

 

 

 

Stop Bits

1 Stop Bit, 2 Stop Bits

1 Stop Bit

C5.8.6

 

 

 

 

These settings can be changed via Modbus too. For further information refer to Modbus RS485 Communication Settings on page 21.

All devices connected to the bus, must have the same baud rate.

INFORMATION!

It is of great importance to ensure at the time of the procedure of devices addressing, that there are not two devices with the same address. In such a case, an abnormal behaviour of the whole serial bus can occur. It is then impossible for the master to communicate with all present slaves on the bus.

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

www.krohne.com

7

5 MODBUS PROTOCOL

5.1 RTU frame format

UFC 400

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.

The format of the query and response frames vary slightly depending upon the function code. The basic form is outlined below.

Command function

Frame format

Description

 

 

 

Silent period

3.5 x T

All transmissions must be preceded by a minimum silent

 

 

period of 3.5 x T, where T is the transmission time of a

 

 

single character. This can be calculated from the baud

 

 

rate, e.g. T = 572 µs at 19.2 kbps.

Slave address

8 bits

This is a single byte slave address which is transmitted

 

 

first and must be in the range of 1...247. Address 0 is

 

 

reserved for a broadcast address which all slaves should

 

 

recognise, and therefore requires no response.

 

 

 

Function code

8 bits

This is an eight bit code in the range of 1...255 although

 

 

only 126 functions exist as the codes 129...255 represent

 

 

an error condition. An error condition occurs when the

 

 

addressed slave does not accept the command, in which

 

 

case it responds with the function code + 128, i.e. with its

 

 

msb set to 1.

 

 

 

Register start address or

8 bit byte count

Register start address: for a query command that requires

byte count when required

16 bit address

data to be returned, this field will contain the 16 bit start

 

 

address of the register (or data) to be returned.

 

 

Note that the signal converter uses protocol addresses.

 

 

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 30006 = 0x7536.

 

 

Byte count: In general this is only present 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.

 

 

 

Number of points or data

n × 8 bits

Number of points: for a query command that requires data

bytes when required

 

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 signal

 

 

converter can use Big Endian format (MSB first) or Little

 

 

Endian format (LSB first).

 

 

 

CRC

16 bits

This field contains a 16 bit CRC which is calculated on all

 

 

the data bits of the message bytes.

 

 

 

8

www.krohne.com

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

 

 

MODBUS PROTOCOL 5

 

UFC 400

 

 

 

5.2 Data representation

There are two data types used to transmit information on a Modbus data bus, the "Bit" and the "Register". The "Bit" represents a single binary state, whether as an output or an input condition. The "Register" is a 16-bit integer transmitted as two 8-bit characters. Using multiple "Registers" the Modbus interface can transmit higher accuracy values such as "Floating Point" and "Double Precision Floating Point" numbers.

"Bit" variables are packed into a byte containing 8 bit, so each character, sent or received, can contain up to 8 "Bit" variables. The master and slave devices use only as many 8 bit data characters as are required to transmit the information. Any unused bits in the data characters are ignored. The bit that is requested by the start address is transmitted in the LSB at bit 0. The next "Bit" value is transmitted in the next bit (bit 1). This continues until the last bit location (bit 7) of the LSB is reached. The next "Bit" value is then transmitted in the next data byte (LSB+1/MSB) at bit 0. This continues until all of the requested values have been transmitted. Any unused bits in the MSB are filled out with "0"s.

For simple single register variables the MSB of the register is transmitted first, with the LSB following immediately after. However, for variables that require multiple registers, i.e. the "Floating Point" and "Double Precision Floating Point" variables, the transmission order can be selected in the RS485 settings. By default, those values will be transmitted in Big Endian.

5.2.1

8-bit values

 

 

 

 

 

 

 

 

 

Register

Hi

Lo

 

 

 

 

 

 

 

 

N

 

0x00

Byte

 

 

 

 

 

 

5.2.2

16-bit values

 

 

 

 

 

 

 

 

Register Hi

Lo

NMSB LSB

5.2.332-bit values

Little Endian

Register

Hi

Lo

 

 

 

N

LSB + 1

LSB

 

 

 

N + 1

MSB

LSB + 2

 

 

 

 

 

Big Endian

 

 

 

Register

Hi

Lo

 

 

 

N

MSB

LSB + 2

 

 

 

N + 1

LSB + 1

LSB

 

 

 

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

www.krohne.com

9

5 MODBUS PROTOCOL

UFC 400

 

Float (single precision, IEEE 754)

MSB

LSB + 1

LSB + 1

LSB

 

 

 

 

SEEEEEEE

EMMMMMMM

MMMMMMMM

MMMMMMMM

 

 

 

 

With S = sign, E = exponent, M = mantissa/fraction

5.2.4 64-bit values

Little Endian

 

 

 

Register

Hi

Lo

 

 

 

N

LSB + 1

LSB

 

 

 

N + 1

LSB + 3

LSB + 2

 

 

 

N + 2

LSB + 5

LSB + 4

 

 

 

N + 3

MSB

LSB + 6

 

 

 

 

 

Big Endian

 

 

 

Register

Hi

Lo

 

 

 

N

MSB

LSB + 6

 

 

 

N + 1

LSB + 5

LSB + 4

 

 

 

N + 2

LSB + 3

LSB + 2

 

 

 

N + 3

LSB + 1

LSB

 

 

 

Double (double precision, IEEE 754)

MSB

LSB + 6

LSB + 5

LSB + 4

 

 

 

 

SEEEEEEE

EEEEMMMM

MMMMMMMM

MMMMMMMM

 

 

 

 

LSB + 3

LSB + 2

LSB + 1

LSB

 

 

 

 

MMMMMMMM

MMMMMMMM

MMMMMMMM

MMMMMMMM

 

 

 

 

With S = sign, E = exponent, M = mantissa/fraction

10

www.krohne.com

05/2013 - 4002744801 - AD Modbus UFC 400 R01 en

Loading...
+ 22 hidden pages