[ESC+2D31] QR Code (Model 1)

CL4NX CL6NX CL4NX-J CL6NX-J PW208/PW208m PW208NX/PW208mNX FX3-LX CT4-LX/HC4-LX PW4NX LR4NX-FA S84NX/S86NX CL4-SXR CL6-SXR

Hexadecimal code

ESC <1B>16
2D31 <32>16<44>16<33>16<31>16

Parameter

,a,bb,c,d(,ee,ff,gg)

Initial value

Nil

Valid range and term of command

When the power switch is OFF The set parameter is not maintained.
Valid range within item The set parameter becomes invalid.
Valid range between items The set parameter becomes invalid.

Function

Specifying QR Code (Model 1)

Format (Setup part)

<2D31>,a, bb, c, d(,ee, ff, gg)

  • Parameter

    a [Error Correction Level]

    = L: 7%

    = M: 15%

    = Q: 25%

    = H: 30%

    b [Size of one side of cell] = Valid Range: 01 to 99 dots

    * Specify more than 02 dots when head density is 12 dots/mm, otherwise scanner may have reading problem.


    c [Data setup mode]

    = 0: Manual setup

    = 1: Automatic setup

    * Note: You need to change the method of specifying print data with this setting.

    d [Concatenation mode]

    = 0: Normal mode

    = 1: Concatenation mode


    Following parameter must be specified when specifying 1 (Concatenation mode) in Concatenation mode.
    Omit following parameter in normal mode.

    e [Number of partitions of concatenation mode] = Valid Range: 01 to 16

    * Number of partitions: Specifying how many QR code are to be concatenated divided by Concatenation mode.

    f [Sequential number partitioned by concatenation mode] = Valid Range: 01 to 16

    * Sequential number: Specifying what number is it of divided QR code.

    g [Concatenation mode parity data] = Valid Range: 00 to FF

    * Parity data: Specifying exclusive OR of all the print data in divided QR code with HEX characters.

Format (Data part)

Manual setup (Data setup mode)

<DS>k,n...n

* Use when input mode specification is Numeric mode, Alphanumeric mode and Kanji mode.

<DN>mmmm, n...n

* Use when specifying by binary.

Automatic setup (Data setup mode)

<DN>mmmm, n...n

* Change input mode automatically according to input data.

  • Parameter

    k [Input mode]

    = 1: Numeric mode

    = 2: Alphanumeric mode

    = 3: Kanji mode (Shift JIS Kanji)

    * Specify only when specifying Manual setup in Data setting mode.

    * There is binary specification other than above, but data specification command is different.

    M [Number of data] = Valid Range: 1 to 486

    * Specify when specifying Automatic setup in Data setting mode or specifying binary specification in Manual setup.

    N [Print data] = Data

Format (version)

<QV>pp

* Specify when specifying the version.

  • Parameter

    pp [Version] = 00 to 14 (MODEL1)

    * This setting is used when fixing the size of QR symbol with the version command. When not specified, it becomes Auto.

    Specifying 00 also becomes Auto. It doesn't become a parameter error from 00 to 40.

    * See [ESC+QV] QR Code Version for details.

Supplementary Explanation 1

  1. When specifying Kanji in <DN>, specify size that is 2 X number of Kanji characters.
  2. For <DN> in Automatic setup, when 80H to 9FH and E0H to FFH is specified as data, it is handed as Kanji mode, and cannot specify them as binary.
  3. Commands that allow data size specification and binary data specification (<DN>) will result in a command error if there is no ESC (0x1B) immediately after the specified amount of data.

Coding Example 1

Error correction level: 7%, Size of one side of cell: 05

Data setup mode: Manual setup, Concatenation mode: Normal


<A>
<V>100<H>200<2D31>,L,05,0,0
<DS>1,012345
<Q>2
<Z>
                    

Supplementary Explanation 2

  1. If the parameter other than the description is specified or number of print data is not match, print is not executed.
  2. Data specification command in data part varies according to parameter setup or specified data.

Coding Example 2

Error correction level: 7%, Size of one side of cell: 04

Mixed specification of Manual setup (Data setup mode)

In Manual setup, you can proceed specifying data in specified input mode (Numeric, Alphanumeric, Kanji, Binary).


<A>
<V>100<H>200
<2D31>,L,04,0,0
<DS>3,サトー
<DN>0010,0123456789
<DS>1,123
<Q>1
<Z>
                    

Supplementary Explanation 3

    Parameter part to be followed by Data part. Data part and data part should be specified in a row. When don't specify in a row, print result may not be secured.

Coding Example 3

Error correction level: 7%, Size of one side of cell: 05, Data setup mode: Manual setup, Concatenation mode: Normal, Version 5

Data setting mode: manual setting, combine mode: normal, printed in version 5


<A>
<V>100<H>200<2D31>,L,05,0,0
<QV>5
<DS>1,012345
<DN>0004,6789
<Q>1
<Z>
                    

Note

  1. Specify <QV> command between <2Dxx> and <DN>/<DS>.
  2. When resulted in a parameter error, it will be handled in the same manner of no specification.
  3. It doesn't become a parameter error from 00 to 40. (Set the value within the range corresponding to each model)
    Setting range (MODEL 1): 00 to 14.
  4. Sending the data exceeding the data size of specified version will result in error and QR code is not printed.

QR Code data size list (Model 1)

Version Error
Correction
Numeric Alpha-Numeric Kanji Binary
1
21×21
L 40 24 10 17
M 33 20 8 14
Q 25 15 6 11
H 16 10 4 7
2
25×25
L 81 49 20 34
M 66 40 17 28
Q 52 31 13 22
H 33 20 8 14
3
29×29
L 131 79 33 55
M 100 60 25 42
Q 81 49 20 34
H 52 31 13 22
4
33×33
L 186 113 48 78
M 138 84 35 58
Q 114 69 29 48
H 76 46 19 32
5
37×37
L 253 154 65 106
M 191 116 49 80
Q 157 95 40 66
H 105 63 27 44
6
41×41
L 321 194 82 134
M 249 151 64 104
Q 201 122 51 84
H 133 81 34 56
7
45×45
L 402 244 103 168
M 311 188 80 130
Q 253 154 65 106
H 167 101 43 70
8
49×49
L 493 299 126 206
M 378 229 97 158
Q 301 183 77 126
H 203 123 52 85
9
53×53
L 585 354 150 244
M 441 267 113 184
Q 369 223 94 154
H 239 145 61 100
10
57×57
L 690 418 177 287
M 526 319 135 219
Q 433 262 111 180
H 291 176 74 121
11
61×61
L 800 485 205 333
M 608 368 156 253
Q 493 299 126 205
H 342 207 87 142
12
65×65
L 915 555 234 381
M 694 421 178 289
Q 579 351 148 241
H 390 236 100 162
13
69×69
L 1030 624 264 429
M 790 479 202 329
Q 656 398 168 273
H 454 275 116 189
14
73×73
L 1167 707 299 486
M 877 531 225 365
Q 738 447 189 307
H 498 302 127 207