serSetRTS (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, LX4

Firmware version:

1.00 / 1.00.00


serSetRTS sets the state of the RTS 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.

 

state : BOOL

The logical state of the RTS pin.

 

Returns:

None.

 

Declaration:

FUNCTION serSetRTS;
VAR_INPUT
  port : SINT := 1;
  state : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Set RTS
  serSetRTS(state:=ON);
  ...
  // Clear RTS
  serSetRTS(state:=OFF);
  ...
END;
 
END_PROGRAM;