Content deleted Content added
Showeropera (talk | contribs) |
added question regarding string representations on Siemens PLCs |
||
Line 140:
::It does sound like there are 1 or 2 extra bits per character. Are you saying there was no way for a program to read or write these extra bits? Or that the implementation was somehow different from having extra bits per character (perhaps it was a table of locations with the bit "set" and thus you were restricted to how many times it was turned on). I think it is obvious that instructions designed to use these bits to end strings won't work but that is not an explanation as to why this extra storage was not taken advantage of. It is also surprising that they would in effect reserve 1/4 of their memory for such a limited use, when you consider how incredibly expensive the memory was at that time.[[User:Spitzak|Spitzak]] ([[User talk:Spitzak|talk]]) 17:36, 24 April 2017 (UTC)
=== Another length prefixed representation ===
Siemens PLCs use a form of length prefixed string representation with 2 length information bytes (see [https://cache.industry.siemens.com/dl/files/480/22506480/att_105176/v1/s7_scl_string_parameterzuweisung_e.pdf Siemens Docs "Working with Strings in S7-SCL"]). Maximum reserved memory is 256 bytes with maximum 254 bytes of actual text, where one byte denotes the allocated/reserved range for the string (the maximum count of characters allowed to be represented) and the other byte denotes the actual, currently valid length of the string. Maybe this could be added as length prefixed representation variant?
|