batVoltageIsLow (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


batVoltageIsLow queries the status on the battery voltage. If the voltage is below a hardware-set threshold, a Low Battery indication will occur.

 

Input:

None

         

Returns: BOOL

True if the battery voltage is low. False if not.

 

Declaration:

FUNCTION batVoltageIsLow : BOOL;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  IF batModuleMounted() THEN
     IF batVoltageIsLow() THEN
        gsmSendSMS(phonenumber:="12345678", message:="Battery Voltage is low");
    END_IF;
     IF NOT batIsCharging() THEN
        PowerDown(seconds:=600);
     END_IF;
  END_IF;
  ...
END;
 
END_PROGRAM;