Is there a way to create an input/output port in Simulink
(some workaround)? The port would be a bus and some signals are set from outside the block while some signals are set by the block. Here is an example:
Given the following bus:
Flow (scalar)
Composition (vector)
Enthalpy (scalar)
I would like Flow
to be set from outside the block (there's a pump downstream which sets this value). Composition
and Enthalpy
are computed by the block.
My solution so far: Make Flow
an input into the block and with direct feedthrough set it on the outport. I don't find this solution intuitive because from a graphical point of view the outflow becomes an input into the block (which is true from a math point of view - but I would like to make the Simulink
diagram intuitive). I've seen in Modelica
the possiblity to create input/output ports (RealPort
) and the signal could be read or written by the block. I would need such a feature in Simulink
.