Siemens DB String to Ignition Tag. Strange behaviour

Hey all,
I'm trying to add a few tags over from a Siemens S7-1212 PLC.

I've tried to add a few tags from a DB. But have not successfully gotten it to work as I'm having some strange behaviour. This string tag is part of a UDT in the PLC.

In the PLC, it is under DB100, where the offset is 16.0 and the next items offset in the DB is 272.0, hence I assume my length of string is 256, I've also replicated the issue using 210 which the documentation suggests is the max size/

When I put the Item path as

ns=1;s=[Master 1]DB100,STRING16.0.256

The tag comes back as error configuration,
but when I put

ns=1;s=[Master 1]DB100,STRING16.256

All of the other tags, that were fine, in the UDT suddenly go bad quality.

Am I missing something? And why does this effect the reading of my other tags?

Siemens strings have two extra bytes in the PLC, at the first two byte offsets, containing the max and current allowed length. You have to account for that in your offsets, and those values must be correct (in the PLC).

Ah right, in that case if the offset in my DB says 16, in my ignition I should set this offset as STRING18? And work out it's length based on that

No, still @16, but the length for Ignition is two less than the delta to the next object in the DB. (The first actual character is @18.) Consider reading those two bytes separately (as unsigned bytes) to see if they are correct.

I've tried to get this working, I can read the first two bytes using integer OPC Tags where the path is

ns=1;s=[Master 1]DB100,B16


ns=1;s=[AGV 1 Master]DB100,B17

these return the values 254, and the live length of my string respectively.

When I set my string to:

ns=1;s=[Master 1]DB100,STRING16.254

All of my other tags go bad quality
or if I set to

ns=1;s=[Master 1]DB100,STRING16.0.254

I get an error configuration, but the other tags are okay.

This IS the correct addressing format, but the length (254) is too big...
Try with a length of 210 or less...

Ah right, so in my PLC ladder I'll need to specify my string as the datatype String[210]

I changed my String in the PLC to String[200].

Then set the binding, to ns=1;s=[Master 1]DB100,STRING16.198

Needed to change the default string length in my PLC and then remove the two meta data bytes from the length of the string.

Thanks for the help!!!

I would first just try to read from the Ignition string with 210 or less, then when you find how much you can max read, you can change it in PLC...