serSetRTS (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

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;