EasyManua.ls Logo

Rockwell Automation Allen-Bradley ControlLogix 1756-MVI - Page 99

Rockwell Automation Allen-Bradley ControlLogix 1756-MVI
145 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Publication 1756-RM004B-EN-P - October 2000
Serial Port API 5-11
MVIsp_SetHandshaking
Syntax:
int MVIsp_SetHandshaking(int comport, int shake);
Parameters:
comport port for which handshaking is to be set
shake desired handshake mode
Description:
This function is used to enable handshaking for a port after it has
been opened. comport must be previously opened with MVIsp_Open.
shake is the desired handshake mode. Valid values for shake are
HSHAKE_NONE, HSHAKE_XONXOFF, HSHAKE_RTSCTS, and
HSHAKE_DTRDSR.
Use HSHAKE_XONXOFF to enable software handshaking for a port.
Use HSHAKE_RTSCTS or HSHAKE_DTRDSR to enable hardware
handshaking for a port. Hardware and software handshaking cannot
be used together.
Handshaking is supported in both the transmit and receive directions.
Return Value:
MVI_SUCCESS no errors were encountered
MVI_ERR_NOACCESS comport has not been opened
MVI_ERR_BADPARAM invalid handshaking mode
Example:
if (MVI_SUCCESS != MVIsp_SetHandshaking(COM1, HSHAKE_RTSCTS))
printf(“Error: Set Handshaking failed\n”);
IMPORTANT
If hardware handshaking is enabled, using the
MVIsp_SetRTS and MVIsp_SetDTR functions will
cause unpredictable results.
If software handshaking is enabled, be sure that the
XON and XOFF ASCII characters are not transmitted
as data from a port or received into a port because
this will be treated as handshaking controls.

Table of Contents

Other manuals for Rockwell Automation Allen-Bradley ControlLogix 1756-MVI

Related product manuals