Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual page 35

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

Advertisement

MVIbp_WriteInputImage
Syntax:
int
MVIbp_WriteInputImage(MVIHANDLE handle, WORD *buffer,
WORD offset, WORD length);
Parameters:
handle
handle returned by previous call to MVIbp_Open
buffer
pointer to buffer of data to be written to input image
offset
word offset into input image at which to begin writing
length
number of words to write
Description:
MVIbp_WriteInputImage writes to the module's input image. handle
must be a valid handle returned from MVIbp_Open.
buffer must point to a buffer of at least length words in size.
offset specifies the word in the input image to begin writing, and length
specifies the number of words to write. The error
MVI_ERR_BADPARAM will be returned if an attempt is made to access
the input image beyond the range configured for direct I/O. If this error
is returned, no data will be written to the input image. See the
MVIbp_SetIOConfig function for more information.
The input image is written by the module and read by the control
processor.
Return Value:
MVI_SUCCESS
MVI_ERR_NOACCESS
MVI_ERR_BADPARAM
MVI_ERR_BADCONFIG IO data connection not open (1756-MVI only)
Example:
MVIHANDLE
Handle;
WORD
buffer[2];
int
rc;
/* Write 2 words of data to the input image, starting with word 0 */
rc = MVIbp_WriteInputImage(Handle, buffer, 0, 2);
if (rc != MVI_SUCCESS)
printf("ERROR: MVIbp_WriteInputImage failed");
See Also:
MVIbp_GetIOConfig, MVIbp_ReadOutputImage
data successfully written to the input image
handle does not have access
parameter contains invalid value
Publication 1756-RM004B-EN-P - October 2000
MVI Backplane API
3-13

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents