Brother PJ-622 User Manual

Brother PJ-600 Series Command Reference
PJ-600 Series Printer
Raster Command Reference
2011-1-11 Version 1.0
Brother Industries, Ltd.
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference
1.
Introduction .............................................................................................................1
2. Overview................................................................................................................2
3. Print Data ............................................................................................................... 3
3.1. Print data overview ........................................................................................3
3.2. Page data details ..........................................................................................5
4. Status ................................................................................................................. 12
4.1. Overview .................................................................................................. 12
4.2. Definitions of each part.................................................................................. 13
5. Command............................................................................................................. 17
5.1. Overview .................................................................................................. 17
5.2. Command details ........................................................................................ 18
5.3. Utility Command details ................................................................................. 25
5.4. Returned data for retrieve commands ................................................................ 39
6. Flow Charts........................................................................................................... 42
6.1. USB/Bluetooth/IrDA Printing flow...................................................................... 43
7. USB Specifications .................................................................................................. 45
8. Compatibility and Support Information ........................................................................... 46
8.1. Compatibility with PJ-500 series printers ............................................................. 46
8.2. Inquiry ..................................................................................................... 46
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 1

1. Introduction

This material provides the necessary information for directly controlling the Brother PJ-600 series
printer (hereafter, referred to as “PJ unit”). This information is provided assuming that the user has full
understanding of the operating system being used and basic mastery of USB/Bluetooth/IrDA in a
developer’s environment.
Details concerning the USB interface are not described in this material. If a USB interface is being
used, refer to “7. USB Specifications
” to prepare the interface.
We accept no responsibility for any problems caused by programs that you develop using the
information provided in this material, affecting software, data or hardware, including the Brother PJ unit,
and any problems resulting directly or indirectly from them. These materials are provided in their current
condition, and we assume no responsibility for their content. Use this material only if you accept these
terms.
This material shall not be reproduced, in part or in full, without prior approval. In addition, this material
shall not be used as evidence in a lawsuit or dispute in a way that is unfavorable towards our company.
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 2

2. Overview

The printing procedure is described below. For detailed flow charts, refer to “6. Flow Charts” For details
on each command, refer to “5. Command
”.
1. Open USB/Bluetooth Serial/IrDA port
Open the USB/Bluetooth Serial/IrDA port in the operating environment. In addition, since the procedure
for opening the USB port is not described in this material, perform the appropriate operation for the
environment being used.
2. Check machine status
The “Status information request” command is sent to the printer, the status information received from the
printer is analyzed, and then the status of the printer is determined. For details on the “Status information
request” command and on the definition of “status”, refer to “4. Status
5. Command
”.
” and “Status information request” in
Printing is possible if the analysis results show that the following conditions are met.
Paper compatible with the print data is installed in the printer.
No error has occurred.
This step is not necessary with a unidirectional transmission.
3. Send print data
The print data is sent. The structure of the print data is explained in the next section, “3. Print Data
4. Confirmation of printing completion
When printing is completed, the status is sent from the printer. This status is analyzed and, if printing is
completed, one page is printed. If the print job has multiple pages, 2 through 4 are repeated.
In addition, the status is not sent with a unidirectional transmission.
5. Close USB/Bluetooth Serial/IrDA port
After all printing is finished, close the port.
”.
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 3

3. Print Data

3.1. Print data overview

The print data is constructed of the following: Initialization data, Printing commands and Print
command. If the print job consists of multiple pages, through are repeated.
1. Initialization data
The beginning of the job is specified only once.
Sequence Command Name Description/Example
1 Invalid command 700
bytes
2 Switch command mode Switches the command mode of the PJ unit.
3 Initialize Initializes the print buffer.
4 Set 2-ply mode To specify the disable setting for 2-ply paper:
5 Set density Specifies the print density. To set the density to 5:
6 Set form feed mode Specifies the operation that is performed when the “Form
Sends the “invalid” command to the PJ unit, then clears
raster data remaining in the unit.
00 H, 00 H, 00 H, … ,00 H
1B H , 69 H , 61 H , 00 H
1B H , 40 H
1B H , 7E H , 70 H , 00 H
1B H, 7E H, 64 H, 80 H, 00H
Feed” command is received.
To feed according to the paper size specified with the
“Set paper height” command (step 9):
1B H, 7E H, 66 H, 01 H
7 Set dash line print To turn off printing of the dashed line:
8 Set paper width Specifies the paper width. For A4 on a 300 dpi model:
9 Set paper height Specifies the paper size. For A4 on a 300 dpi model:
*If an unlimited length or custom paper size is selected, use Set paper length command in step 9.
© 2011 Brother Industries, Ltd. All Rights Reserved.
1B H, 7E H, 2D H, 00 H
1B H, 7E H, 77 H, 2C H, 01 H
1B H, 7E H, 68 H, E4 H, 0C H
2. Printing commands
Repeat for each raster line in the print job.
Brother PJ-600 Series Command Reference 4
Sequence Command
Set left margin Moves the cursor the specified distance from the left edge
Name Description/Example
of the printable area in the X direction.
1B H, 7E H, 24 H, {n1}, {n2}
1 Raster line data
transfer
Sends the raster line data.
To send 300 bytes of data:
1B H, 7E H, 2A H, 2C H, 01 H, FF H, FF H….
Multi-line feed Terminates raster line data and feeds 1 or more lines.
1B H, 7E H, 4A H, {n1}
Note:
“Set left margin” and “1 Raster line data transfer” commands can be sent more than once per line
Example: The raster line data shown below can be sent with the following commands.
In addition, it is recommended that the “set left margin” command be used when a blank space extends
for 16 bytes or more.
Set left margin: 1BH, 7EH, 24H, 10H, 00H
Raster line data transfer: 1BH, 7EH, 2AH, 02H, 00H, 1FH, F8H
Set left margin: 1BH, 7EH, 24H, 30H, 00H
Raster line data transfer: 1BH, 7EH, 2AH, 01H, 00H, 3CH
Multi-line feed: 1BH, 7EH, 4AH, 01H
3. Print command
Specified at the end of the page.
Sequence Command Name Description/Example
Form feed Specifies the end of a page.
BH, 7EH, 0CH
© 2011 Brother Industries, Ltd. All Rights Reserved.

3.2. Page data details

Information on the values for the printed page size is provided below.

3.2.1. Resolution

Brother PJ-600 Series Command Reference 5
Model Resolution
200 dpi (PJ-622、PJ-662)
300 dpi (PJ-623、PJ-663)
203 dpi in main scan direction,
200 dpi in secondary scan direction
300 dpi in main scan direction,
300 dpi in secondary scan direction
© 2011 Brother Industries, Ltd. All Rights Reserved.

3.2.2. Page size (300 dpi model)

Brother PJ-600 Series Command Reference 6
B
G
A C F H
D
E
A: Length
B: Top margin
C: Print area length D: Bottom margin
E: Width F: Left margin
G:Printable area width H: Right margin
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 7
Fixed length
*When the paper type is set to “cut sheet” or “perforated roll retract”
Paper A
A4 297.0 mm
3507 dots
Legal 355.6 mm
4200 dots
Letter 279.4 mm
3300 dots
Custom
Size
50.8 mm
600 dot
B C D E F G H
2.5 mm
30 dots
2.5 mm
30 dots
2.5 mm
30 dots
2.5 mm
30 dots
279.4 mm
3300 dots
347.1 mm
4100 dots
270.9 mm
3200 dots
42.3 mm
500 dots
15.0 mm
177 dots
5.9 mm
70 dots
5.9 mm
70 dots
5.9 mm
70 dots
210.0 mm
2480 dots
215.9 mm
2550 dots
215.9 mm
2550 dots
101.6 mm
1200 dot
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
203.2 mm
2400 dots
208.6 mm
2464 dots
208.6 mm
2464 dots
94.8 mm
1120 dots
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
Min
Custom
Size
2540.0 mm
30000 dot
2.5 mm
30 dots
2531.5 mm
29900 dots
5.9 mm
70 dots
215.9 mm
2550 dot
3.4 mm
40 dots
208.6 mm
2464 dot
3.9 mm
46 dots
Max
*When the paper type is set to “roll”
Paper A B C D E F G H
A4 297.0 mm
3507 dots
Legal 355.6 mm
4200 dots
Letter 279.4 mm
3300 dots
Custom
Size
50.8 mm
600 dots
11.9 mm
140 dots
11.9 mm
140 dots
11.9 mm
140 dots
11.9 mm
140 dots
Min
Custom
Size
2540.0 mm
30000 dots
11.9 mm
140 dots
Max
279.1 mm
3297 dots
337.8 mm
3990 dots
261.6 mm
3090 dots
33.0 mm
390 dots
2522.2 mm
29790 dots
5.9 mm
70 dots
5.9 mm
70 dots
5.9 mm
70 dots
5.9 mm
70 dots
5.9 mm
70 dots
210.0 mm
2480 dots
215.9 mm
2550 dots
215.9 mm
2550 dots
101.6 mm
1200 dots
215.9 mm
2550 dots
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
3.4 mm
40 dots
203.2 mm
2400 dots
208.6 mm
2464 dots
208.6 mm
2464 dots
94.8 mm
1120 dots
208.6 mm
2464 dots
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
3.9 mm
46 dots
© 2011 Brother Industries, Ltd. All Rights Reserved.
*When the paper type is set to “perforated roll”
Brother PJ-600 Series Command Reference 8
Paper A
A4 297.0 mm
3507 dots
Legal 355.6 mm
4200 dots
Letter 279.4 mm
3300 dots
Custom
Size
50.8 mm
600 dots
11.9 mm
140 dots
11.9 mm
140 dots
11.9 mm
140 dots
11.9 mm
140 dots
Min
Custom
Size
2540.0 mm
30000 dots
11.9 mm
140 dots
Max
B C D E F G H
268.9 mm
3177 dots
327.6 mm
3870 dots
251.4 mm
2970 dots
22.9 mm
270 dots
2512.0 mm
29670 dots
16.1 mm
190 dots
16.1 mm
190 dots
16.1 mm
190 dots
16.1 mm
190 dots
16.1 mm
190 dots
210.0 mm
2480 dots
215.9 mm
2550 dots
215.9 mm
2550 dots
101.6 mm
1200 dots
215.9 mm
2550 dots
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
3.4 mm
40 dots
203.2 mm
2400 dots
208.6 mm
2464 dots
208.6 mm
2464 dots
94.8 mm
1120 dots
208.6 mm
2464 dots
3.4 mm
40 dots
3.6 mm
43 dots
3.6 mm
43 dots
3.4 mm
40 dots
3.9 mm
46 dots
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 9

3.2.3. Page size (200 dpi model)

Fixed length
*When the paper type is set to “cut sheet” or “perforated roll retract”
Paper
A4 297.0 mm
Legal 355.6 mm
Letter 279.4 mm
Custom
Size Min
Custom
Size
A B C D E F G H
2.5 mm
2338 dots
20 dots
2.5 mm
2800 dots
20 dots
2.5 mm
2200 dots
50.8 mm
400 dots
2540.0 mm
20000 dots
20 dots
2.5 mm
20 dots
2.5 mm
20 dots
Max
*When the paper type is set to “roll”
Paper
A4 297.0 mm
A B C D E F G H
10.9 mm
279.4 mm
2200 dots
347.1 mm
2733 dots
270.9 mm
2133 dots
42.2 mm
333 dots
2531.4 mm
19933 dots
280.0 mm
15.0 mm
118 dots
6.0 mm
47 dots
6.0 mm
47 dots
6.0 mm
47 dots
6.0 mm
47 dots
6.0 mm
210.0 mm
1654 dots
215.9 mm
1700 dots
215.9 mm
1700 dots
101.6 mm
800 dots
215.9 mm
1700 dots
210.0 mm
3.4 mm
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
3.4 mm
27 dots
3.4 mm
203.2 mm
1600 dots
207.2 mm
1632 dots
207.2 mm
1632 dots
94.7 mm
746 dots
207.2 mm
1632 dots
203.2 mm
3.4 mm
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
5.2 mm
41 dots
3.4 mm
2338 dots
Legal 355.6 mm
10.9 mm
2800 dots
Letter 279.4 mm
10.9 mm
2200 dots
Custom
Size Min
Custom
Size
50.8 mm
400 dots
2540.0 mm
20000 dots
10.9 mm
10.9 mm
Max
93 dots
86 dots
86 dots
86 dots
86 dots
2198 dots
338.7 mm
2667 dots
262.5 mm
2067 dots
33.9 mm
267 dots
2523.1 mm
19867 dots
47 dots
6.0 mm
47 dots
6.0 mm
47 dots
6.0 mm
47 dots
6.0 mm
47 dots
1654 dots
215.9 mm
1700 dots
215.9 mm
1700 dots
101.6 mm
800 dots
215.9 mm
1700 dots
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
3.4 mm
27 dots
1600 dots
207.2 mm
1632 dots
207.2 mm
1632 dots
94.7 mm
746 dots
207.2 mm
1632 dots
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
5.2 mm
41 dots
© 2011 Brother Industries, Ltd. All Rights Reserved.
*When the paper type is set to “perforated roll”
Brother PJ-600 Series Command Reference 10
Paper
A4 297.0 mm
Legal 355.6 mm
Letter 279.4 mm
Custom
Size Min
Custom
Size
A B
10.9 mm
2338 dots
86 dots
10.9 mm
2800 dots
86 dots
10.9 mm
2200 dots
50.8 mm
400 dots
2540.0 mm
20000 dots
86 dots
10.9 mm
86 dots
10.9 mm
86 dots
Max
C D E F G H
269.0 mm
2118 dots
327.7 mm
2580 dots
251.5 mm
1980 dots
22.9 mm
180 dots
2512.0 mm
19780 dots
17.0 mm
134 dots
17.0 mm
134 dots
17.0 mm
134 dots
17.0 mm
134 dots
17.0 mm
134 dots
210.0 mm
1654 dots
215.9 mm
1700 dots
215.9 mm
1700 dots
101.6 mm
800 dots
215.9 mm
1700 dots
3.4 mm
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
3.4 mm
27 dots
203.2 mm
1600 dots
207.2 mm
1632 dots
207.2 mm
1632 dots
94.7 mm
746 dots
207.2 mm
1632 dots
3.4 mm
27 dots
4.3 mm
34 dots
4.3 mm
34 dots
3.4 mm
27 dots
5.2 mm
41 dots
© 2011 Brother Industries, Ltd. All Rights Reserved.

3.2.4. Raster line

The following shows how the raster is arranged on the pins of the print head according to "raster
graphics transfer".
The number of offset pins is calculated automatically based on the “set paper width” command and
centering the print area across the print head
The raster data specified with the “set left margin” and “1 raster line data transfer” commands is
reflected in the pins of the print area.
Furthermore, specified print data that extends out of the print area is automatically cut by the unit. In
addition, the page margins (in all directions) in the figure shown below have no effect on the raster
line.
Number of offset pins
0 pin
First byte
Brother PJ-600 Series Command Reference 11
Total number of pins
Number of print ar ea pins
Number of unused pins
Raster line
Pins on print head
Feeding direction
Paper margin
Total number of pins (300dpi) 2592
Paper Number of
offset pins
A4 96 2400 96
Legal 64 2464 64
Letter 64 2464 64
Total number of pins (200dpi) 1728
Paper Number of
offset pins
A4 64 1600 64
Print area
Number of
Print area pins
Number of
Print area pins
Number of
unused pins
Number of
unused pins
Legal 48 1632 48
Letter 48 1632 48
© 2011 Brother Industries, Ltd. All Rights Reserved.

4. Status

4.1. Overview

The status is sent from the printer to the computer as a reply to the "status information request"
command or as an error message. The size is fixed to 32 bytes.
Number Offset Size Name Value/Reference
Brother PJ-600 Series Command Reference 12
1 0 1 Print head mark Fixed to “80 Hex”
2 1 1 Size Fixed to “20 Hex”
3 2 1 Reserved Fixed to ’B’ (42 Hex)
4 3 1 Series code Refer to section 4.2.1.
5 4 1 Model code Refer to section 4.2.1.
6 5 1 Reserved
7 6 1 Reserved Fixed to “00 Hex”
8 7 1 Reserved Fixed to “00 Hex”
9 8 1 Error information 1 Refer to section 4.2.2.
10 9 1 Error information 2 Refer to section 4.2.2.
11 10 1 Paper width Refer to section 4.2.3.
12 11 1 Paper loaded Refer to section 4.2.4.
13 12 1 Reserved Fixed to “00 Hex”
14 13 1 Reserved Fixed to “00 Hex”
15 14 1 Reserved Fixed to “00 Hex”
16 15 1 Reserved Fixed to “00 Hex”
17 16 1 Reserved Fixed to “00 Hex”
18 17 1 Paper Length(Lower order
bytes)
19 18 1 Status type Refer to section 4.2.5.
20 19 1 Phase type Refer to section 4.2.6.
21 20 1 Higher order bytes of phase
number
22 21 1 Lower order bytes of phase
number
23 22 1 Notification number Refer to section 4.2.7.
24 23 1 Reserved Fixed to “00 Hex”
25 24 8 Reserved Fixed to “00 Hex”
Fixed to '0' 30 Hex
Refer to section 4.2.4.
Refer to section 4.2.6.
Refer to section 4.2.6.
© 2011 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600 Series Command Reference 13

4.2. Definitions of each part

4.2.1. Series/model

Model name
PJ-622 ‘6’ (0x36) ‘1’ (0x31) PJ-623 ‘6’ (0x36) ‘2’ (0x32)
PJ-662 ‘6’ (0x36) ‘3’ (0x33) PJ-663 ‘6’ (0x36) ‘4’ (0x34)

4.2.2. Error information 1 and error information 2

Error information 1
Flag Mask Definition Bit 0 0x01 Not used Bit 1 0x02 Page finished (only while printing) Bit 2 0x04 Not used Bit 3 0x08 Charging required Bit 4 0x10 Not used Bit 5 0x20 Not used Bit 6 0x40 Not used Bit 7 0x80 Not used
Status code
Series Model
Error information 2
Flag Mask Definition Bit 0 0x01 Not used Bit 1 0x02 Not used Bit 2 0x04 Not used Bit 3 0x08 Not used Bit 4 0x10 Not used Bit 5 0x20 Not used Bit 6 0x40 Not used Bit 7 0x80 Not used
© 2011 Brother Industries, Ltd. All Rights Reserved.
Loading...
+ 33 hidden pages