X hits on this document

141 views

0 shares

0 downloads

0 comments

32 / 37

MODBUS Communications Driver - Functions

ReadOutputRegisters: Read Output Registers

SYNOPSIS

short status = MB_ReadOutputRegisters(short Address, long Start, short Count, short Values[]);

status Address Start Count Values

Error Return Destination Address Starting Register No. Number of Registers Return Array

Integer Integer Long Integer Integer < 120 Integer array

DESCRIPTION

This command returns the values of Output registers (address 4xxxx), one register per return array element. The Driver permits you to read up to 120 registers in one operation, though your MODBUS device may require shorter requests.

EXAMPLE

short regs[10];

// Return value array

short status = MB ReadOutputRegisters(5, 40115, 3, regs);

_

if (status != 0) MessageBox(NULL, MB ErrorString(status), MB_OK); _

"ReadOutputRegisters Error",

Page 24

June 6, 1998

Revision 2.210

Document info
Document views141
Page views143
Page last viewedMon Jan 23 09:07:50 UTC 2017
Pages37
Paragraphs781
Words6172

Comments