System Composer: Reading Stereotype Parameter from Component
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
assuming I have defined a component, assigned a stereotype and defined a stereotype parameter. Furthermore, I defined a Simulink behavior for that component. Now I want to define a Stateflow chart within the Simulink model and access the previously defined parameter. Is that possible?
Best regards,
Tim
0 Kommentare
Antworten (1)
Kirsten Hart
am 12 Okt. 2022
Stereotype information does not flow to the Simulink behavior model, however there is a way that you can implement this.
Rather than applying a stereotype to the system architecture component, you can add a parameter to the Simulink behavior model. Once this Simulink Parameter is added to the behavior model workspace and it is marked as a model argument, you will be able to access the parameter from the Property Insepector in System Composer. This parameter can also be accessed in the Simulink model by name just like other variables in the model workspace, and therefore is accessible from the Stateflow chart.
Here is an example of using parameters to store instance values for components: https://www.mathworks.com/help/releases/R2022a/systemcomposer/ug/use-parameters-store-instance-values-components.html
2 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!