S7 driver with strings

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
2 posts • Page 1 of 1
MattPaulissen
Posts: 26
Joined: Fri Feb 19, 2016 9:27 pm

S7 driver with strings

Post by MattPaulissen »

I've noticed a problem with the S7 driver and the "useStringLengthInfo" config. I'll try to explain what I've found:

1. When you read a string tag with the auto length, it is actually reading all 254 bytes that a max string could have.
2. If your string happens to fall within 254 bytes of the end of the DB then clearly bad things happen. The plc just denies that request.
3. OA actually groups tags that are close in address space together so that it reduces the traffic on the network and to the plc. It takes this large chunk and then breaks it into the individual tags that make it up. So if other tags get grouped with this string at the end of the DB then all of those tags will fail as well, since it will ask for a read that goes past the end of the data block.

There also seems to be a little bit of weird things going on if I ask for a number of bytes as well, ie. db7.dbb1200:20. It doesn't seem to take 20 bytes, or try to take 22 bytes for a 20 char string. It actually tries to take 23 bytes for some reason, which will fail if that string is located at the end of a DB. If I tell it ...:19 it will work, but if you try to write back it changes the max length in the PLC to 19. So it seems like the write function works, but something is wrong with the read(off by 1 error???.)

gschijndel
Posts: 373
Joined: Tue Jan 15, 2019 3:12 pm

Re: S7 driver with strings

Post by gschijndel »

This should be fixed in 3.14 since P024 or since 3.16+P006.

Post Reply
2 posts • Page 1 of 1