serGetCTS (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2, DX4 pro, AX9 pro, MX2 turbo, AX9 turbo, NX-200, NX-400, NX-900, NX-910, LX2, LX4

Firmware version:

1.00 / 1.00.00


serGetCTS returns the state of the CTS signal. This function is only supported on serial ports with control signals (typically serial port 1).

The function does not work when hardware handshake is activated (see the serSetHandshake function).

 

 

Input:

port : SINT (0..127) (default 1)

Selects which serial port to use.

 

Returns: BOOL

TRUE:

If the CTS signal is logically asserted.

FALSE:

If the CTS signal is logically de-asserted.

 

Declaration:

FUNCTION serGetCTS : BOOL;
VAR_INPUT
  port : SINT := 1;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Test for CTS
  IF serGetCTS() THEN
     ...
  END_IF;
  ...
END;
 
END_PROGRAM;