nmpSetLED (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.84 / 1.00.00

Nav. API level:

2


This function will set the state of an LED on the PNM device.

 

 

Input:

led : SINT(1..4)

The ID of the LED to set.

1

- First indicator.

2

- Second indicator.

3

- Third indicator.

10

- Button backlight.

 

state : SINT (0..4)

0

- Turns LED off

1

- Turns LED on

2..4

- Blinks LED by using a different pattern.

 

 

Returns: INT

0

- Success.

-1

- Navigation interface is not open.

-2

- Error communicating with navigation device.

-4

- Failed to set LED.

-8

- Wrong LED ID or state.

-11

- This is not supported by the device (e.g. the device is not an NMP device).

-12

- Navigation interface is busy.

 

Declaration:

FUNCTION nmpSetLED : INT;
VAR_INPUT
  led   : SINT;
  state : SINT;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
BEGIN
  ...
  //Turn on the first LED
  nmpSetLED(led := 1, state := 1);
  ...
END;
END_PROGRAM;