Azzera filtri
Azzera filtri

Initialise Simulink variables for one subsystem from a mask of another subsystem

1 visualizzazione (ultimi 30 giorni)
I would like to have a 'Control panel' which has no connections. At the moment. I have created an empty subsystem and then created a mask for this subsystem, and added a Popup box with 3 variables, lets say, ['a' 'b' 'c']. Outside of this subsystem, ie, on the same level, I would like to be able to obtain the chosen variable and use as an input, ie a constant.
At the moment, I have named X my parameter in the mask. Then in the Initialization I have:
global const; const = X;
I then have a constant, where the value is set to const, which is connected to a display, outside of this subsystem.
However this does not work. Does anyone have any suggestions to how I can make this work?
This is a very simplified model, please don't suggest that I should use go to tags or data stores or something and replace this with the constant. This will not work.
Thanks in advance for any suggestions.

Risposte (0)

Categorie

Scopri di più su Subsystems in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by