ProSoft Technology MVI69-ADM User Manual
Page 209

MVI-ADM ♦ 'C' Programmable
Backplane API Functions
'C' Programmable Application Development Module
Developer's Guide
ProSoft Technology, Inc.
Page 209 of 342
February 20, 2013
Notes: If messaging is enabled, a portion of the input and output images must be reserved for use
by the messaging protocol. One word of input and one word of output are required for messaging
control. At least one additional word of input and/or output is required for messaging data,
depending upon the messaging direction(s) enabled. To receive messages from the control
processor, at least one word of output image is required for messaging data. To send messages to
the control processor, at least one word of input image is required for messaging data. Therefore,
for bi-directional messaging, at least two words of input and two words of output image must be left
unallocated when the direct I/O sizes are specified. If messaging is enabled and insufficient I/O
image is available for messaging, the error MVI_ERR_BADCONFIG will be returned.
For best messaging performance, set the direct I/O sizes as small as possible.
MVI56 Note: MVIbp_SetIOConfig is a null function in the MVI56 module. The I/O image and
message maximum sizes are configured by the controller and cannot be changed by the MVI
application. This function will always return MVI_ERR_NOTSUPPORTED on the MVI56 module.
MVI94, MVI46 Notes: This function defines the portion of the module’s I/O images that will be used
for direct I/O access, and to enable messaging.
MVI46 Notes: Messaging requires 1 input image word and 1 output image word for each direction
of messaging. If both sending and receiving messages are enabled, then 2 words total are required
in the input and output images. These words are used for handshaking between the module and
the Controller. To enable messaging, the DirectInputSize and/or DirectOutputSize values must be
1 or 2 words less than the TotalInputSize and/or TotalOutputSize.
Return Value
MVI_SUCCESS
No errors were encountered
MVI_ERR_NOACCESS
handle does not have access
MVI_ERR_BADCONFIG
Configuration is not valid
MVI46_ERR_INVALIDCLASS
Invalid Class (only for MVI46)
MVI_ERR_NOTSUPPORTED
MVI56 always returns this error (only for MVI56)
Example
MVIHANDLE handle;
MVIBPIOCONFIG ioconfig;
ioconfig.DirectInputSize = 2; // 2 words used for input
ioconfig.DirectOutputSize = 1; // 1 word used for output
MsgSndBufSize = 256; // Enable 256 word (max) messages to processor
MsgRcvBufSize = 0; // Received messages not enabled
if (MVI_SUCCESS != MVIbp_SetIOConfig(handle, &ioconfig))
printf("Error: I/O configuration failed\n");
See Also
MVIbp_GetIOConfig (page 206)