I am currently developing a model of a flow through a pipe that I have stored in a subsystem and that I want to use several times inside a larger model as it shall have several pipes in it.
I use some constant blocks inside the pipe model that shall be configurable before the simulation. As of now, I implement this by having a constant source block with a variable. The variable is set to a value by a script that is executed upon loading the block. I have an annotation inside the pipe model that allows opening that script and modifying the value of that constant.
Now if I want to have several pipes in my model but with different values of that aforementioned variable, how can I do this?
(To be honest, I don’t much like that value setting via that function. I’d much prefer to have a sort of gui for this pipe model like that of the standard simulink blocks but that is another issue…)