SetXMode

int SetXMode (int COMPort, int mode);

Purpose

Enables or disables software handshaking by enabling or disabling XON/XOFF sensitivity on transmission and reception of data.

By default, XON/XOFF sensitivity is disabled.

SetXMode returns an error if you have not opened the port of if you pass an invalid parameter value.

Note  LabWindows/CVI passes the input queue size and output queue size information from the OpenComConfig function to the Windows serial driver. However, the Windows serial driver might use a different number for the actual queue size. Because the driver sends the XOFF and XON characters based on the actual queue size, the driver might not transmit an XOFF or XON character when you expect.

Parameters

Input
Name Type Description
COMPort integer A number that indicates the COM port on which to operate.

This number is paired with deviceName, which represents the COM port, during the OpenComConfig function call.

Default Value: 1—COM1
Valid Range: 1—1,000
mode integer The XON/XOFF mode for the selected port.

Default Value: 0—disabled

Valid Values:
0—disabled
1—enabled

Note   The XON/XOFF mode applies to both transmitting and receiving.

Return Value

Name Type Description
result integer The result of this function call. This code is a negative value that specifies the type of error that occurred.