Main Content

Run Model onAndroidDevice

To deploy the Simulink®model on the Android™ device, on theHardwaretab of the Simulink model, in theModesection, selectRun on board, and then clickBuild, 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 <modelname>_<runnumber>_<indexnumber>.mat. The name of your Simulink model ismodelname.runnumber模型运行的次数。runnumberstarts with1and is incremented by one for every successive run.indexnumberis the MAT-file number in a run.indexnumberstarts with1and is incremented by one for every new file that is created in the same run.

Suppose that the name of the model isandroidMatFile. In the first run, Simulink createsandroidMatFile_1_1.mat文件和starts logging data in this file. After the logging in the first file is completed, Simulink createsandroidMatFile_1_2.mat文件和continues logging data in this file. Likewise, the logging continues in multiple MAT-files until theSimulation stop timeis elapsed. If the same model is run again, the new files are named asandroidMatFile_2_1.mat,androidMatfile_2_2.mat, and so on.

After the Simulation stop time elapses, the logging of signal stops.

Note

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.