Impulse 463E User Manual
Page 69

© Sealevel Systems, Inc.
- 66 -
SeaI/O User Manual
Read
CSeaMaxW32::Read( slave_address_t slaveID, seaio_type_t type, address_loc_t
starting_address, address_range_t range, void* data)
Description
Read performs a Modbus read on an opened SeaIO module and
returns the data by reference.
The actual Modbus read type is specified by the ‘type’ argument.
Since Modbus is actually base one, the starting location should be
no less than one. Likewise, the range indicates how many
consecutive inputs should be read.
The final parameter, ‘data’, is a pointer to a buffer in which to
store the returned data – most often, an array of bytes. Consult
the provided code examples for model specific information.
Parameters
slave_address_t slave_id
seaio_type_t type
address_loc_t starting_address
address_range_t range
void* data
Return Codes
-14
EFAULT
A Modbus read exception has occurred – the
first byte of the data buffer contains the
exception code.
-22
EINVAL
A NULL pointer has been supplied where a
pointer to a data buffer was expected.
-9
EBADF
The specified communication is not currently
established.
-19
ENODEV The SeaIO module did not respond.
≥ 0
Success – The number of valid data bytes in
the buffer.