This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Stop or Restart a Model Running on Raspberry Pi Hardware

Caution

Do not use the RESET button to stop a running model and reboot the board. Doing so can corrupt operating system and program files. To repair corrupt files, replace the firmware using Hardware Setup.

To stop a model running on the board, in the MATLAB® Command Window, enter:

h=raspberrypi;
h.stopModel('modelName');
For example, to stop the sumdiff model, enter:
mypi=raspberrypi;
mypi.stopModel('sumdiff');

To restart a model that was previously running on the board or run multiple instances of a model, in the MATLAB Command Window, enter:

h=raspberrypi; 
h.runModel('modelName');

Note

You do not need to enter h=raspberrypi; multiple times if a previous instance of h is available in the MATLAB Workspace.

For example, to restart the sumdiff model you stopped in the previous example, enter:

h.runModel('sumdiff');