I have several int,bool and string tags, all of them are able to read/write successfully.
However, when i start to add another string address with the format:
All the current tags have their quality changed from good to bad. And this newly added tag is having bad quality as well. I tried to force a string value to the PLC from the tag provider, and surprisingly it is able to write to the plc, even though the quality is bad.
I tried to create/duplicate an entire new set of DB address, which includes STRING16.254, i.e:
And this time round, all the tags’ quality are showing good, including the newly added string tag.
I am confused why using DB100 is creating the error, and DB101 is not?
i have tried [PLCNAME]DB100,STRING272.254 as well, and it is working… It seems that [PLCNAME]DB100,STRING16 itself is having problem?
IIRC, Siemens string types use the first two bytes in memory to report the max size of the string and the actual length of the string (respectively), and the following bytes are the real character data. Make sure those first two bytes are correct.
Kevin asked you already: what other tags are acceessing DB100? If you address a second tag, at e.g. DW1000, the driver might try to read the complete block. That block is longer than 226 bytes, the error you posted in your first message.
A little side node: If this is a S7-1x00 it is not recommend to switch off optimization for such a long data block.
Hi Chi, i have uploaded screenshots of my DB structure previously, please kindly have a look.
This DB structure was developed by my colleague and i have checked with him… There is no tag ‘‘overlapping’’ or part of the tag is being used elsewhere
In fact, i have another configuration whereby i am using S7-1500, and i have similar issue when i try to connect to DB37,x0.0 etc. (from offset 0-2)
I have attached the list of tags using DB100 from the ‘Tag search’, please kindly have a look.
Btw i realised after changing from [PLCNAME]DB100,STRING16.254 to [PLCNAME]DB100,STRING16.204 (starts to have error from 205 onwards), the tag communications are fine.
I have attached the screenshot of DB100,B16 & DB100,B17
I realised after changing from [PLC]DB100,STRING16.254 to [PLCNAME]DB100,STRING16.204 (starts to have error from 205 onwards), the tag communications are fine.
I am not that familiar with programming, but B16 is showing the length of the string, and B17 would be the total number of characters?