serGetDSR (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

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

Firmware version:

1.00 / 1.00.00


serGetDSR returns the state of the DSR 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 DSR signal is logically asserted.

FALSE:

If the DSR signal is logically de-asserted.

 

Declaration:

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

 

 

Example:

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