boardTemperature (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


boardTemperature returns the measured temperature inside the RTCU device in degrees Celsius.

 

 

Input:

None

         

Returns: INT

-2000..12500

Temperature in 0.01 deg Celsius. 22.50 degrees will be returned as 2250, and -17.00 degrees will be returned as -1700.

-9999

Error - the temperature read failed.

 

Declaration:

FUNCTION boardTemperature : INT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  IF boardTemperature() > 3500 THEN
    // Internal temperature of the RTCU device is above 35 degrees
     ...
  ELSIF boardTemperature() < -1000 THEN
    // Internal temperature of the RTCU device is below -10 degrees
     ...
  END_IF;
END;
 
END_PROGRAM;