beautypg.com

B&B Electronics MODSCAN32 - Manual User Manual

Page 19

background image

19

READ OUTPUT REGISTERS (FUNCTION CODE 03)


Read Output Registers allows the user to obtain the binary contents of holding registers in the addressed
slave.

These registers can store the numerical values of associated timers and counters which can be driven to
external devices.

The addressing allows up to 125 registers to be obtained at each request; however, the specified slave
device may have restrictions that lower this maximum quantity. The registers are numbered from zero,
broadcast mode is not allowed.

The following example reads registers 40108 through 40110 from slave number 17.

ADDR

FUNC

DATA
START
PT HO

DATA
START
PT LO

DATA #
OF REGS
HO

DATA #
OF REGS
LO

ERROR
CHECK
FIELD

11

03

00

6B

00

03

7E


The addresses slave responds with its address and the function code, followed by the information field. The
information field contains 2 bytes describing the quantity of data bytes to be returned. The contents of the
registers requested (DATA), are two bytes each, with the binary content right justified within each pair of
characters. The first byte includes the high order bits and the second, low order bits.

In the example below, the registers 40108-40110 have the decimal contents 555, 0, and 100 respectively.

ADDR

FUNC

BYTE
COUNT

DATA
OUTPUT
REG
H.O.
40108

DATA
OUTPUT
REG
L.O.
40108

DATA
OUTPUT
REG
H.O.
40109

DATA
OUTPUT
REG
L.O.
40109

DATA
OUTPUT
REG
H.O.
40110

DATA
OUTPUT
REG
L.O.
40110

ERROR
CHECK
FIELD

11

03

06

02

2B

00

00

00

64

55