07-31-2017 12:18 AM
Hello Community,
I'm trying to read variables from a SIEMENS S7-1500 PLC with the OPC-UA Toolkit. If I use a Bool-Array it works. See here:
If I use just a Bool variable, I always get the error: "Bad_IndexRangeInvalid". Why is there a problem with the index range if I don't use an array?
I also tried to read Int.. also no success. It seems that it just works with arrays. Is there a problem with my syntax at the identifier?
Screens:
I hope anyone has a solution for this issue..
Best regards,
Christian Hartung
07-31-2017 09:25 AM
Hi Christian,
did you took a look into the function help for the Read VI?
Read VI - LabVIEW 2017 OPC UA Toolkit Help - National Instruments
http://zone.ni.com/reference/en-XX/help/376230A-01/opcuavis/opcua_read_svr/#instance1
Please also read the hint about the array and scalar values:
The format of the node ID can also be ns=<namespace index>;<identifier type>=<identifier>@<index>:<index>. For example, ns=2;s=Folder.Array@1:2. This format only applies to the array data type and allows you to read a single element or a range of elements of an array. You cannot use @ in a node name.
Best,
Melanie
07-31-2017 09:35 AM
Hello Melanie,
yes, I always work with the LabView help.
I tried different syntax possibilities.. but I don't get the scalar datatypes working.
Regards
Christian Hartung
07-31-2017 11:03 PM
Hello,
I attached the .vi
Regards
Christian
08-14-2017 07:35 AM
Hello,
meanwhile I found a OPC-UA Client from Siemens programmed in C#.
Reading the bool-variable works here.
Same node-ID with the LabView-toolkit:
Meanwhile I think it's a problem of the OPC-UA Toolkit.. because other clients are working perfect.
I still hope that anyone has a solution for this problem..
Best regards
Christian Hartung
08-14-2017 03:28 PM
One thing that I noticed is that the browse result is listing the node ID as ns=3;s="xTestBool" but the input you are using for the read is ns=3;s=Inputs."xTestBool". I would try to change the node ID so that it matches what the browse is returning.
Another thing that you can try is just using the node path which for that input should be PLC_1.Inputs.xTestBool
08-17-2017 03:23 AM
Hello,
tried all these paths.. Errors: "NodeId not found" or "IndexRangeInvalid".
Siemens Testclient works also with this NodeID.. you can see it in my last post (first screenshot).
So it seems that LabView Support can't help here, still stuck with my problem..
Best regards
Christian
10-25-2017 10:58 AM
I am experiencing the same problem and went through the same motions. I can only add that it's not limited only to boolean, but also other data types (double) and not only reads but also writes. (LabVIEW 2017, OPC UA toolkit)
I have no problem with the same operation in LabVIEW 2014 SP1 (DSC).
10-26-2017 02:40 AM
Do you need to use OPC UA? If you are not limited in the choice of access methods to the controller, then there is a simpler library through TCP/IP in open codes. The only nuance in it is that the DB in the controller must be set to compatible with the older version controllers (S7-300, S7-400)
10-26-2017 01:27 PM
This issue is also becoming a big problem on a number of our projects (this worked with the DSC module functions). The only thing that works now is a read function of an array element (if @x(:y) is used at the end of the node name)
Is this already a known bug or is still being classified?