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

OpenModelica Interactive mode

OpenModelica Interactive mode

Hello I am trying to work with openmodelica in interactive mode I will work on realtime controll of a realsystem with controller output computed in modelica


Which is the last version which supported this interactive mode ? Is there a documentation to it?

After a few tries i found that you can run interactive mode from terminal(i am using ubuntu) comunication with sockets by:  omc -d=interactive
which is some debug interactive mode. But when i try to comunicate it by sending for example setcontrolclienturl#2#127.0.0.1#18888# end
it responds with  this error

Error occurred building AST Syntax Error [:1:19-1:19:writable] Error: Lexer failed to recognize '#2#127.0.0.' [:1:27-1:29:writable] Warning: Treating .0 as 0.0. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future. [:1:29-1:31:writable] Warning: Treating .1 as 0.1. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.

but when i try for example 1+1 it returns 2 current/smile but then modelica quits which is also not wanted current/smile

i need to be able to pause simulaiton execution recieve actual output from real system and send it to controller in modelica (maybe by changing parameter or sth like that) and resume simulation and do this on and on..

Should i use some old version of modelica (which one? ) which supports it corretly or i can make it work with this interactive debug mode ? Really thanks for reply. (and yea dont tell me i shouldnt do it because i do it for my masterdegree diploma work and i cant use corba because it starts modelica for every simulation and i need to run it continuosly)
Really thanks for every reply:)

Edited by: bumino - Mar-17-15 16:22:54

Re: OpenModelica Interactive mode

You can use CORBA. It is the same thing as +d=interactive current/smile

For the OMI interface, you need a rather old OpenModelica version (2010?). In current OpenModelica versions, I would say creating your own FMI master algorithm is a simpler way of doing real-time control. At least that way you can control root finding for zero-crossing functions which otherwise can take an undefined time to find.

Re: OpenModelica Interactive mode

Thanks for reply:) and where can i find more documentation how to create own FMI and implement it with openmodelica?

Re: OpenModelica Interactive mode

bumino wrote:

where can i find more documentation how to create own FMI and implement it with openmodelica?

Hi Bumino, did you find the information?

Thanks in advance


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