LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC UA Toolkit client cannot Read "Bool" from SIEMENS S7-1500 PLC

I have the same problem with my S7-1500.  After changing the scalar read to an array read my LabVIEW code can now read from the OPC UA server.  Writing is another matter entirely.  My code tries to write to a write-enabled Boolean array using a Bool Array write format.  No errors and good service status, but the result returns Bad_WriteNotSupported (help suggests bad combination of value, status, and timestamp but all look OK).  I have already tried scalars (Bool and variant) without success.  My node ID is ns=3;s="OPC Comms"."Write"@0.  The VI is attached.  As mentioned, read works perfectly.

 

Has anyone managed to get the write function working for any data type?

 

PS. This is a major bug in a toolkit that costs money to license and deploy.  NI sort it out QUICK!!!!

0 Kudos
Message 11 of 27
(3,687 Views)

Hi,

 

I still have same problems with READ and WRITE using the OPC UA Toolkit (Version 2016 and 2017). But also reading an array does not work with my PLC 1500. After several support requests it seems NI is not able to fix the problem at the moment...

Now I have to look how to communicate with the PLC because customer wants to use the optimized DBs.

When I see that you talked about the bug in August and they still have the problem in November: That is really bad!

0 Kudos
Message 12 of 27
(3,653 Views)

Optimized DBs are not supported by any external software interface to connect to Siemens PLCs. The according Siemens S7 protocol is not officially documented at all and the optimized DB format for the S7 protocol is rather complicated and as far as I know, not implemented in any non-Siemens interface library. But Siemens has little interest to support other software than their own HMI offerings.

 

NI not being into PLC communication specifically I don't think expecting them to fix such a problem in a few months is very realistic, if it is even a problem in the NI OPC interface at all and not something in the Siemens OPC server.

Rolf Kalbermatter
My Blog
0 Kudos
Message 13 of 27
(3,639 Views)

Hi Rolf, 

 

I am really sure that other OPC clients (or server) working with optimized DBs. Tested it also with Kepware, but we would prefer the NI tool to read the structs in a DB (and also not using different kind of softwares). The 2016 toolkit had failures (node ID names not in OPC UA style, not possible to create SubVIs and so on) and the 2017 toolkit is also not working... So I think that should be enough time to figure out problems like this. 

0 Kudos
Message 14 of 27
(3,619 Views)

I spent a lot of time to analyze a similar problem.

The result: The OPC UA Toolkit 2017 sends a "IndexRange: [Opc Ua Empty String]", when you not specify an array index.

This request results in a error [BadIndexRangeInvalid]

Other OPC UA clients sends  "IndexRange: [Opc Ua Null String]", which is proceeded correctly.

 

I got a patch from NI to fix this problem.

 

Attached a screenshot from WireShark.

Message 15 of 27
(3,532 Views)

Hi,

 

I got also a patch from NI for LV2017. Since this it seems to work probably. I tested diefferent kind of reading and writing tags and it looks good.

 

0 Kudos
Message 16 of 27
(3,524 Views)

Me again,

 

Sorry. "Probably" was the wrong word. It works good, I made some tests and couldn't see failures. Communication with read/write was OK.

0 Kudos
Message 17 of 27
(3,519 Views)

Hey,

Where did you get the patch from?

Best,

Francesco

0 Kudos
Message 18 of 27
(3,446 Views)

Hi Francesco,

 

I had contact with NI Germany, they sent me the patch to test it.

 

Best regards

 

Marco

0 Kudos
Message 19 of 27
(3,443 Views)

Hi Marco,

Was this Patch a new "ni_opcua.dll"? If yes, would it be possible for you to send it to me? Unfortunately, what I got from NI is not working and they are incredibly slow in responding 😞

Thanks in advance for your reply!

Best,

Francesco

0 Kudos
Message 20 of 27
(3,310 Views)