In the Wrapper.log, each 3-4 minutes I have this error message:
**W [c.i.x.d.a.ScheduledRequest ] [10:56:49]: Uncaught Throwable invoking class com.inductiveautomation.xopc.drivers.siemens.requests.ReadRequest#receiveMessage: java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 166 out of bounds for byte[142] ** INFO | jvm 1 | 2023/02/13 11:57:10 |
what is the cause???
Error in function system.tag.readBlocking???
That usually means you have an OPC tag pointing into a Siemens DB where the DB is actually shorter than where the tag is looking for your data. It tends to make bad quality in Ignition for the whole DB.
Not by readBlocking, no. That gets the most recent value delivered by the OPC subsystem. It isn't possible that writeBlocking could produce it, either, since the error says it was a "ReadRequest".
It could be produced by system.opc.readValue(), perhaps.
I’m trying to read the string located at address 200 which is a string of a length 42.
No matter what I try I don’t get the correct value out of the PLC into Ignition.
The only way I get something that is kind of correct is by doing:
You see the string: “Sphere REC ·Wk 37 – MaEoaEA--” The part of this string I need is: “Sphere REC” and for the string located at 244 I need the “Wk 37 - Ma” part of this string.
When I use [RawMaterials]DB101,STRING200.42 the tag gives a bad value.
I get the “arraycopy: last source index 151 out of bounds for byte[44]” error in the gateway.
Of course, I added to this post.
The Ignition server IP is: 192.168.150.253
The PLC IP is: 192.168.200.10
The tag completed the read on: 2023-09-14 02:24:59PM wiresharkForum.pcapng (4.7 MB)
Also, I don't know if this can cause the problem but the load factor of the PLC is very high.
You should have two tags with item paths:
[RawMaterials]DB101,STRING200.42
[RawMaterials]DB101,STRING244.10
The string of length 42 occupies 44 bytes (the first byte is the maximum length, the second one actual length, or viceversa, I don't remember). If you declare these tags you should have no problem, unless you do something wrong on the PLC when writing the strings (you should use Siemens string functions, or be careful to write the first two bytes accordingly).
If you want to try if the problem is in the declaration of this two tags, just create a new device, RawMaterials2, and declare the two tags with item paths [RawMaterials2]... and verify if you still have the same error
@Kevin.Herron this means I never will get a good result without changing the PLC? @taglias I tried these addresses and splitting but nothing is working.