serSetDTR (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2, DX4 pro, MX2 turbo, NX-200, NX-400, LX2

Firmware version:

4.70 / 1.30.00


serSetDTR sets the logical state of the DTR signal. This function is only supported on serial ports with control signals (typically serial port 1).

 

 

Input:

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

Selects which serial port to use.

 

state : BOOL

The logical state the DTR signal.

 

Returns:

None.

 

Declaration:

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

 

 

Example:

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