How can I specify the storage class of parameters in the model workspace in Real-Time Workshop 6.0 (R14)?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 27 Juin 2009
Modifié(e) : MathWorks Support Team
le 13 Déc 2021
I am trying to utilize the new model workspace feature in Simulink 6.0 (R14) to store initialization variables at the model level. This would be very convenient for me to ensure all variables are self-contained in the model.
However, when I attempt to configure the storage class code generation options for these variables, Real-Time Workshop only looks in the base workspace, and the parameters associated with the model workspace variables cannot have their storage class configured. Note that this limitation eliminates the convenience gained in including the variables as self-contained variables in the model workspace.
Is there any way around this? Can I declare the Real-Time Workshop storage class of variables contained in the model workspace?
Réponse acceptée
MathWorks Support Team
le 10 Déc 2021
Modifié(e) : MathWorks Support Team
le 13 Déc 2021
The ability to configure the Real-Time Workshop storage class for variables in the model workspace is not available in Real-Time Workshop 6.0 (R14). All parameters must be defined in the base workspace.
No workarounds exist. The only workspace that determines the parameter storage class is the base workspace. The primary purpose of the model workspace is to support model referencing, which allows separate models to contain their own workspace variables.
You can, however, use a model callback routines to automatically load MATLAB commands, an M-script, or a MAT file during file initialization, which can automate the process of initializing variables in the base workspace. This is discussed in Simulink documentation and in the following Tech-Note:
MathWorks - Support - Support - How Can I Use Model Callback Routines to Change the Parameters of My Simulink Model?
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Environment Customization dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!