Serial Data Transfer; Serial Port Api Functions; Initialization - 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

5-2
Serial Port API

Serial Data Transfer

Serial Port API Functions

Function Category

Initialization

Configuration
Port Status
Communications
Publication 1756-RM004B-EN-P - October 2000
The serial API communicates with foreign serial devices via industry
standard UART hardware. The API acts as a high level interface that
hides the hardware details from the application programmer.
The primary purpose of the API is to allow data to be transferred
between the module and a foreign device. Because each foreign
device is different, the communications protocol used to transfer data
must be device specific. The application must be programmed to
implement the specific protocol of the device in order for the data can
to be processed by the application and transferred to the control
processor.
Take care if using PRT1 (COM1) when the console is
IMPORTANT
enabled or the Setup jumper is installed (see
chapter 1). If the console is enabled, the serial API
will not be able to change the baud rate on PRT1. In
addition, console functions such as keyboard input
may not behave properly while the serial API has
control of PRT1. To avoid this situation disable the
console when using PRT1 with the serial API.
This section provides detailed programming information for each of
the API library functions. The calling convention for each API function
is shown in C format. The API library routines are categorized by
functionality as shown in table 5.B.
Table 5.B Serial Port API Functions
Function Name
MVIsp_Open
MVIsp_OpenAlt
MVIsp_Close
MVIsp_Config
MVIsp_SetHandshaking
MVIsp_SetRTS
MVIsp_GetRTS
MVIsp_SetDTR
MVIsp_GetDTR
MVIsp_GetCTS
MVIsp_GetDSR
MVIsp_GetDCD
MVIsp_GetLineStatus
MVIsp_Putch
Description
Initializes access to a serial port.
Alternate form of MVIsp_Open with more options
Terminates access to a serial port
Configures a serial port.
Setup handshaking for a serial port
Set the state of the RTS line.
Get the state of the RTS line.
Set the state of the DTR line.
Get the state of the DTR line.
Get the state of the CTS line.
Get the state of the DSR line.
Get the state of the DCD line.
Get the serial port line status
Send a character to a serial port.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents