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

Control the model simulation using radiobutton blocks

Control the model simulation using radiobutton blocks

Hello All,

I am trying to control the simulation of my model using the radio buttons (as start and stop buttons).

Is it possible in Openmodelica? I am referring to example in Blocks.Examples.Interaction1.

Is there any other way for real time simulation?

Any information of real time simulation will be really helpful.. Thanking you..

Regards,
Maria

Re: Control the model simulation using radiobutton blocks

Hi Maria,

I was thinking of doing something like this by using an external function that connects to a gui over sockets.

There is an example here:
https://github.com/adamLange/modelicaSocketExample

In the example there is a python server, server.py.  An external modelica function connects to the server over a socket.  The python server is just taking to operands and returning the average value.  Following this same pattern you could add some widgets to the python server for whatever interaction it is that you need.

Another example that might be useful:
https://github.com/adamLange/podRunSim

Hope that helps,
Adam

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