Siemens Driver giving me the wrong string

I need help! The system.opc.read is giving me unreliable results.
I am trying to pull an array of characters from the PLC.

Here is the siemens datablock: (the highlighted row is wrong, its the one above it)

I am trying to get an array of characters from the PLC in this command:

Here is that sub function:

When I pass the box 4 times, I get the following messages. The green is the correct shipping label and the red messed up shipping label.


I have tried so many methods to pull this string( you can see some of the commented out methods) I am sure that my datablock and offsets are set correctly and I confirmed that the PLC is getting the correct string. The only thing is that the system.opc.readValue is not consistently returning the same value.

I even tried adding sleep functions in various places hoping it was some asynchronous read issue, but it doesn't seem to make a difference.

At this point, I want to blame the Siemens Driver, but I figured that I would at the very least post in the forum to see if someone else can catch something I am missing.

Are there any known issues with the siemens driver that may produce unreliable reads?

Add a statement that prints tag_paths right before you call system.opc.readValues and see if you're actually reading the expected address each time.

NEVER MIND. Turns out, something else was overwriting the tag I was looking for but only in specific offsets. This smaller write overwrote right in the middle of my tag.

Thanks for the quick support!