OPC UA C# client connecting to OPC UA CODESYS server

dogulas
2024-08-16
2024-10-19
  • dogulas - 2024-08-16

    Noob alert! I’m just getting my feet wet with CODESYS.
    I have a “Hello World” project in the CODESYS IDE. I’m using the Win SoftPLC on the same computer. I’ve added a Communication Manager under the Application node. Under that is “OPC UA Server -> IEC Symbol Publishing 01”. I also added “OPC_UA_Symbols -> Information Model”. I’m not sure I need the second thing. I was grasping at straws. I also set up several dummy symbols in the IEC Symbol Publishing 01 node.
    In my C# application, I am trying to get an instance of EndpointDescription from CoreClientUtils.SelectEndpoint(“opc.tcp://localhost:1217/Gateway-1”, useSecurity: false, 15000). I wasn’t sure about the “Gateway-1”. I found that in the CODESYS IDE under the project -> Communication Settings.
    When I execute the previous method call in C#, I get: “BadSecureChannelClosed”. I have no idea what that means. Any pointers to documentation are welcome.

     
  • egau - 2024-09-18

    any updates on this?

     
    • dogulas - 2024-09-19

      sadly, no

       
  • mainak - 2024-10-19

    it could be due to security settings. In codesys IDE, go to device-> change run-time security policy, and click the checkbox that says "Allow anonymous login". try if this works.

     

    Last edit: mainak 2024-10-19

Log in to post a comment.