Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Putting more component into one block

Putting more component into one block

Hello everyone,
My next question is how to put more components into one OM block (something similar to the Matlab/Simulink)? Is there any function or block for this?
Thanks,
Lala
__________________________________________________________________
From OMEdit simply drag & drop the components into your model.
Read OpenModelicaUsersGuide.pdf chapter 2 for more information.

Adeel.
__________________________________________________________________
Once more, thanks for replaying. I already made a complex model and I know some basics how to connect components and how to make models in OMEdit. Now, I am facing problem that I have a lot of components in one model and the questions was how to hide some of them by putting them (compressing) in one block? The same function exists in Matlab/Simulink where exists some blocks with input and outputs and some logic inside this block. In OMEdit, on examples of motors I saw that for example they put all motors components inside one block; terminal box is also made from a few components etc. I want to do the same with my model; to make some box with image and to programe this block.
Thanks,
Lala

Re: Putting more component into one block

Hi,

You can put your model (as a submodel) inside another model which has inputs/outputs at the top level which you then connect to the submodel via connect or equations.
Read more about inputs/outputs at top level in a model in the Modelica specification:
https://www.modelica.org/documents/Mode … ision2.pdf
Section 4.4.2.2 Prefix Rules.

Cheers,
Adrian Pop/

Re: Putting more component into one block

Thanks to You I solved my problems. There is need to make class (like a subsystem) and then to input that class into model. I’m really thankful for help.
Lala current/smile

Re: Putting more component into one block

Could you please give a little piece of code as a simple example ... ? Thanks

There are 0 guests and 0 other users also viewing this topic
You are here: