OK, if that's the case, how come my
L B#16#E
T DB41.DBB0
didn't work when the string definition was STRING[14] and with no changes to the FC program , after redefining the DB using STRING[16] and no other changes , everything worked perfectly?
They were unrelated events. When you forced 14 to DBB0, you weren't forcing the correct byte. When you changed the length to [16], it started working because you downloaded the block again, and DBB1 was loaded with 14 because that's how long your data was.
Let's say you enter a string in DB41 (we'll use TestString[150]), starting at byte 0, as you displayed earlier in this thread. By Siemens string convention, the first byte (byte 0) contains the configured length of the string, so it will have the value of 150. If the data block is not intialized with a value (meaning, you don't type anything in the initial value field), the value of byte 1 (the actual length of the string) will be 0 (this is the byte that FC39 reads).
Now, let's suppose you open DB41, switch to data view, type "This is a string test" in the actual value field, and download the DB. When you look at DBB0, it will still be 150, but DBB1 will be 21. If you called FC39 with this string, it would fail immediately when it read the 21. If you repeat the same test with a proper real number, FC39 will work because DBB1 will magically (without intervention from you) become 14.
This is why working with strings is not very flexible. Good or bad, you can send a string of 80 characters to DB41 starting at byte 2, but byte 1 remains 14 no matter what, because the data came down as individual characters (or non-Siemens string format). Again, with a character array, I treat the array as a string (but a normal string, not a Siemens one), and then add the header manually (it could be a header for a printer with a bunch of escape sequences, or it might be the two bytes you are concerned about).
In fact, if you look at FC39, you can scrap the whole string concept altogether with a couple of minor changes. The only reason it uses a string as an input is to make sure the length is 14 characters. If I were doing this, I would just make sure my message was always 14 characters myself, and rip through the conversion (that's all that FC39 does: it just loops through the bytes one by one).
Those canned functions are nice in some cases, but I have found that you can usually do it better with less code yourself.