Connect opc client to external opc ua simulation server through opc ua

weii
2021-09-15
2023-08-05
  • weii - 2021-09-15

    HI:
    I want to creat opc client in codesys and let it through opc ua
    link external OPC UA Simulation Server.

    I want my opc client link to OPC UA Simulation Server.Like the program on the picture.
    for example:

     
  • Ulvis

    Ulvis - 2021-09-15

    That should be straight forward using the Codesys OPC UA client. Sample here: https://store.codesys.com/en/opc-ua-client-example.html
    BUT, it requires that the device you are working with has a Runtime core that includes the "CmpOPCUAClient" component. This will be different from one hardware manufacturer to another.
    What device/controller/system are you working with?

     
    πŸ‘
    2
    • weii - 2021-09-15

      My goal is to connect the codesys client to matlab in real time through prosys opc ua simulation.
      Only software, no hardware part.

      system: CODESYS/Prosys OPC UA Simulation Server/ Matlab

       
    • weii - 2021-09-15

      I can't doemload and run Example.

       
    • m-ecs - 2023-07-29

      Dear Ulvis,

      I'm having a simular issue/question. I have an IFM CR1151 controller which has codesys runtime V3.5.16.

      From this controller/display I would like to create an OPC UA client. The controller has the CmpOPCUA client component. Do you have an example on how to integrate the OPC UA client on this controller?
      It is only possible to use the OPC UA client via the device three from version 3.5.17.

      Thanks in advance,
      Kind regards
      TM

       
      • rajshaswat - 2023-07-29

        check this option how to do this
        https://youtu.be/VxUwXuBgfXM

         
        • m-ecs - 2023-07-29

          Dear,
          Thanks for your swift response, but this is the issue.
          when creating the datasource manager, I do not have the option to select OPC UA (only have CODESYS Symbolic and CODESYS Application V3). As what i read, this is only available since v3.5.17.

          I have v3.5.16. the library CmpOPCUAClient is availalable for v3.5.16. But to set up the data communication, this needs to be programmed.

          I'm searching an code example on how to set this up.

          thanks,
          kind regards,
          TM

           

          Last edit: m-ecs 2023-07-29
          • rajshaswat - 2023-08-01

            ahh my bad i did not checked the version.
            yes it is available from v17
            but you can download example from codesys store .
            https://store.codesys.com/en/opc-ua-client-example.html

            but the thing will be it is almost like lot of code you need to write as it will be doing it from scratch.

            i had done this in past but after upgrading to v18 using data source manager only.

            other option you can try by using NodeRed easy option to do by creating docker and container.
            if you need example i can share that.

             
            πŸ‘
            1
            • m-ecs - 2023-08-01

              Hi Rajshaswat,

              Yes indeed, it will be a lot of code. But in our project using OPC UA is a big advance. So I'm willing to do it.

              Could you please send me an example of OPC UA and from NodeRed?

              Thanks in advance,
              Kind regards,
              TM

               
        • m-ecs - 2023-07-29

          Dear,
          Thanks for your swift response, but this is the issue.
          when creating the datasource manager, I do not have the option to select OPC UA (only have CODESYS Symbolic and CODESYS Application V3). As what i read, this is only available since v3.5.17.

          I have v3.5.16. the library CmpOPCUAClient is availalable for v3.5.16. But to set up the data communication, this needs to be programmed.

          I'm searching an code example on how to set this up.

          thanks,
          kind regards,
          TM

           
  • eschwellinger

    eschwellinger - 2021-09-15

    I would just do the client - by setting it up in the device tree ( this example was need to do everything in IEC code - as this new easy way to use have not been ready developped) - would say this example should not be needed anymore - at least only for special cases

     
    • weii - 2021-09-15

      I try.
      thanks

       

Log in to post a comment.