Brother RJ-4030 Software Manual

Raster command reference
Hide thumbs Also See for RJ-4030:

Advertisement

Software Developer's Manual
Raster Command Reference
RJ-4030/4040
Version 1.02

Advertisement

Table of Contents
loading

Summary of Contents for Brother RJ-4030

  • Page 1 Software Developer's Manual Raster Command Reference RJ-4030/4040 Version 1.02...
  • Page 2 Each owner whose software title is mentioned in this document has a Software License Agreement specific to its proprietary programs. Any trade names and product names of companies appearing on Brother products, related documents and any other materials are all trademarks or registered trademarks of those respective companies.
  • Page 3 Any updates, upgrades or alteration of the Documentation or Printer Model will be performed at the sole discretion of Brother. Brother may not respond to any request or inquiry about the Documentation. b. THIS DOCUMENTATION IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.
  • Page 4: Table Of Contents

    6.6 Normal flow for serial connection ····································································· 39 6.7 Error flow for serial connection ········································································ 40 6.8 Cleaning flow for serial connection ··································································· 41 Appendix A: USB Specifications ································································· 42 Appendix B: Introducing the Brother Developer Center ·································· 43 - i -...
  • Page 5: Introduction

    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 printer RJ-XXXX, 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.
  • Page 6: About Raster Commands

    Raster Command Reference About Raster Commands Using raster commands an RJ-XXXX printer (where “XXXX” is the model name) can be used to print without using our printer driver. This operation is useful in the following situations.  When printing from an operating system other than Windows (Example: When printing from a Linux computer or mobile terminal) ...
  • Page 7: Printing Using Raster Commands

    Raster Command Reference 1. Printing Using Raster Commands The printing procedure is described below. For detailed flow charts, refer to “6. Flow Charts”. For details on each command, refer to “4. Printing Command Details”. In addition, descriptions of the commands for the MCR (magnetic card reader) are provided. For details, refer “5.
  • Page 8 Note: In order to print at high speed when a USB port is used to send uncompressed raster data, the Brother RJ-XXXX starts printing when it starts to receive print data, instead of waiting for a print command (concurrent printing).
  • Page 9: Print Data

    Raster Command Reference 2. Print Data 2.1 Print data overview The print data is constructed of the following: (1) initialization commands, (2) control codes, (3) raster data, and (4) print commands. If the print job consists of multiple pages, (2) through (4) are repeated. (1) Initialization commands Specified only once at the beginning of the job.
  • Page 10 Raster Command Reference (3) Raster data Repeated for each page in the print job. Sequence Command Name Description/Example Raster graphics Sends a raster line that contains data with pixels set to “ON”. transfer Sends a raster line with all pixels set to “0”. Zero raster graphics 5Ah (Fixed) (4) Print commands...
  • Page 11: Sample (Analyzing The Print Data Of The Test Page)

    Test page 2.2.1 Preparation Install the two listed below. ・ Printer driver of the Brother RJ-XXXX ・ Binary file editor The data that we will analyze in this sample is a binary file. Therefore, use a binary file editor to display and check the contents of the binary file.
  • Page 12 Step 1: Change the port of the printer to “FILE:”. Open the Printers and Faxes folder, and then right-click the printer (in this case, RJ-4030) to display the Properties dialog box. In the Properties dialog box, click the [Ports] tab, select the “FILE:” check box, and then click the [Apply] button.
  • Page 13 Raster Command Reference When the test page is printed with the printer, a dialog box appears so that the file name can be specified. (Refer to the illustration below.) After a file name is typed in and the [OK] button is clicked, the printer driver creates the print data and saves it in a file with the specified name.
  • Page 14: Explanation Of Print Data For The Test Page

    Raster Command Reference 2.2.3 Explanation of print data for the test page The print data for the test page outputted in the previous section is described below. “2.2.1 The following illustration shows the print data created in section Preparation” opened in the binary file editor.
  • Page 15 Raster Command Reference Descriptions for the numbers in the print data on the previous page are provided in the following table. For details on each command, refer to “4. Printing Command Details”. Command Name Description 1 Invalidate A 350-byte invalidate command is sent. The “initialize”...
  • Page 16: Page Data Details

    Raster Command Reference 2.3 Page data details 2.3.1 Resolution Resolution Height-to-Width Proportion 203 dpi high, 203 dpi wide 2.3.2 Page size (a) Continuous length tape P r i n t a r e a Print area Feeding direction Landscape P o r t r a i t Number 1 Width 2 Length...
  • Page 17 Raster Command Reference (b) Die-cut labels Print area Number 1 Width 2 Length 3 Print area width (maximum printing width) 4 Print area length 5 Width offset 6 Length offset Label Size RD 102 mm x 26 mm 101.6 mm 25.6 mm 98.6 mm 20.5 mm...
  • Page 18: Feed Amount

    Raster Command Reference 2.3.3 Feed amount The feed amount (left and right margins) is defined below. Type Minimum Margin Setting Maximum Margin Setting 3 mm 127 mm Continuous length tape 0.12" 5" 24 dots 1020 dots The length offset indicated in “(b) Die-cut labels” of “2.3.2 Page size”...
  • Page 19: Raster Line

    Raster Command Reference 2.3.5 Raster line As shown below, the parts with data to be printed are converted with “raster graphics transfer”, and the parts with no data are converted with “zero raster graphics”. On the actual tape, margins (feed) are added specified with “various mode settings”...
  • Page 20 Raster Command Reference Total number of pins: 832 pins Number of pins Raster line for right margin Left and right margins First byte Number of print area pins Total number Print area of pins Last byte 0 pin Number of pins for left margin Feeding direction Pins on print head...
  • Page 21: Print Command List

    Raster Command Reference 3. Print Command List ASCII Code Binary Code Description NULL Invalidate ESC i S 1B 69 53 Status information request ESC @ 1B 40 Initialize ESC i U w 1 1B 69 55 77 01 Additional media information command ESC i d 1B 69 64 Specify margin amount (feed amount)
  • Page 22: Printing Command Details

    Raster Command Reference 4. Printing Command Details NULL Invalidate ASCII: NULL Hexadecimal: 00 Description  Skipped  If data transmission is to be stopped midway, send the “initialize” command after sending the “invalidate” command for the appropriate number of bytes to return to the receiving state, where the print buffer is cleared.
  • Page 23 Fixed at 80h Size Fixed at 20h Fixed at “B” (42h) Reserved Fixed at “7” (37h) Series code RJ-4030: Fixed at “1” (31h) Model code RJ-4040: Fixed at “2” (32h) Fixed at “0” (30h) Reserved Battery level Refer to table (8) below.
  • Page 24 Raster Command Reference (1) Error information 1 Flag Mask Definition “No media” error Bit 0 “End of media” error (only for die-cut labels) Bit 1 Bit 2 Cutter jam (not used) Bit 3 (Not used) Bit 4 Printer in use Bit 5 Printer turned off Bit 6...
  • Page 25 Raster Command Reference (3) Media width and length The media width and length is described in millimeters. 0~255 (0 to FFh) (a) Continuous length tape * Media Width: The tape width is indicated in millimeters. * Media Length: Fixed at 00h Media Media Width Media Length...
  • Page 26 Raster Command Reference (6) Phase type and phase number If the phase number is not used, both are fixed at 00h. Phase State Phase Type Receiving state Printing state Receiving state Phase Value (Dec.) Higher Order Bytes Lower Order Bytes Waiting to receive Printing state Phase...
  • Page 27: Esc @ Initialize

    “Save Paper Size Commands” function of Paper Size Setup Preparation Install the two listed below. ・Printer driver of the Brother RJ-XXXX ・Binary file editor. The data outputted with the “Save Paper Size Commands” function of Paper Size Setup will be a binary file.
  • Page 28 Raster Command Reference Open the [Devices and Printers] window, right-click the printer, and then display the Printing Preferences dialog box. Click the [Paper Size Setup] button on the [Basic] tab to display the Paper Size Setup dialog box. (Refer to the illustration below.) Click [Save Paper Size Commands] button to display a dialog box for creating a file for saving the paper size commands, and then save them in a file with the specified name.
  • Page 29: Esc I D Specify Margin Amount (Feed Amount)

    Raster Command Reference ESC i d Specify margin amount (feed amount) ASCII: {n1} {n2} Hexadecimal: 1B {n1} {n2} Description  Specifies the amount of the margins.  Margin amount (dots)=n1+n2*256  With die-cut labels, the margin amount at the ends of the printed area is 0. (a) Continuous length tape Paper Tape...
  • Page 30: Esc I A Switch Dynamic Command Mode

    Raster Command Reference ESC i a Switch dynamic command mode ASCII: {n1} Hexadecimal: 1B {n1} Parameters Definitions of {n}: 0: ESC/P mode (default) 1: Raster mode (Be sure to switch to this mode.) 3: P-touch Template mode Description  Dynamically switches between the printer's command modes. A printer that receives this command operates in the specified command mode until the printer is turned off.
  • Page 31: Esc I B Specify Baud Rate

    Raster Command Reference ESC i B Specify baud rate ASCII: {n1} {n2} Hexadecimal: 1B {n1} {n2} Parameters Setting=n1+n2*256 Setting: 96=9600 bps, 576=57600 bps, 1152=115200 bps Description  Changes the communications baud rate for the printer. The manufacturer’s default setting is 9600 bps. Zero raster graphics ASCII: Hexadecimal: 5A...
  • Page 32: Esc I Z Print Information Command

    Raster Command Reference ESC i z Print information command ASCII: {n1} {n2} {n3} {n4} {n5} {n6} {n7} {n8} {n9} {n10} Hexadecimal: 1B {n1} {n2} {n3} {n4} {n5} {n6} {n7} {n8} {n9} {n10} Description  Specifies the print information.  Definitions of {n1} through {n10} {n1}: Valid flag;...
  • Page 33: M Select Compression Mode

    Raster Command Reference Select compression mode ASCII: Hexadecimal: 4D Parameters Definitions of {n} No-compression mode (Enabled) Reserved (Disabled) TIFF (Enabled) Description  Selects the compression mode. Data compression is available only for data in raster graphic transfer. [TIFF(Pack Bits)]  1-byte units ...
  • Page 34 Raster Command Reference Explanation of “TIFF compression mode” With compression, the data for the “raster graphics transfer” command is based on 104 bytes of the total number of pins (832). As shown below, with no compression, the sum of the number of offset pins and the number of pins within the print area is the byte data.
  • Page 35: Mcr Command Specifications

    Raster Command Reference 5. MCR Command Specifications 5.1. Command details ESC #1 MCR on command ASCII: {n1} {n2} {n3} Hexadecimal: 1B {n1} {n2} {n3} Description  Turns on MCR. Does nothing if it is already on.  Definitions of {n1} through {n3} {n1}: Set read/response mode 00h:...
  • Page 36: Response

    Raster Command Reference 5.2. Response Condition Successful Reception Response (When there is data) [track] [data] Response ASCII [track] [data] Track number Multiple bytes Delimiter Response that returns the read card data [track]: Track number (ASCII, ‘1’ to ‘3’) Description Track1: 31h, Track2: 32h, Track3: 33h [data]: Read data string (ASCII) SS start code and FC, AS, ES, SS, etc.
  • Page 37 Raster Command Reference Reading multiple tracks Data in the above-mentioned format is combined for the specified number of tracks and sent. Example: Reading Track 1 and Track 2 [data] [data] [data] [data] Condition Failed Reception Response (Timeout) [“timeout”] [“timeout”] ASCII Response Character string Delimiter...
  • Page 38: Flow Charts

    Raster Command Reference 6. Flow Charts 6.1 Normal flow for USB connection Printer Computer (host) The printer is Initialize initialized. If there are no problems with the The status of the printer status (media, Status information request printer (media, etc.) etc.), the data is READ is checked and a...
  • Page 39: Error Flow For Usb Connection (When Feeding At The End Of The Page)

    Raster Command Reference 6.2 Error flow for USB connection (when feeding at the end of the page) Computer (host) Printer The printer is Initialize initialized. If there are no problems with the Status information request The status of the printer status (media, printer (media, etc.) READ etc.), the data is...
  • Page 40: Error Flow For Usb Connection (With A Concurrent Printing Error Such As End Of Tape)

    Raster Command Reference 6.3 Error flow for USB connection (with a concurrent printing error such as end of tape) Computer (host) Printer Any jobs with errors Initialize remaining in the printer If there are no are cleared. problems with the printer status (media, The printer is initialized.
  • Page 41: Cooling Flow For Usb Connection

    Raster Command Reference 6.4 Cooling flow for USB connection Computer (host) Printer Any jobs with errors remaining in the printer are cleared. Initialize The printer is initialized. If there are no problems with the printer status The status of the printer Status information request (media, etc.), the (media, etc.) is checked...
  • Page 42: Flow For Setting Serial Connection Baud Rate

    Raster Command Reference 6.5 Flow for setting serial connection baud rate Computer (host) Printer Specify baud rate Printer waiting to recover from 3000 ms Sleep “Specify baud rate completed” status (normal status) Old baud rate New baud rate Status information request Status (response to status information request) * The request/response at the new baud rate are simply to verify that communication is possible and...
  • Page 43: Normal Flow For Serial Connection

    Raster Command Reference 6.6 Normal flow for serial connection Computer (host) Printer The printer is Initialize initialized. If there are no problems with the printer status (media, The status of the Status information request READ etc.), the data is printer (media, etc.) transmitted.
  • Page 44: Error Flow For Serial Connection

    Raster Command Reference 6.7 Error flow for serial connection Computer (host) Printer Initialize The printer is Initialized. If there are no The status of the Status information request problems with the printer (media, etc.) printer status is checked and a READ (media, etc.), the response is sent.
  • Page 45: Cleaning Flow For Serial Connection

    Raster Command Reference 6.8 Cleaning flow for serial connection Computer (host) Printer The printer is Initialize initialized. If there are no problems with the Status (response Status information request printer status to status request) READ (media, etc.), the data is transmitted. Status (response to status If there is a problem, information request)
  • Page 46: Appendix A: Usb Specifications

    Mass storage Character string for Character string descriptor: 0x01 0x0409: “Brother” manufacturer Character string descriptor: 0x02 Character string for 0x0409: “RJ-4030” product 0x0409: “RJ-4040” Character string descriptor: 0x03 Character string for 0x0409: “000000001” serial number Last nine digits of the printer’s serial number...
  • Page 47: Appendix B: Introducing The Brother Developer Center

    Raster Command Reference Appendix B: Introducing the Brother Developer Center Useful information for developers, such as applications, tools, SDKs as well as FAQs, are provided in the Brother Developer Center. http://www.brother.com/product/dev/index.htm - 43 - Appendix B: Introducing the Brother Developer Center...

This manual is also suitable for:

Rj-4040

Table of Contents