'Starting a OPC UA Server in OpenModelica using OMShell/Linux

I want to run an OpenModelica simulation on an pc running Linux and then connect via opc ua to the simulation. I tried simulating my model in OMShell with simulate(MyTestModel). This worked.

When I add the simulation flags simulate(MyTestModel,simflags ="-rt 1.0 -embeddedServer opc-ua") to start a OPC UA Server OMShell crashes and nothing happens. I tried this in Linux and Windows.

When using OMEdit and setting the flags in the simulation setup it seems to work. However I also have to press the Play Button in the Interactive Plot view to start the simulation. I tested this by connecting to the server with UAExpert.

My question is: Does anybody know why OMShell crashes (doesn't react anymore) when trying to start the OPC UA Server? Or does anybody have any other suggestions on how to achieve my goal of establishing a opc ua connection with an open modelica simulation running on Linux?

Thanks!

My test model is:

model MyTestModel
  input Real x;
  Real y;
equation
  y = x;
end MyTestModel;


Solution 1:[1]

As always I have already tried to find the solution for several days but after posting the question I found the solution myself. I have to start the simulation via the OPC UA interface after starting the server. I changed the node "Run" to true and the simulation of my model started. This is probably the same as pressing the play button in OMEdit (as described above).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mueggge