cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
I'm communicating with a fairly dumb device that has an LCD display and a printer. A section of the device manual says I can send a message that will be displayed on the device screen and also on the printer:
Now, I see this as:
The maximum amount of display data is 31 bytes giving 30 printable characters, the inference being the display must maximally be capable of 2 lines of 15 characters (the 16th character of a message can be a CR, though moot, indicating that line data is to be put on the second line. Typically vendors of this dumb device allow a 16 wide display, which is confusing)
The maximum amount of printer data is 79 bytes, by making the display data absent and allowing 1 byte for the element (b)
There is a requirement that the printer support at least 2 lines and understands a CR to move to the second line. It is not required that the printer be maximally capable of 15 characters per line
Would you agree?
Message data element - constructed, up to 80 bytes in the printable ASCII range &H20 - &H7E
a, LCD Display Data, Optional
b, Separator byte &H1F, Optional if c d or e are not present
c, Printer data, Optional
d, Separator byte, Optional if e is not present
e, Other data, Not Used
Notes:
The display data may be formatted into two lines by inclusion of a CR (&H0D / vbCr) in the first 16 characters. Characters after the CR are displayed on the second line
The display data may be used for printing if the printer data is not present
Now, I see this as:
The maximum amount of display data is 31 bytes giving 30 printable characters, the inference being the display must maximally be capable of 2 lines of 15 characters (the 16th character of a message can be a CR, though moot, indicating that line data is to be put on the second line. Typically vendors of this dumb device allow a 16 wide display, which is confusing)
The maximum amount of printer data is 79 bytes, by making the display data absent and allowing 1 byte for the element (b)
There is a requirement that the printer support at least 2 lines and understands a CR to move to the second line. It is not required that the printer be maximally capable of 15 characters per line
Would you agree?