Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 243
![background image](/manuals/579606/243/background.png)
API Library of Routines
Appendix B
MSG_WRITE_W_HANDLER
B-112
BASIC Example
The BASIC function code is 42.
DIM status : INTEGER
DIM iostat : INTEGER
DIM msgwbuf(5) : INTEGER
.
.
.
rem * MSG_WRITE_W_HANDLER - Set up handler to allow for a synchronous message
rem * write of msgwbuf. This function will wait for
rem * completion of the I/O before returning to the user.
rem * Size of buffer is 20 bytes, message number is 0,
rem * number of items to read is 5, the timeout value is
rem * 6 seconds, the coprocessor data type is integer,
rem * the plc data type is short and iostat gets the I/O
rem * completion code.
RUN AB_BAS (42,status,ADDR(msgwbuf(1)),20,1,5,6,5,3,ADDR(iostat))
.
.
.
References
MSG_READ_W_HANDLER();
Also see asynchronous functions
MSG_READ_HANDLER(); MSG_WRITE_HANDLER();