pmExternalPower (Function)

Top  Previous  Next

Architecture:

NX32 / NX32L

Device support:

MX2 turbo/encore/warp, AX9 turbo/encore, NX-200, NX-400, NX-900, NX-910, LX2

Firmware version:

4.00 / 1.00.00


Turns the external power on and off. This makes it possible to run on battery even though external power is provided.

If battery backup is not enabled or if BatPowerLevel() is at the lowest level, the external power can not be disabled.

 

 

Input:

enable: BOOL

Enables/disables the external power.

 

Returns:

0

- Success.

1

- Battery backup not enabled.

2

- Battery power too low.

3

- Not supported.

 

Declaration:

FUNCTION pmExternalPower : INT;
VAR_INPUT
  enable   : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Turn off external power
  pmExternalPower(enable := FALSE);
  ...
END;
 
END_PROGRAM;