using a stateflow as a subsystem reference with some parameters to be editted after instantiation
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Linfei
el 29 de Jul. de 2022
Comentada: Linfei
el 1 de Ag. de 2022
Hi,
I have created a stateflow chart - a very simple debouncer whose debounce time is a parameter.
I hope to create a subsystem out of it so that I can use it in multiple places. Each instantiation of the debouncer can have different debouncing time.
However, I cannot find a way to make the internal parameter inside stateflow chart to propogate to the subsystem level.
Thank you.
0 comentarios
Respuesta aceptada
Fangjun Jiang
el 29 de Jul. de 2022
Create your Stateflow chart and create parameter variables, add a mask to the Stateflow chart to bring all those parameter variables to the mask dialog.
Make this masked block a library block, then when you use it multiple times in a model, you can specify whatever parameter values.
3 comentarios
Fangjun Jiang
el 29 de Jul. de 2022
Editada: Fangjun Jiang
el 29 de Jul. de 2022
You need to add this variable to your chart and specify it as "parameter", not as local data or constant. Press Ctrl+H to open the Model Explorer and navigate to the chart, and check the "scope" of the data under this chart.
Más respuestas (0)
Ver también
Categorías
Más información sobre Syntax for States and Transitions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!