nmpPower (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

MX2i pro, CX1 pro/flex/warp, SX1, MX2 turbo, NX-200, NX-400, NX-900, LX2

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.

 

Depending on the RTCU device in use, the power to the NMP navigation device is controlled by the following output signal:

 

RTCU type

Signal used.

RTCU MX2i pro/pro+

RS232 DTR signal.

RTCU MX2 turbo

RS232 DTR signal.

RTCU CX1 series

Digital output 2.

RTCU SX1

Digital output 2.

 

When using the nmpPower function on the RTCU CX1 series or on the RTCU SX1, the digital output 2 is reserved for this purpose and cannot be used from the VPL application.

 

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;