Run Model on Android Device
To deploy the Simulink® model on the Android® device, on the Hardware tab of the Simulink model, in the Mode section, select
on board, and then click Build, Deploy &
Start. The lower left corner of the model window displays status while
Simulink prepares, and downloads the application on the device.
The application starts running and logs signals in MAT-files on the device. The files
are named as
The name of your Simulink model is
runnumber is the
number of times the model is run.
runnumber starts with
1 and is incremented by one for every successive run.
indexnumber is the MAT-file number in a run.
indexnumber starts with
1 and is incremented
by one for every new file that is created in the same run.
Suppose that the name of the model is
androidMatFile. In the first
run, Simulink creates
androidMatFile_1_1.mat file and starts logging
data in this file. After the logging in the first file is completed, Simulink creates
androidMatFile_1_2.mat file and continues
logging data in this file. Likewise, the logging continues in multiple MAT-files until
the Simulation stop time is elapsed. If the same model is run
again, the new files are named as
androidMatfile_2_2.mat, and so on.
After the Simulation stop time elapses, the logging of signal stops.
Data loss occurs when:
The total file size exceeds the available device storage capacity.
The signal logging rate is faster than the device writing speed.