Messaging - Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual

Multi-vendor interface module
Hide thumbs Also See for Allen-Bradley ControlLogix 1756-MVI:
Table of Contents

Advertisement

3-14
MVI Backplane API
Publication 1756-RM004B-EN-P - October 2000

Messaging

MVIbp_ReceiveMessage
Syntax:
int
MVIbp_ReceiveMessage(MVIHANDLE handle, WORD *buffer,
WORD *length, WORD reserved, WORD timeout);
Parameters:
handle
handle returned by previous call to MVIbp_Open
buffer
pointer to buffer to receive message data from processor
length
pointer to a variable containing the maximum message
length in words. When this function is called, this should
be set to the size of the indicated buffer. Upon successful
return, this variable will contain the actual received
message length.
reserved
must be set to 0
timeout
maximum number of milliseconds to wait for message
Description:
This function retrieves a message sent from the control processor.
handle must be a valid handle returned from MVIbp_Open.
Upon calling this function, length should contain the maximum
message size in words to be received. buffer must point to a buffer of at
least length words in size. Upon successful return, length will contain
the actual length of the message received.
If length exceeds the maximum message size specified by the value
MsgRcvBufSize (see the MVIbp_SetIOConfig function),
MVI_ERR_BADPARAM will be returned.
reserved is not used for the 1756-MVI module and must be set to zero.
MVI_ERR_BADPARAM will be returned if reserved is not zero.
timeout specifies the number of milliseconds that the function will wait
for a message. To poll for a message without waiting, set timeout to
zero. If no message has been received, MVI_ERR_TIMEOUT will be
returned.
If the message received from the control processor is larger than length,
the message will be truncated to length words and
MVI_ERR_MSGTOOBIG will be returned.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents