Brother PJ-773, PJ-763MFi, PJ-763, PJ-762, PJ-723 Raster Command Reference

...
Brother PJ-600/700 Series Command Reference
PJ-600/700 Series Printer
Raster Command Reference
PJ-622/623/662/663/673
2015-11-2 Version 1.2
Brother Industries, Ltd.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 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 .................................................................................................................... 13
4.1. Overview .................................................................................................... 13
4.2. Definitions of each part ................................................................................... 14
5. Command ............................................................................................................... 18
5.1. Overview .................................................................................................... 18
5.2. Command details .......................................................................................... 19
5.3. Utility Command details ................................................................................... 28
5.4. Returned data for retrieve commands .................................................................. 45
6. Flow Charts ............................................................................................................. 48
6.1. USB/Bluetooth/IrDA Printing flow ....................................................................... 49
7. USB Specifications .................................................................................................... 51
8. Compatibility and Support Information ............................................................................. 52
8.1. Compatibility with PJ-500 series printers .............................................................. 52
8.2. Inquiry ........................................................................................................ 52
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 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 and networks 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.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 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/Network port Open the USB/Bluetooth Serial/IrDA/network 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” in “Command Reference”. 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/Network port
After all printing is finished, close the port.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
3
Sequence
Command Name
Description/Example
1
Invalid command 700 bytes
Sends the “invalid” command to the PJ unit, then clears
raster data remaining in the unit. 00 H, 00 H, 00 H, … ,00 H
2
Switch command mode
Switches the command mode of the PJ unit. 1B H , 69 H , 61 H , 00 H
3
Initialize
Initializes the print buffer. 1B H , 40 H
4
Set 2-ply mode
To specify the disable setting for 2-ply paper: 1B H , 7E H , 70 H , 00 H
5
Set density
Specifies the print density. To set the density to 5: 1B H, 7E H, 64 H, 80 H, 00H
6
Set form feed mode
Specifies the operation that is performed when the “Form 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: 1B H, 7E H, 2D H, 00 H
8
Set paper width
Specifies the paper width. For A4 on a 300 dpi model: 1B H, 7E H, 77 H, 2C H, 01 H
9
Set paper height
Specifies the paper size. For A4 on a 300 dpi model: 1B H, 7E H, 68 H, E4 H, 0C H
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.
*If an unlimited length or custom paper size is selected, use Set paper length command in step 9.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
4
Sequence
Command Name
Description/Example
Set left margin
Moves the cursor the specified distance from the left edge 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}
Sequence
Command Name
Description/Example
Form feed
Specifies the end of a page. BH, 7EH, 0CH
2. Printing commands Repeat for each raster line in the print job.
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.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
5
Model
Resolution
200 dpi (PJ-622/662/722/762)
300 dpi (PJ-623/663/673/723/763/763MFi/773)
203 dpi in main scan direction, 200 dpi in secondary scan direction 300 dpi in main scan direction, 300 dpi in secondary scan direction
3.2. Page data details
Information on the values for the printed page size is provided below.
3.2.1. Resolution
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
6
3.2.2. Page size (300 dpi model)
B
G
A C
F H
D
E
A: Length B: Top margin C: Printable area length D: Bottom margin E: Width F: Left margin G:Printable area width H: Right margin
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
7
Paper A B C D E F G H
A4
297.0 mm 3507 dots
2.5 mm 30 dots
279.4 mm 3300 dots
15.0 mm 177 dots
210.0 mm 2480 dots
3.4 mm 40 dots
203.2 mm 2400 dots
3.4 mm 40 dots
Legal
355.6 mm
4200 dots
2.5 mm 30 dots
347.1 mm 4100 dots
5.9 mm 70 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm 2464 dots
3.6 mm 43 dots
Letter
279.4 mm
3300 dots
2.5 mm 30 dots
270.9 mm 3200 dots
5.9 mm 70 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm 2464 dots
3.6 mm 43 dots
A5
210.0mm
2480 dots
2.5 mm 30 dots
193.8 mm 2289 dots
13.6 mm 161 dots
148.0 mm 1748 dots
3.4 mm 40 dots
141.2 mm 1668 dots
3.4 mm 40 dots
Custom Size Min
50.8 mm 600 dot
2.5 mm 30 dots
42.3 mm 500 dots
5.9 mm 70 dots
101.6 mm 1200 dot
3.4 mm 40 dots
94.8 mm 1120 dots
3.4 mm 40 dots
Custom Size Max
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
Paper A B C D E F G H
A4
297.0 mm
3507 dots
11.9 mm
140 dots
279.1 mm 3297 dots
5.9 mm 70 dots
210.0 mm 2480 dots
3.4 mm 40 dots
203.2 mm
2400 dots
3.4 mm 40 dots
Legal
355.6 mm
4200 dots
11.9 mm
140 dots
337.8 mm 3990 dots
5.9 mm 70 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm
2464 dots
3.6 mm 43 dots
Letter
279.4 mm
3300 dots
11.9 mm
140 dots
261.6 mm 3090 dots
5.9 mm 70 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm
2464 dots
3.6 mm 43 dots
A5
210.0mm
2480 dots
11.9 mm
140 dots
192.2 mm 2270 dots
5.9 mm 70 dots
148.0 mm 1748 dots
3.4 mm 40 dots
141.2 mm
1668 dots
3.4 mm 40 dots
Custom Size Min
50.8 mm 600 dots
11.9 mm
140 dots
33.0 mm 390 dots
5.9 mm 70 dots
101.6 mm 1200 dots
3.4 mm 40 dots
94.8 mm
1120 dots
3.4 mm 40 dots
Custom Size Max
2540.0 mm
30000 dots
11.9 mm
140 dots
2522.2 mm
29790 dots
5.9 mm 70 dots
215.9 mm 2550 dots
3.4 mm 40 dots
208.6 mm
2464 dots
3.9 mm 46 dots
Fixed length
*When the paper type is set to “cut sheet” or perforated roll retract
*When the paper type is set to “roll”
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
8
Paper A B C D E F G H
A4
297.0 mm
3507 dots
11.9 mm
140 dots
268.9 mm 3177 dots
16.1 mm 190 dots
210.0 mm 2480 dots
3.4 mm 40 dots
203.2 mm
2400 dots
3.4 mm 40 dots
Legal
355.6 mm
4200 dots
11.9 mm
140 dots
327.6 mm 3870 dots
16.1 mm 190 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm
2464 dots
3.6 mm 43 dots
Letter
279.4 mm
3300 dots
11.9 mm
140 dots
251.4 mm 2970 dots
16.1 mm 190 dots
215.9 mm 2550 dots
3.6 mm 43 dots
208.6 mm
2464 dots
3.6 mm 43 dots
A5
210.0mm
2480 dots
11.9 mm
140 dots
182.0 mm 2150 dots
16.1 mm 190 dots
148.0 mm 1748 dots
3.4 mm 40 dots
141.2 mm
1668 dots
3.4 mm 40 dots
Custom Size Min
50.8 mm 600 dots
11.9 mm
140 dots
22.9 mm 270 dots
16.1 mm 190 dots
101.6 mm 1200 dots
3.4 mm 40 dots
94.8 mm
1120 dots
3.4 mm 40 dots
Custom Size Max
2540.0 mm
30000 dots
11.9 mm
140 dots
2512.0 mm
29670 dots
16.1 mm 190 dots
215.9 mm 2550 dots
3.4 mm 40 dots
208.6 mm
2464 dots
3.9 mm 46 dots
*When the paper type is set to “perforated roll”
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
9
Paper
A B C D E F G
H
A4
297.0 mm
2338 dots
2.5 mm 20 dots
279.4 mm 2200 dots
15.0 mm 118 dots
210.0 mm 1654 dots
3.4 mm 27 dots
203.2 mm 1600 dots
3.4 mm 27 dots
Legal
355.6 mm
2800 dots
2.5 mm 20 dots
347.1 mm 2733 dots
6.0 mm 47 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm 1632 dots
4.3 mm 34 dots
Letter
279.4 mm
2200 dots
2.5 mm 20 dots
270.9 mm 2133 dots
6.0 mm 47 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm 1632 dots
4.3 mm 34 dots
A5
210.0 mm
1653 dots
2.5 mm 20 dots
193.8 mm 1526 dots
13.6 mm 107 dots
148.0 mm 1165 dots
3.4 mm 27 dots
141.1 mm 1111 dots
3.4 mm 27 dots
Custom Size Min
50.8 mm 400 dots
2.5 mm 20 dots
42.2 mm 333 dots
6.0 mm 47 dots
101.6 mm 800 dots
3.4 mm 27 dots
94.7 mm 746 dots
3.4 mm 27 dots
Custom Size Max
2540.0 mm 20000 dots
2.5 mm 20 dots
2531.4 mm 19933 dots
6.0 mm
47 dots
215.9 mm
1700 dots
3.4 mm 27 dots
207.2 mm 1632 dots
5.2 mm 41 dots
Paper
A B C D E F G
H
A4
297.0 mm
2338 dots
10.9 mm 93 dots
280.0 mm 2198 dots
6.0 mm 47 dots
210.0 mm 1654 dots
3.4 mm 27 dots
203.2 mm
1600 dots
3.4 mm 27 dots
Legal
355.6 mm
2800 dots
10.9 mm 86 dots
338.7 mm 2667 dots
6.0 mm 47 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm
1632 dots
4.3 mm 34 dots
Letter
279.4 mm
2200 dots
10.9 mm 86 dots
262.5 mm 2067 dots
6.0 mm 47 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm
1632 dots
4.3 mm 34 dots
A5
210.0 mm
1653 dots
10.9 mm 86 dots
193.0 mm 1520 dots
6.0 mm 47 dots
148.0 mm 1165 dots
3.4 mm 27 dots
141.1 mm
1111 dots
3.4 mm 27 dots
Custom Size Min
50.8 mm 400 dots
10.9 mm 86 dots
33.9 mm 267 dots
6.0 mm 47 dots
101.6 mm 800 dots
3.4 mm 27 dots
94.7 mm 746 dots
3.4 mm 27 dots
Custom Size Max
2540.0 mm 20000 dots
10.9 mm 86 dots
2523.1 mm 19867 dots
6.0 mm 47 dots
215.9 mm 1700 dots
3.4 mm 27 dots
207.2 mm
1632 dots
5.2 mm 41 dots
3.2.3. Page size (200 dpi model)
Fixed length *When the paper type is set to “cut sheet” or perforated roll retract
*When the paper type is set to “roll”
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
10
Paper
A B C D E F G
H
A4
297.0 mm
2338 dots
10.9 mm 86 dots
269.0 mm 2118 dots
17.0 mm 134 dots
210.0 mm 1654 dots
3.4 mm 27 dots
203.2 mm
1600 dots
3.4 mm 27 dots
Legal
355.6 mm
2800 dots
10.9 mm 86 dots
327.7 mm 2580 dots
17.0 mm 134 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm
1632 dots
4.3 mm 34 dots
Letter
279.4 mm
2200 dots
10.9 mm 86 dots
251.5 mm 1980 dots
17.0 mm 134 dots
215.9 mm 1700 dots
4.3 mm 34 dots
207.2 mm
1632 dots
4.3 mm 34 dots
A5
210.0 mm
1653 dots
10.9 mm 86 dots
182.0 mm 1433 dots
17.0 mm 134 dots
148.0 mm 1165 dots
3.4 mm 27 dots
141.1 mm
1111 dots
3.4 mm 27 dots
Custom Size Min
50.8 mm 400 dots
10.9 mm 86 dots
22.9 mm 180 dots
17.0 mm 134 dots
101.6 mm 800 dots
3.4 mm 27 dots
94.7 mm 746 dots
3.4 mm 27 dots
Custom Size Max
2540.0 mm 20000 dots
10.9 mm 86 dots
2512.0 mm 19780 dots
17.0 mm 134 dots
215.9 mm 1700 dots
3.4 mm 27 dots
207.2 mm
1632 dots
5.2 mm 41 dots
*When the paper type is set to “perforated roll”
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
11
0 pin
Paper margin
First byte
Raster line
Feeding direction
Print area
Pins on print head
Number of print area pins
Number of unused pins
Total number of pins
Number of offset pins
Paper
Number of offset pins
Number of
Print area pins
Number of
unused pins
A4
96
2400
96
Legal
64
2464
64
Letter
64
2464
64
A5
462
1668
462
Paper
Number of offset pins
Number of
Print area pins
Number of
unused pins
A4
64
1600
64
Legal
48
1632
48
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.
Total number of pins (300dpi) 2592
Total number of pins (200dpi) 1728
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
12
Letter
48
1632
48
A5
309
1111
308
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
13
Number
Offset
Size
Name
Value/Reference
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
Fixed to '0' 30 Hex
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)
Refer to section 4.2.4.
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
Refer to section 4.2.6.
22
21
1
Lower order bytes of phase number
Refer to section 4.2.6.
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”
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.
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
14
Model name
Status code
Series
Model
PJ-622
‘6’ (0x36)
‘1’ (0x31)
PJ-623
‘6’ (0x36)
‘2’ (0x32)
PJ-662
‘6’ (0x36)
‘3’ (0x33)
PJ-663
‘6’ (0x36)
‘4’ (0x34)
PJ-673
6 (0x36)
5 (0x35)
PJ-722
‘6’ (0x36)
‘6’ (0x36)
PJ-723
‘6’ (0x36)
‘7’ (0x37)
PJ-762
‘6’ (0x36)
‘8’ (0x38)
PJ-763
‘6’ (0x36)
‘9’ (0x39)
PJ-763MFi
‘6’ (0x36)
‘A’ (0x41)
PJ-773
6 (0x36)
B (0x42)
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
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
4.2. Definitions of each part
4.2.1. Series/model
4.2.2. Error information 1 and error information 2
Error information 1
Error information 2
© 2015 Brother Industries, Ltd. All Rights Reserved.
Brother PJ-600/700 Series Command Reference
15
Paper loaded
Value
No paper
00 Hex
Paper
01 Hex
4.2.3. Paper width and length
Paper width:
No paper: 0x00
Paper: 0xD2 Paper length: Fixed to “0x00
4.2.4. Paper loaded
© 2015 Brother Industries, Ltd. All Rights Reserved.
Loading...
+ 37 hidden pages