Owner's manual
Table Of Contents
- Table of Contents
- Introduction
- SeaI/O Hardware Description
- SeaI/O Base and Expansion Modules
- SeaI/O Module Common Features
- SeaI/O Configurations & Specifications
- 410 Series – 16 Optically Isolated Inputs/16 Reed Relay Outputs
- 420 Series – 16 Optically Isolated Inputs/8 Form C Outputs
- 430 Series – 32 Optically Isolated Inputs
- 440 Series – 32 Reed Relay Outputs
- 450 Series – 16 Form C Relay Outputs
- 462 Series – 96 Channel TTL DB-78
- 463 Series – 96 Channel TTL 50-Pin
- 470 Series – 16 A/D, 2 D/A, 8 24V Outputs, 8 Isolated Inputs
- 520 Series – 8 Optically Isolated Inputs/8 High-Current Form C Outputs
- Power Options
- Hardware Configuration
- Wiring Options
- Mounting Options
- Accessories
- SeaMAX Application Suite
- SeaI/O Architecture
- Device Address Configuration
- Configuring the “Base” SeaI/O Module
- Configuring N-Series Expansion Modules
- Configuring an Ethernet Module (E-Series)
- MaxSSD Configuration & Diagnostics Utility
- Communicating Via Modbus
- Extended Modbus Command Set
- Developing Custom Applications Using SeaMAX API
- SeaMAX API
- Non Object-Oriented SeaMAX API
- IOCTL Calls and Functionality
- Using SeaMAX with Visual C++ 6.0
- Using SeaMAX with Visual Basic 6.0
- Example SeaMAX Programming Tasks
- CEthernet API
- Appendix A – Data Encoding Tables
- Appendix B – CRC Calculation
- Appendix C – SeaIO Model 462/463 Holding Register Set
- Appendix D – SeaMAX Data Types and Structures
- Appendix E – Troubleshooting
- Appendix F – How To Get Assistance
- Appendix G – Compliance Notices
- Warranty

© Sealevel Systems, Inc.
- 67 -
SeaI/O User Manual
Write
CSeaMaxW32::Write( slave_address_t slaveID, seaio_type_t type, address_loc_t
starting_address, address_range_t range, unsigned char*
data)
Description
Write performs a Modbus write on an opened SeaIO module and
returns the data by reference.
The actual Modbus write 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 – specifically, 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
unsigned char* 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.
-18 EXDEV Can not write data to the outbound
connection – connection error.
-19 ENODEV The SeaIO module did not respond.
-34 ERANGE Attempting to write to more IO points than
are available.
-27 EFBIG Illegal data value
≥ 0
Success – The number of valid data bytes in
the buffer.










