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 ** 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.
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” error in the gateway.
You should have two tags with item paths:
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