beautypg.com

4 04 (0416): read input registers, Read input registers – KROHNE MFC 010 C Converter User Manual

Page 28

background image


26

MFC010 Interface Manual

6.4

04 (04

16

): Read Input Registers

This function permits the user to read the value of a number of consecutive Input registers. (See Section

7.5 on page 493 for details of the individual registers). The format of the Master request telegram for this

function should be as follows.

Request

Character

Field

For Example

1

Slave Address

01

16

Request to Slave ID 1

2

Function

04

16

“Read Input Registers”

3

Start Address Hi

0B

16

Start Address = 3001

4

Start Address Lo

B8

16

5

No of Points Hi

00

16

No. of Points = 2

( Input Registers 3001 – 3002 )

6

No of Point Lo

02

16

7

CRC Lo

F3

16

CRC Checksum

8

CRC Hi

CA

16

The MFC010 will respond to such a request with a telegram formatted as follows.

Response

Character

Field

For Example

1

Slave Address

01

16

Response from Slave ID 1

2

Function

04

16

“Read Input Registers”

3

Data Bytes in Response

04

16

4 bytes ( 2 x 2 Byte Registers )

4

Data Byte 1

94

16

Register 3001 / 3002 = 75.29

5

Data Byte 2

7B

16

6

Data Byte 3

42

16

7

Data Byte 4

96

16

8

CRC Lo

17

16

CRC Checksum

9

CRC Hi

63

16

In t he ex ample abov e t he I nput r egister r equested c ontains a f loating poi nt num ber and needs to be

accessed as a pai r of r egisters ( 3001/3002). T he r esulting 4 by tes i n t he dat a r esponse c an t hen be

decoded into a floating-point number (See Section 5.3 on page 20 and Appendix C on page 93 for further

details on encoding and decoding floating point numbers).