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

Starting a OPC UA Server in OpenModelica using OMShell/Linux

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 first 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?



Another question I have regarding the OPC UA Server is: What do I have to do to be able to change the parameters in the running simulation? When starting the server with OMEdit I can see the parameters but I do not have the right to edit them.


My test model is somthing simple like:

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

Edited by: mueggge - Feb-01-22 17:07:28

Re: Starting a OPC UA Server in OpenModelica using OMShell/Linux

As always I have already tried to find the solution for several days but after posting the question I found the solution to my first question myself.

I didn't realise: 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).

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