Siemens 1500 driver does not read string value properly

Hello,

i have a quiet odd one.

I need to read a string value from a datablock from a Siemens 15XX generation PLC, the value is changing once per second as seen in the gif below:

bug22 (1)

Now when i try to read that value with an OPC tag, i end up in this situation:

bug (1)

As you can see, the value alternates between good quality and bad quality.

Does anybody know what might be the cause of this?

How long is the string in the Siemns PLC?

Show us, how you configured the tag in the Ignition.

My guees is, that the string lenght exceedes the max lenght of the Siemens driver in Ignition...

https://forum.inductiveautomation.com/t/s7-400-udt-string-addressing/96375/2?u=zxcslo

I now configured the tag in ignition to 208 (shorter than 210) and it does not change the situation:

Take the length off the OPC Path and try without.

I took off the length now and it is still alternating between bad and good:

image

The last character in the string is a pipe, is that an issue by any chance?

Please make tags to read [device]DB5311,B0 and [device]DB5311,B1 and show us the result. Siemens strings are supposed to have two prefix bytes indicating the length present and the maximum length. (The latter should match the .LEN part of the OPC Item Path.)

B0 responds as follows:

B1 responds as follows:
jumps back and forth between value 254 and 48

So the maximum length encoded into the string header is 254, which is longer than supported, and the actual length when the longer string is present is also 254, which is longer than supported.

You need to change the PLC code to use string max and actual string length ≤208.