12-14-2023 03:30 PM - edited 12-15-2023 01:41 PM
I am attempting to read and write a string array from a Siemens S7 1500 PLC. I have set up two different data blocks for these operations, one for reading and one for writing. But neither operation succeeds.
All other data blocks are reading and writing correctly ( Bools and Reals ) so I know it's not a problem accessing the PLC data in general.
All attempts to read or write, even trying to retrieve or send just one Item, fail with Error 6015: Data not valid! The data address exceeds the address range
This happens whether I use the default 254 character strings or work with shorter strings.
I can find no examples on the 'net that explain any pitfalls with this operation.
Attached is an image of a simple test program for the read operation of a readable DB along with the VI. I don't think the Labview program structure is the problem, since it works fine for reading other data types.
There seems to be some subtle nuance to reading string arrays that I am not understanding. Or, the SP7 toolkit's ReadDB and WriteDB aren't handling the string arrays properly
Any suggestions are appreciated.
12-15-2023 02:27 PM
The answer to this was a PLC programming error. The SP7 manual states:
DB´s have to be global accessible and the offset has to be static (“Optimize db lock access” unchecked)
The programmer had failed to turn off the optimization.