I want to create an icon for a model that combines two components from the Modelica standard library. These two components are Modelica.Blocks.Sources.Sine and Modelica.Electrical.Analog.Sources.SignalVoltage. I have connected the two components so that the code looks like this:
model test
Modelica.Blocks.Sources.Sine sine1(freqHz = 5, amplitude = 1, offset = 10) annotation(Placement(visible = true, transformation(origin = {-51.0325,-0.884933}, extent = {{-12,-12},{12,12}}, rotation = 0)));
Modelica.Electrical.Analog.Sources.SignalVoltage signalvoltage1 annotation(Placement(visible = true, transformation(origin = {-4.12979,-1.17994}, extent = {{12,-12},{-12,12}}, rotation = 90)));
equation
connect(sine1.y,signalvoltage1.v) annotation(Line(points = {{-37.8325,-0.884933},{-12.9794,-0.884933},{-12.9794,-1.17994},{-12.5298,-1.17994}}));
end test;
The annotation is done automatically by OMEdit.
Now I want to achieve the following: I want to create an icon that
- contains the Pins of signalvoltage1
- that gives access to the properties of sine1 by double clicking.
I know about the annotation(Icon(...)) and annotation(Placement(...)) commands but I don't know how to bring signalvoltage1.p and signalvoltage1.n to the icon layer. And I don't know how to access the properties of sine1 by double clicking onto, e.g., a rectangle that I can easily draw using OMEdit.
Thanks in advance.