5 Replies Latest reply on Nov 10, 2016 11:49 AM by albertoz RSS
    albertoz Explorer

    OPC UA - can't read Tag values

    Hi,

    I'm trying to connect to an OPC Server simulator with OPC UA protocol. I've downloaded from the marketplace the extension, followed the guide but from thingworx composer i can't read my property "Counter" but i can see it trought the menu manage bindings. from the log of microserver seems to be all ok, i have remote thing connected but i have the property "ConnectedToOPCUAEndpoint" set to false. I'm using the Kepware OPC Server simulator and with another OPC Ua client it works, so the server is ok, i set up no security for connection.

     

    Maybe is fault of namespaceIndex (Channel1 has index 1)? i think it is 1 right ?

     

    settings.jpg

     

    opc.jpg

      • Re: OPC UA - can't read Tag values
        aanjan Heavyweight Champ

        Alberto, when you said you can see it through 'Manage Bindings', have you bound that to an existing (or a new) property? Do they not change/ update there?

        • Re: OPC UA - can't read Tag values
          aginal Newbie

          Hi guys!

          We have similar problems with the Thingworx OPC UA Client. For some reason this client constantly reconnects to the KEPServer. In the KEPServer EX Runtime I can see the number of connected clients increase every couple of seconds. I have a feeling that this is not the normal behaviour so maybe this is what causes the problem with reading the Tag values.

           

          @Alberto: Did you try changing the baseType to INTEGER? In ThingWorx the NUMBER baseType is used for floating point numbers. Based on the name "Counter" I guess this Tag1 is an integer type.

            • Re: OPC UA - can't read Tag values
              albertoz Explorer

              Thanks Alberto for reply,

              Yes i've tried to change the base type to integer but nothng changed.

               

              @Aanjan yes i've tried but seems using "remote things" template properties not update itselve. anyone is at liveworx next days ?

                • Re: OPC UA - can't read Tag values
                  aginal Newbie

                  Hi Alberto, I finally figured out why I could not read the Tag values, maybe the problem is the same for you too.

                   

                  The main problem was that the namespaceIndex was not correct, I used the following configuration for the opcua_subscription:

                   

                  "opcua_subscription": {

                      "dataItems" : [

                      {

                           "name" : "Counter1",

                           "baseType" : "INTEGER",

                           "identifier" : "Channel1.Device1.Tag1",

                           "namespaceIndex" : 2,

                           "isReadOnly" : false

                      } ]

                  }

                   

                  The identifier needs to be the complete path of the tag for example: "Channel1.Device1.Tag1" and the namespace index in my case was 2 (it is probably the same for you as well)

                   

                  You can check for the correct namespaceIndex using the UAExpert tool. It can be downloaded from the following link: OPC UA Clients - Unified Automation

                   

                   

                  I hope this will be helpful.

              • Re: OPC UA - can't read Tag values
                albertoz Explorer

                Hi, thanks,

                with this simulator all worx but with old Kepware simulator didn't work. Now they are partner so i think things are changed ! i will try soon to connect with kepserver !