To-File block with Raspberry Pi 3 is not working after Deploying model to Hardware

3 vues (au cours des 30 derniers jours)
Hi Everyone,
I have build a model in Simulink that will run on a Raspberry Pi 3. In my model I am storing my data in .mat file with the use of 'To-file block'. When I run my model in external mode, the block is working and I can see my file with the stored data on my Raspberry Pi. However, when I use the 'deploy to hardware' button the model is running, but it is not creating the .mat file. Does anybody have experience with this? I would like to use my Simulink model as a stand-alone application after deploying the model to the Raspberry Pi (no connection to my laptop at all). Thanks in advance.
Best regards,
Ro

Réponse acceptée

Saurabh Gupta
Saurabh Gupta le 21 Juil 2017
You could try the following steps:
1) Check the generated code and see if you can find any reference to the MAT File that you are trying to write through the 'To file' block.
2) If there are no references to the MAT File in the generated code, then it may be the case that you have 'MAT-File Logging' disabled, which is optimizing out the 'To File' block during deployable code generation. Make sure to enable it in configuration parameters "Code Generation > Advanced Parameters > MAT-File Logging" found under "All Parameters".
3) If there are references to the MAT-file in the code and you still find it is not being created, you could debug the code running on your Raspberry Pi to see what code paths are being taken that preclude the writing of the MAT file.
Hope this helps!
  2 commentaires
Ro
Ro le 24 Juil 2017
Thanks for your answer Saurabh. Number 2) did the trick for me.
Best regards,
Ro
Eugen Kabakow
Eugen Kabakow le 19 Août 2017
Thank you!
Number 2 solved my problem.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Run on Target Hardware dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by