PROGRAMMER’S REFERENCE MANUAL
Label layout definition commands
Page 22
Code 128
Code 128 encodes the full ASCII character set, plus four special non-ASCII characters
(function codes) called FNC1, FNC2, FNC3, and FNC4. ASCII control characters and function
codes must be sent to the printer using
escape sequences
. An escape sequence consists of
the characters "??" followed by a third character.
To print a function code in the bar code send "??1" for FNC1, "??2" for FNC2, etc. To print
an ASCII control character (ASCII codes below 32
10
) send "??" followed by the alphabetic
character corresponding to the desired control character. Any upper or lower case character in
the ASCII range 40
16
to 7E
16
(64
10
to 127
10
) will be recognised.
Example:
"??J" or "??j" is interpreted as the line feed character.
"??[" or "??{" is interpreted as the ESC character (ASCII 27 = 1B
16
). The sequence "???"
yields a single '?' in the code. It is thus possible to encode two consecutive ?'s by sending
"????" to the printer. Escape sequences that do not fit any of the above alternatives are
ignored.
The example below shows the commands to define two bar codes. The FNC2 (Message
Append) function character is included in the first code. The data for the second code is
terminated with a carriage return character. (FNC2 instructs the reader to concatenate the
present code with the next code scanned and transmit the data from both codes in one
message.)
Example:
!F C S 400 1000 L 100 2 41 "??2Printer"
!F C S 200 1000 L 100 2 41 "Printer??M"