beautypg.com

Modbus functions supported by the mfc010, 1 01 (0116): read coil status, Read coil status – KROHNE MFC 010 C Converter User Manual

Page 25

background image

MFC010 Interface Manual

23

6.

Modbus Functions Supported by the MFC010

6.1

01 (01

16

): Read Coil Status

This function permits the user to read the state of a number of consecutive Discrete Outputs, or “Coil”,

registers. Within the MFC010 the majority of the Discrete Outputs are used to initiate command functions;

when read, response will be “ 1” w hilst c ommand i s bei ng processed and “ 0 when t he c ommand i s

completed (See Section 7.2 on page 39 for details of the individual Status Output 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

01

16

“Read Coil Status”

3

Start Address Hi

03

16

Start Address = 1002

4

Start Address Lo

E9

16

5

No of Points Hi

00

16

No. of Points = 5

( “Coils” 1002 – 1006 )

6

No of Point Lo

05

16

7

CRC Lo

2D

16

CRC Checksum

8

CRC Hi

B9

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

01

16

“Read Coil Status”

3

Data Bytes in Response

01

16

1 byte (5 States requested < 8 Bits)

4

Data Byte 1

15

16

Data = 00010101

2

5

CRC Lo

90

16

CRC Checksum

6

CRC Hi

47

16

The number of data bytes in the response will depend upon the number of Discrete Outputs requested.

The appropriate bit in each of the data bytes received will indicate each Discrete Output state requested.

Therefore, each data byte in the response will contain a maximum of 8 Discrete Output “Coil” states. For

example, if 19 Discrete Outputs are requested, then three data characters will be r eturned, with the first

group of 8 output states encoded in the first data byte, the second group of 8 output states coded in the

second data byte, and the last 3 output states coded in the first three bit locations of the last data byte.

Bit 0 of the first response data byte will c orrespond t o t he “ Start A ddress” D iscrete O utput r egister

specified by the request telegram. B it 0 of the second response data byte will correspond to the “Start

Address” + 8 Discrete Output register and so on.

In the example above, 5 Discrete Outputs are r equested, s o onl y one dat a by te i s r equired i n t he

response. The response data value shown above i ndicates t hat r egisters 1002, 1004 and 1006 ar e

active, and that registers 1003 and 1005 are inactive.