
,%2$280)054,/(3
Appendix B
# # #
B-111
Returns
Status Symbolic Name Meaning
# 1(2$4,0/ 35&&(33)5-
## &0.1-(4(' 7,4+ (22023
### (33$*( 054 0) 2$/*(
## ,3 /04 &0//(&4(' 02 0))-,/(
### /6$-,' 4,.(054 6$-5(
###! /6$-,' &0120&(3302 '$4$ 481(
###! /6$-,' : '$4$ 481(
## (33$*( $-2($'8 1(/',/*
### (33$*( $%024('
##" /6$-,' 3,9( )02 01(2$4,0/
## ,9( 0) %5))(2 400 3.$--
Description
Use the MSG_WRITE_W_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 synchronous. When this function is initiated, the
application program stops until the function completes or fails. For the
asynchronous version of this command, see MSG_WRITE_HANDLER.
C Example
.
.
.
short variable [4] /* buffer to receive write data */
unsigned timeout = 45; /* 45 second timeout */
unsigned msgnum = 10; /* plc message number 10 */
unsigned cc_type = 3; /* CC_WORD = 3; */
unsigned plc_type = 3; /* PLC_WORD = 3; */
unsigned items = 4; /* 4 words of data to be written by PLC-5 */
int iostat; /* iostatus return value */
int rtn_val; /* function return value */
rtn_val = MSG_WRITE_W_HANDLER (&variable, sizeof (variable), msgnum, items,
timeout, cc_type, PLC_type, &iostat);
.
.
.
Comentarios a estos manuales