ProSoft Technology MVI69E-LDM User Manual

Page 72

Advertising
background image

Contents

MVI69E-LDM ♦ "C" Programmable

Developer's Manual

Linux Application Development Module

Page 72 of 130

ProSoft Technology, Inc.

August 21, 2014

MVI69_SetIOConfig

Syntax

int MVI69_SetIOConfig(MVI69HANDLE apihandle,

MVI69_IOCONFIG *ioconfig);

Parameters

handle

handle returned by previous call to MVI69_Open

ioconfig

Pointer to MVI69IOCONFIG structure to receive configuration
information.

Description
This function may be used to set the size of the module's IO images available for direct IO
access. handle must be a valid handle returned from MVI69_Open.

The actual number of input and output words that are transferred between the controller and
the MVI69E module is determined by the configuration of the generic profile. The only
purpose of this routine is to set maximum sizes allowed by the MVI69_ReadOutputImage
and MVI69_WriteInputImage functions.

The message buffer sizes are fixed. Therefore, the MsgRcvBufSize and MsgSndBufSize
members are ignored by this function.

Return Value

MVI69_SUCCESS

no errors were encountered

MVI69_ERR_NOACCESS

handle does not have access

MVI69_ERR_BADCONFIG

Configuration is not valid

Example

MVI69HANDLE handle;
MVI69IOCONFIG ioconfig;

ioconfig.DirectInputSize = 20; //20words used for input
ioconfig.DirectOutputSize = 10; //10 words used for output
if (MVI69_SUCCESS !=MVI69_SetIOConfig (handle, &ioconfig))
printf ("Error: IO COnfiguration failed\n");


See Also
MVI69_GetIOConfig

Advertising