nmpPower (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Firmware version:

2.64 / 1.00.00

Nav. API level:

2


This function controls the power of a connected NMP navigation device. By using this function, the program can turn the NMP on and off to save power or reset the device.

This must be called after navOpen as navOpen determines if the serial port is in use.

 

The power to the NMP navigation device is controlled by the RS232 DTR signal.

 

Usually, the power is controlled by a dedicated interface box connected to the NMP device in question. Please install according to the hardware documentation.

 

 

Input:

power : BOOL (Default: ON)

ON:

Turns power to NMP on.

OFF:

Turns power to NMP off.

 

 

Returns: INT

0

- Success.

1

- Failure.

 

 

Declaration:

FUNCTION nmpPower : INT;
VAR_INPUT
   power BOOL := ON;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM NMPExample;
VAR
   rc : INT;
END_VAR;
 
   DebugMsg(message := "Initializing NMP...");
   navOpen();
   rc := nmpPower();
   IF rc <> 0 THEN
      DebugFmt(message := "Error: nmpPower=\1", v1 := rc);
   END_IF;
 
   ...
 
   rc := nmpPower(power := OFF);
   // Close the navigation interface
   navClose();
   ...
END_PROGRAM;