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

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

Advertisement

5-6
Serial Port API
Publication 1756-RM004B-EN-P - October 2000
MVIsp_OpenAlt
Syntax:
int
MVIsp_ OpenAlt(int comport, MVISPALTSETUP *altsetup);
Parameters:
comport
communications port to open
altsetup
pointer to structure of type MVISPALTSETUP
Description:
MVIsp_OpenAlt provides an alternate method to acquire access to a
communications port. With MVIsp_OpenAlt, the sizes of the serial port
data queues can be set by the application. See MVIsp_Open for any
considerations about opening a port.
comport specifies which port is to be opened. See MVIsp_Open for
valid values.
altsetup points to a MVISPALTSETUP structure that contains the
configuration information for the port. The MVISPALTSETUP structure
is defined as follows:
typedef struct tagMVISPALTSETUP
{
BYTE
baudrate;
BYTE
parity;
BYTE
wordlen;
BYTE
stopbits;
int
txquesize;
int
rxquesize;
} MVISPALTSETUP;
See MVIsp_Open for valid values for the baudrate, parity, wordlen,
and stopbits members of the structure. The txquesize and rxquesize
members determine the size of the data buffers used to queue serial
data. Valid values for the queue sizes can be any value from
MINQSIZE to MAXQSIZE. The MVIsp_Open function uses a queue
size of DEFQSIZE. These values are defined as:
#define
MINQSIZE
#define
DEFQSIZE
#define
MAXQSIZE
Either MVIsp_OpenAlt or MVIsp_Open must be called before any of
the other API functions can be used.
Return Value:
MVI_SUCCESS
MVI_ERR_REOPEN
MVI_ERR_NODEVICE UART
/* Transmit queue size */
/* Receive queue size */
512
/* Minimum Queue Size */
1024
/* Default Queue Size */
16384
/* Maximum Queue Size */
port was opened successfully
port is already open
not found for port

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents