function provides data for the bar code.
format ① [esc] rbaa; bbb ------ bbb [lf] [nul]
② link field data command
[esc] rb; ccc ------ ccc [lf] ddd ------ ddd [lf] ------ [lf] xxx ------ xxx [lf] [nul]
term aa: bar code number
00 to 31
bbb ------ bbb: data string to be printed
the maximum number of digits varies according to the type of bar
code.
ccc ------ ccc: data string of link field no. 1
ddd ------ ddd: data string of link field no. 2
to
xxx ------ xxx: data string of link field no. 99
explanation (1) data check
if there is data in the data row, which does not meet the type of bar code, the bar
code will not be drawn. if wrong code selection takes place in the data row of
code128 (no auto code selection), the bar code will not be drawn.
if there is data different from the one designated using the format id when data
matrix is used, the symbol is not drawn.
(2) no. of digits of data
when data exceeding the maximum number of digits is sent, the excessive data
will be discarded. for the maximum number of digits for each bar code, see
below.
data matrix, pdf417, qr code: 2000 digits
cp code: 473 digits
micropdf417: 366 digits
maxicode: 93 digits
customer bar code: 20 digits
highest priority customer bar code: 19 digits
postnet: 5, 9, 11 digits
royal mail 4 state customer code: 12 digits
kix code: 18 digits
bar code other than the above 126 digits
when the number of digits does not correspond to the bar code type, the bar
code is not be drawn. (for details, refer to “14. drawing of bar code
data”.)
for the maxicode, the maximum number of digits varies according to the mode.
in mode 2 or 3 and mode 4 or 6, it is 84 digits and 93 digits, respectively.
the maximum number of digits for data matrix varies according to the ecc type
and format id. since ecc 200 has become available, it also varies according to
the cell size. in the case of kanji, the maximum number of digits is half those of
the values described below since a kanji character occupies 2 bytes.

for the maximum number of digits in cell units, see the next page.

when pdf417 or micropdf417 is used, the number of symbol characters called code words is limited to 928 or less. moreover, the data compression rate varies according to the contents of data. therefore, the maximum number of digits according to modes is as follows.
when letters and numerics are mixed in data in exc mode, for example, the maximum values become smaller than the following values, since the internal mode switching code is used.
to correct a reading error by designating the security level, the maximum value becomes smaller, since the following error correction code words are used.
when the number of digits of the code word exceeds 928, or when the number of lines exceeds 90, the symbols are not drawn.
for the micropdf417, the numbers of lines and digits can be specified.
the maximum number of digits varies according to the setting.
in the case of pdf417
· extended alphanumeric compaction (exc) mode: 1850 digits
· binary/ascii plus mode: 1108 digits
· numeric compaction mode: 2000 digits
in the case of micropdf417
· binary mode: 150 digits
· upper case letter/space mode: 250 digits
· numeric compaction mode: 366 digits

the maximum numbers of columns and rows for the micropdf417

(3) code128 code selection
if the case of code128 (with auto code selection), code selection is performed in the following manner. (conforming to uss-128 appendix-g)
① determining the start character
(a) if the data begins with four or more consecutive numerals, the start code to be used is (code c).
(b) in any case other than (a) in ①, if a control character appears before a small letter (see 4) or four or more consecutive numerals, the start code is (code a).
(c) in none of the above cases, the start code is (code b).
② if the data begins with an odd number of digits in (a), ①:
(a) insert the (code a) or (code b) character just before the last numeric data. when (fnc1), if found in the number, breaks a pair of digits in the number, insert the (code a) or (code b) character before the numeric data preceding the (fnc1). selection of (code a) or (code b) should conform to (b) and (c) in ①.
③ if four or more digits of numeric data continue in (code a) or (code b).
(a) when the numeric data is an even number of digits, insert the (code c) character just before the first numeric data.
(b) when the numeric data is an odd number of digits, insert the (code c) character immediately after the first numeric data.
④ if a control character appears in (code b):
(a) in the subsequent data, when a small letter appears before the next control character or four or more consecutive digits, insert the (shift) character before the first control character.
(b) when not so, insert the (code b) character just before the first control character.
⑤ if a small letter appears in (code a):
(a) in the subsequent data, when a control character appears before the next small letter or four or more consecutive digits, insert the (code b) character before the first small letter.
(b) when not so, insert the (code b) character just before the first small letter.
⑥ if any data other than the numerals appears in (code c):
(a) insert the (code a) or (code b) character just before the data other than the numerals. selection of (code a) or (code b) should conform to (b) and (c) in ①.
(4) code128 code selection check
check if selection of (code a), (code b) or (code c) of code128 has been set correctly. if an error is found, the bar code will not be drawn.
[conditions causing an error]
① no start code is designated.
② a small letter (including { , | , } , ~, _ ) is found in (code a).
③ a control character is found in (code b).
④ any data other than the numerals, (fnc1), (code a), and (code b) is found in (code c).
⑤ there are two or more consecutive (shift) characters.
⑥ the number in (code c) is an odd number of digits.
⑦ (shift) is followed by (code a), (code b) or (code c).
(5) kanji code selection
· in the case of data matrix and pdf417, kanji codes can be printed. shift jis, jis hexadecimal, jis 8 codes can be mixed.
(6) link field data string
· after the link field no. is designated in the format command, data strings are linked using the link field data command to draw an image.
· up to 2000 digits of data strings of data matrix and pdf417 can be linked. for other bar codes, up to 126 digits can be linked. (the value varies according to the type of bar code.)
when the number of digits exceeds the maximum value, exceeding data will be discarded.
· up to 99 data strings can be linked.
· up to 2048 bytes can be used as the command length ([esc] to [nul]) of the link field data command.
· when the data string is omitted in the link field data command, the following processing is performed:
① no processing will be performed for the field which contains no print data due to the omission.
② when the field partially loses print data due to the omission, the only remaining data will be processed as print data.
· the link field data command can be used for the bit map font fields, outline font fields, and bar code fields.
(the same result is obtained when any of the “rc,” “rv” or “rb” command code is designated.)
(7) when manual mode is selected in the format command for a qr code
① numeric mode, alphanumeric and symbol mode, kanji mode

② binary mode

③ mixed mode

the qr code can handle all codes including alphanumerics, symbols and kanji. since data compression rate varies according to codes, the code to be used is designated when the mode is selected.

if mixed mode is selected, up to 200 modes can be selected in a qr code.
(8) when the automatic mode is selected in the format command for a qr code.

(9) how to transmit the control code data
nul (00h) = ] @ (3eh, 40h)
soh (01h) = ] a (3eh, 41h)
stx (02h) = ] b (3eh, 42h)
gs (1dh) = ] ] (3eh, 5dh)
rs (1eh) = ] ^ (3eh, 5eh)
us (1fh) = ] _ (3eh, 5fh)
* how to transmit the special codes
] (3eh) = ] 0 (3eh, 30h)
(10) transfer code for qr code

(11) examples of data designation
① alphanumeric mode: abc123

② binary mode: 01h, 03h, 05h

③ mixed mode

④ automatic mode
when the data above (③) is designated in automatic mode:

(12) maxicode data
for mode 2 or 3:
[esc] rbaa; bbbbbbbbbcccdddeeeee --- eeeee [lf] [nul]
for mode 4 or 6:
[esc] rbaa; fffffffffggggg --- ggggg [lf] [nul]
① bbbbbbbbb: postal code fixed as 9 digits
· mode 2:
b1b2b3b4b5: zip code fixed as 5 digits (numerics)
b6b7b8b9: zip code extension fixed as 4 digits (numerics)
· mode 3:
b1b2b3b4b5b6: zip code fixed as 6 digits
(character “a” of code set)
b7b8b9: vacant fixed as 3 digits (20h)
② ccc: class of service fixed as 3 digits (numerics)
③ ddd: country code fixed as 3 digits (numerics)
④ eee --- eee: message data strings 84 digits
⑤ fffffffff: primary message data strings 9 digits
⑥ ggg --- ggg: secondary message data strings 84 digits
1. when other than numerics is included in the data string of zip code (mode 2), zip code extension, class of service or country code, a maxicode is not drawn.
2. if the message data is less than 84 digits when mode 2 or 3 is selected, the printer adds a cr (000000) at the end of the data, and the remaining digits will be padded with fss (011100). when message data exceeding 84 digits is received, the excess data will be discarded before drawing a maxicode.
3. if the message data is less than 93 digits (9 digits + 84 digits) when mode 4 or 6 is selected, the printer adds a cr (000000) at the end of the data, and the remaining digits will be padded with fss (011100). when message data exceeding 93 digits is received, the excess data will be discarded before drawing a maxicode.
4. mode 6 should not be used for usual operation since it is used for scanner programming.
examples
(1)

10 print #1, esc$; ”c”; lf$; nul$;
20 print #1, esc$; ”xb01; 0200, 0125, 3, 1, 03, 03, 08, 08, 03, 0, 0150”; lf$; nul$;
30 print #1, esc$; ”xb02; 0830, 0550, 3, 1, 02, 04, 07, 08, 04, 3, 0150,”;
40 print #1, esc$; ”+0000000000, 1, 00, n”; lf$; nul$;
50 print #1, esc$; ”rb01; 12345”; lf$; nul$;
60 print #1, esc$; ”rb02; *abc*”; lf$; nul$;
70 print #1, esc$; ”xs; i, 0002, 0002c5000”; lf$; nul$;
(2)

10 print #1, esc$; ”c”; lf$; nul$;
20 print #1, esc$; ”pc001; 0200, 0300, 1, 1, c, 00, b; 01, 02”; lf$; nul$;
30 print #1, esc$; ”pv01; 0650, 0550, 0200, 0150, b, 33, b; 02”; lf$; nul$;
40 print #1, esc$; ”xb01; 0200, 0550, 3, 1, 03, 03, 08, 08, 03, 0, 0150; 01, 02”; lf$;
nul$;
50 print #1, esc$; ”rb; s”; lf$; ”001”; lf$; nul$;
60 print #1, esc$; ”xs; i, 0002, 0002c5000”; lf$; nul$;
(3)

10 print #1, esc$; ”c”; lf$; nul$;
20 print #1, esc$; ”xb01; 0200, 0125, p, 04, 03, 03, 0, 0010”; lf$; nul$;
30 print #1, esc$; ”xb02; 0830, 0550, q, 08, 04, 05, 3”; lf$; nul$;
40 print #1, esc$; ”rb01; pdf417”; lf$; nul$;
50 print #1, esc$; ”rb02; data matrix”; lf$; nul$;
60 print #1, esc$; ”xs; i, 0002, 0002c5000”; lf$; nul$;