(R2021b) Simulink/Embedded Coder : Not able to disable Stateflow states data logging
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
The states of the Stateflow model are getting logged automatically. I am flashing code on an a microcontroller with embedded coder.
I have read a lot on how to disbale logging and even tried a suggested script: How can I disable data logging for all the signals in my model? - (mathworks.com)
But that didn't work.
I am also seeing that one 'tunable parameter" is also getting logged.
The interesting thing is that the states in the stateflow are not selected for logging but still get logged.
Also, even if I remove the check for "Signal logging" in "Configuration/Data Import/Export", those states still get logged, while the signals I normally log no longer get logged (which what I expect).
The state names I see are someting like : is_active_c3_model is_c3_model is_finally_c3_model Normal_Op_is_Normal_Op
Could you please help.fi
Thank you
Diaa
1 commentaire
Benjamin Thompson
le 3 Mar 2022
The generated code will not log any data as it would in Simulink. Here is the relevant documentation from the Embedded Coder User Guide:
Data Logging Limitations
• To Workspace blocks and Scope blocks are ignored when Simulink Coder generates code for a referenced model. The resulting code is the same as if the blocks did not exist. In some cases for models with Scope block and MAT-file logging enabled, the code generator produces an extra PWork in the model's DWork structure.
• Code generated for referenced models cannot log data to MAT-files. If you enable data logging for a referenced model, Simulink Coder disables the option before code generation and re-enables it afterward.
• If you log states for a model that contains referenced models, the ordering of the states in the output is determined by block sorted order, and might not match between simulation output and generated code MAT-file logging output.
Réponses (1)
Benjamin Thompson
le 3 Mar 2022
The generated code will not log any data as it would in Simulink. Here is the relevant documentation from the Embedded Coder User Guide:
Data Logging Limitations
• To Workspace blocks and Scope blocks are ignored when Simulink Coder generates code for a referenced model. The resulting code is the same as if the blocks did not exist. In some cases for models with Scope block and MAT-file logging enabled, the code generator produces an extra PWork in the model's DWork structure.
• Code generated for referenced models cannot log data to MAT-files. If you enable data logging for a referenced model, Simulink Coder disables the option before code generation and re-enables it afterward.
• If you log states for a model that contains referenced models, the ordering of the states in the output is determined by block sorted order, and might not match between simulation output and generated code MAT-file logging output.
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported 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!