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

OPC UA Server Port

OPC UA Server Port

Hi, I am trying to use OPC UA to communicate with OMEdit and a Client GUI software(Movicon). But due to restrictions in Movicon, the port 4841 used by OMEdit  OPC UA Server cannot be connected to the client. It is unable to pick the Tags sent by OMEdit.
I have been able to connect the OPC UA Server of OMEdit to other Clients and it has worked fine, but I need to use Movicon for my application.
Can anyone guide me on how the OPC UA Server port of OMEdit can be changed.

Re: OPC UA Server Port

I don't think you can change the port number through any configuration at this stage. But if you are compiling OpenModelica compiler (omc) from sources then you can easily change the port number

refer to the source code  under OMCompiler/SimulationRuntime/opc/ua

client.c:141:
                                          "opc.tcp://localhost:4841");
omc_opc_ua.c:458:                         state->nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 4841);


you can change the above two lines in corresponding lines and recompile your omc.

Hope this helps.

Re: OPC UA Server Port

thank you @ravi. Although I dont have previous experience in compiling omc, I will look into and try out the method you've suggested. I'll update once I get some lead

Best,
Jal

Re: OPC UA Server Port

Alright so I now have an update!

  1. First, it was the problem with the port number 4841. At that point I was using Movicon NeXT annd after having a chat with Movicon we figured it was something to do with their software. OPC-UA in that software is still in beta version or not fully developed. I then shifted to Ignition software and it has been working fine with that


  2. And I was successfully able to change the OPC-UA port from the documents youv've mentioned and re build the omc. It worked! I was able to Start an OPC-UA srever from a Modelica code using omc at my new server port.



Thank you current/smile

There are 0 guests and 0 other users also viewing this topic