serGetDCD (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

1.00 / 1.00.00


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

FALSE:

If the DCD signal is logically de-asserted.

 

Declaration:

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

 

 

Example:

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