beautypg.com

Explanation – Flintec MCS-08 User Manual

Page 23

background image

MCS-08 Technical Manual, Rev. 1.04 December 2012

Page 23 of 52

5.10. Modbus Data Structure (for MCS-08MB + MCS-08EN only)

EXPLANATION

Attention: For hardware connection details, please refer to the related hardware descriptions in chapter 9
(respective chapter 12 for MCS-08EN gateway). The Modbus slave address is defined in the Modbus RTU
Setup in chapter 9.4. Function code „0x03‟ and function code „0x10‟ are supported.
In the two word registers the data is stored to the registers in big-endian format. The least significant word is
stored to the highest register address; and the most significant word is stored to the lowest register address.
Write operations can only be done to the allowed registers. These registers are indicated as W or W/R in the
tables. Do not try to write „only read‟ registers indicated as R.
The Modbus data structure tables identify the N-bus address of MCS-08AD and MCS-08IO modules as [X].
Please find Modbus information on the web site of http://www.modbus.org

Exception codes
1:

Function code is not supported.

2:

Out of address range

3:

Invalid value or wrong byte number

4:

Operation error

Examples:
Perform Read and Write operations according to the hex system with the MCS-

08MB set to address „0x01‟.

Indicated value of MCS-08AD [0] at register start address 41006
Request:

01, 03, 03, ED, 00, 02, 54, 7A

Answer:

01, 03, 04, 00, 00, 27, 10, E0, 0F

Indicated:

2710 hex (10000 dec)

Status, Indicated, Gross and Tare values of MCS-08AD [0] at register 41005...41011.
Request:

01, 03, 03, EC, 00, 07, C5, B9

Answer:

01, 03, 0E, 01, 0A, 00, 00, 10, E2, 00, 00, 14, CA, 00, 00, 03, E8, BD, 55

Status:

010A hex

Indicated:

000010E2 hex (4322 dec)

Gross:

000014CA hex (5322 dec)

Tare:

000003E8 hex (1000 dec)

Indicated value of MCS-08AD [5] at register start address 41041
Request:

01, 03, 04, 10, 00, 02, C4, FE

Answer:

01, 03, 04, 00, 04, BF, 21, 0B, DA

Indicated:

0004BF21 hex (311073 dec)

Status, Indicated, Gross and Tare values of MCS-08AD [5] at register 41040...41046.
Request:

01, 03, 04, 0F, 00, 07, 35, 3B

Answer:

01, 03, 0E, 04, 22, 00, 04, BF, 38, 00, 04, BF, 38, 00, 00, 00, 00, 7D, EF

Status:

0422 hex

Indicated:

0004BF38 hex (311096 dec)

Gross:

0004BF38 hex (311096 dec)

Tare:

00000000 hex (0 dec)

Read inputs of MCS-08IO [0] at register 41071.
Request:

01, 03, 04, 2E, 00, 01, E5, 33

Answer:

01, 03, 02, 05, 0D, 7A, D1

Inputs:

0D hex (1011 binary)

Outputs:

05 hex (0101 binary)

Set all outputs of MCS-08IO [0] at register 41071.
Request:

01, 10, 04, 2E, 00, 01, 02, 00, 0F, A5, DA

Answer:

01, 10, 04, 2E, 00, 01, 60, F0

Outputs activated.

Zeroing MCS-08AD [0] at register 41062.
Request:

01, 10, 04, 25, 00, 01, 02, 00, 01, 25, 65

Answer:

01, 10, 04, 25, 00, 01, 11, 32

MCS-08AD [0] is zeroed.