Returns, Description, C example – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 238

API Library of Routines
Appendix B
MSG_WRITE_HANDLER
B-107
Returns
Status
Symbolic Name
Meaning
0
CC_SUCCESS
Operation successful
133
CC_E_BAD_MSGID
Message number invalid
157
CC_E_NOTCONNECT
PLC is not connected or offline
160
CC_E_INV_TO
Invalid timeout value
162
CC_E_INV_CTYPE
Invalid coprocessor data type
163
CC_E_INV_PTYPE
Invalid PLCĆ5 data type
181
CC_E_MSGPEND
Message already pending
182
CC_E_MSG_ABORT
Message aborted
190
CC_E_SIZE
Invalid size for operation
191
CC_E_TOOSMALL
Size of buffer too small
Description
Use the MSG_WRITE_HANDLER function to initiate the processing of
unsolicited message write instructions from the PLC-5 programmable
controller. This function puts an entry in the Message Control Table
(MCT) for the requested message number (0-31). When the PLC-5
programmable controller executes that message number, data from the
PLC-5 programmable controller is transferred to the specified user buffer.
This function is asynchronous. When this function is initiated, control is
returned to the application. Use MSG_WAIT to monitor/complete the I/O
operation. For the synchronous version of this command see
MSG_WRITE_W_HANDLER.
C Example
See MSG_WAIT on page B-102 for a complete example of asynchronous
message processing.