Search code examples
openmodelica

Is there an element/block in OpenModelica to use a signal remotely without wiring?


Is there an element/block in OpenModelica to which we connect a signal and then use the element somewhere else to connect to the rest of the model to prevent too much wiring in the model drawing. The equivalent block in Matlab/Simulink would be "Goto" and "From" blocks as shown in the picture.

enter image description here


Solution

  • Modelica.Blocks.Sources.RealExpression from the Modelica Standard Library might be what you are looking for.

    Screenshot of graphical implementation

    Notice you don't need a Goto element. You can simply reference the signal source across multiple hierarchies through dot notation (in the case depicted: sine.y).