Documentation

Read CPU Temperature on Simulink® Real-Time™

This example shows how to read CPU temperature in °C

Requirements

  1. Boot the target computer with the Simulink Real-Time real-time kernel.

  2. At the MATLAB® command prompt, type dslrtCPUTemperatureDemo to download and run the model on the target computer.

Select and Open the Model

mdl='dslrtCPUTemperature';
open_system(mdl);

Build, Download, and Run the Model

slrtpingtarget;
set_param(mdl,'RTWVerbose','off');
rtwbuild(mdl);
tg = slrt;
tg.load(mdl);
tg.start;
pause(20);
tg.stop;

Close the Model

close_system(mdl,0);
Was this topic helpful?