pmGetPowerFail (Function)

Top  Previous  Next

Architecture:

NX32L

Firmware version:

1.60.00


This function tells if the device will continue to operate on internal battery or enter pmPowerDown (forever) when external power is lost (power fail).

To change behavior see pmPowerFail.

 

Returns: BOOL

FALSE

- Battery backup is disabled.

TRUE1

- Battery backup is enabled.

 

Declaration:

FUNCTION pmGetPowerFail : BOOL;
 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM getPF;
VAR
   bat : BOOL;
END_VAR;
 
bat := pmGetPowerFail();
IF bat THEN
   DebugMsg(message:="Battery backup enabled");
ELSE
   DebugMsg(message:="Battery backup NOT enabled");
END_IF;
BEGIN
   ...
END;
END_PROGRAM;