title: Input/output port in Simulink
body: <p>Is there a way to create an input/output port in <code>Simulink</code> (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:</p>
  
  <p>Given the following bus:</p>
  
  <pre><code>Flow (scalar)
  Composition (vector)
  Enthalpy (scalar)
  </code></pre>
  
  <p>I would like <code>Flow</code> to be set from outside the block (there's a pump downstream which sets this value). <code>Composition</code> and <code>Enthalpy</code> are computed by the block.</p>
  
  <p>My solution so far: Make <code>Flow</code> 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 <code>Simulink</code> diagram intuitive). I've seen in <code>Modelica</code> the possiblity to create input/output ports (<code>RealPort</code>) and the signal could be read or written by the block. I would need such a feature in <code>Simulink</code>.</p>