boardSupplyVoltage (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


boardSupplyVoltage returns the measured voltage the RTCU device is supplied with.
NOTE: The actual supply measurement is done asynchronously, so it may take some seconds for a physical change to be reflected.

 

Input:

None

         

Returns: INT (0..400)

Supply voltage in 0.1 Volt increments. 12 V supply voltage will be returned as 120.

 

Declaration:

FUNCTION boardSupplyVoltage : INT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  IF boardSupplyVoltage() > 120 THEN
    // Supply voltage is above 12 Volt
     ...
END_IF;
END;
 
END_PROGRAM;