Monarch ® 9406™ Thermal Printer Graphics Manual TC9406GR Rev. B 8/94 ©1994 Monarch Marking Systems, Inc. All rights reserved.
Each product and program carries a respective written warranty, the only warranty on which the customer can rely. Monarch reserves the right to make changes in the product and the programs and their availability at any time and without notice. Although Monarch has made every effort to provide complete and accurate information in this manual, Monarch shall not be liable for any omissions or inaccuracies. Any update will be incorporated in a later edition of this manual.
Table of Contents Table of Contents 1. Introduction to MPCL Graphics ......................................1-1 Who Should Read This Manual...................................1-1 How Images are Printed..............................................1-2 Choosing a Method .....................................................1-3 Hexadecimal Method.......................................1-3 Run Length Encoding Method.........................1-3 2. Creating the Graphic Image .........................................
Graphics for 9406 Printers ii
1. Introduction to MPCL Graphics You can create graphic images for printing on Monarch® 9406™ printers. There are two steps to designing a graphic for printing on a Monarch printer. 1. Create a file from the graphic image. 2. Place the image in a format. Chapters 2 and 3 tell how to construct an image. Chapter 4 tells how to place the image in a format. Who Should Read This Manual This manual is written for programmers and experienced users of MS-DOS computer systems.
Graphics for 9406 Printers How Images are Printed Printed images on Monarch printers are formed by a system of dots, as shown below. NOTE: You need to create the graphic image upside down. It will print right side up. Each square on the grid represents a dot on the printhead. You create a graphic image by blackening dots in a specific pattern. The example above shows how black and white dots form the letter A. This process is referred to as turning dots "ON" or "OFF." A black dot is "ON.
1. Introduction to MPCL Graphics Choosing a Method Hexadecimal Method With the Hexadecimal method, the dot sequences are segmented into binary numbers, then converted to hexadecimal numbers. A graphic using gray-scaling, several slanted lines, or several vertical lines typically translates more efficiently with the Hexadecimal method. Run Length Encoding Method With the Run Length Encoding method, the dots are segmented within a row into sequences where all of the dots are on or all of the dots are off.
Graphics for 9406 Printers 1-4
2. Creating the Graphic Image This chapter describes how to • map a graphic image. • store a graphic image. Mapping Graphic Images To map a graphic image, you can use either the Hexadecimal or Run Length Encoding method. The following sequence explains how to derive a hexadecimal character string from a bitmap image. 1. Refer to the image on the grid.
Graphics for 9406 Printers 2. Assign the number 1 to every black square and 0 to every white square. NOTE: Although you must create these images upside down, they will print right side up. 3. Write the first row of numbers in sequence, as they correspond to the squares in the grid. 00000000000000000000011000000000000000000000 4. Divide the row of numbers into groups of eight. If the last group has less than eight numbers, add enough 0’s to make a group of eight.
2. Creating the Graphic Image 5. Convert each group of eight binary digits to hexadecimal values. Use a calculator for binary to hex conversion, or consult the binary to hex conversion chart in Appendix A. 00000000 00000000 00000110 00000000 00000000 00000000 6. = = = = = = 00 00 06 00 00 00 Write the hexadecimal values in sequence, uninterrupted, for each row. All hex numbers must have two digits. For example, write hex 0 as 00, or hex E as 0E. 7. Repeat steps 4 through 6 for each row on the grid.
Graphics for 9406 Printers Run Length Encoding 1. Refer to the image on the grid. 2. In the first row, count the number of consecutive dots of the same color. Write the number of consecutive white dots, then the number of consecutive black dots, and so on, in sequence for the first row on the grid. Write "White" or "Black" after each number to indicate white or black dots. NOTE: Although you must create these images upside down, they will print right side up.
2. Creating the Graphic Image 3. Using the Run Length Encoding chart in Appendix A, replace each number you have written with its corresponding code. Be sure to use CAPITAL letters for black dots and lower-case letters for white dots. If the number is greater than 26, write Z, followed by the letter corresponding to the amount over 26. For example, to represent 30 dots, write ZD. 1. 21 white = u, 2 black = B, 21 white = u 2. 20 white = t, 4 black = D, 20 white = t . . .
Graphics for 9406 Printers Storing Graphic Images When you have mapped your graphic image, determine how you want to store it. You have two options: • RAM • Temporary Storage Using RAM You can store small graphics less than approximately 1/2 inch by 1/2 inch in printer RAM and reference them by the graphic ID number. The printer has 57K of RAM available for storing downloaded data. Downloaded data can be in the form of formats, batches, check digits, or graphics.
2. Creating the Graphic Image Using Temporary Storage You can store graphics up to 1536 rows long with up to 768 dots in each row and refer to them by the graphic ID number. The printer holds graphic data in temporary storage until you download a new temporary graphic or you use a different format. You can continue to download batch information without risk to the graphic as long as the batches use the current format.
Graphics for 9406 Printers 2-8
3. Defining Graphic Images Your graphic file can contain • bitmaps (for detailed graphics) • constant text • lines • boxes. Images using Hexadecimal Representation or Run Length Encoding are bitmap images. Refer to Chapter 2, "Creating the Graphic Image" to map your graphic image. When you have mapped your graphic image, you are ready to define a graphic file. This file generates the graphic image that you use in a format.
Graphics for 9406 Printers Syntax {G,graphID,action,device,units,row,col,mode,name p { Left brace is the starting token for MPCL packets. G Token to begin a Graphics Header. graphID A number from 1 to 30 to identify the graphic image. action Function to perform on the graphic. device A Add to printer memory C Clear from printer memory Printer device that will store the graphic. R Printer RAM. Stored permanently in the printer. T Temporary storage.
3. Defining Graphic Images col Distance between the left edge of the print area and the left edge of the graphic image. Must be measured in units specified above. NOTE: The first dot on the printhead starts 0.060" from the left edge of the supply. mode Imaging mode. Enter 0 in this parameter. 0 is the only value supported on the 9406 printer. name Assign a name to the graphic image. The name must be 1 to 8 characters in length. Enclose in quotation marks.
Graphics for 9406 Printers Bitmap Field Types When you map the image, use bitmap methods to create detailed graphic images, such as logos. There are three types of bitmap fields, and each represents one row of dots on the image. Bitmap Bitmap field establishes the location and type of coding used to define the image. Typically, you use this type of field for the first field only. Use the simpler "Next-Bitmap" syntax for later fields in the graphic.
3. Defining Graphic Images Bitmap Fields Use this record for only the first field. Use the simpler Next-Bitmap field for later fields in the graphic. Syntax B,row,column,algorithm,"data" p B Token to begin a bitmap field. row Distance from the reference row selected in the Graphics Header to the bottom of the graphic image. Measure in units selected in the Graphics Header: 1/100 inches (English), 1/10 millimeters (Metric), or dots (Graphic).
Graphics for 9406 Printers Example B,46,1,H,"000000400000" p • Bitmap image field • The image begins 46 dots from the bottom of the graphic area • The image begins 1 dot from the left edge of the graphic area • Hex representation is used • The top row of dots was translated from binary "00000000/00000000/00000000/01000000/00000000/00 000000" to hex "000000400000" Next-Bitmap Field A Next-Bitmap field continues a sequence of bitmap information.
3. Defining Graphic Images algorithm "data" Coding method for bitmap data (see Chapter 2, "Creating the Graphic Image"). H Hex Representation R Run Length Encoding Character string derived under "Hex Representation" or "Run Length Encoding" procedures in Chapter 2, "Creating the Graphic Image.
Graphics for 9406 Printers Duplicate Field If a line of data is identical to a Bitmap or Next-Bitmap field, the Duplicate field allows you to repeat the dot sequence without re-typing the data. It represents one row of dots on the image. Syntax D,adjdir,adjamt,count p D Token to indicate a Duplicate field. adjdir Direction to adjust this row of data from the previous bitmap or next-bitmap field. 0 Adjust toward top of supply from the previous bitmap field.
3. Defining Graphic Images Constant Text Fields Constant text is a set of fixed characters that prints on all supplies using that format. The user cannot change the characters. Constant text can appear either in graphics or formats. Syntax C,row,column,gap,font,hgt.mag.,wid.mag., color,align, char-rot.,field-rot., "fixed char" p C1.C Indicates a constant text field. C2.row Distance from bottom of print area to lower left corner of field. (Bottom exits the printer first.
Graphics for 9406 Printers C9.alignment Enter L. Alignment is constant. C10.char rot. Character rotation. Values: 0 1 2 3 C11.field rot. Top of character points to top of field Top of character points to left of field Top of character points to bottom of field Top of character points to right of field Field rotation. Lower left corner of field is the pivot point.
3. Defining Graphic Images Line Fields The line field in a graphic is identical to the line field in a standard format. Syntax L,S,row,column,end row,end column,thickness,pattern p or L,V,row,column,angle,length,thickness,pattern p L Token to indicate a line field. type Type of line. Only vertical and horizontal lines are supported. Values: row Segment. Choose the starting point and the ending point. V Vector. Choose the starting point, the angle, and the length.
Graphics for 9406 Printers end row/angle If using Segments Distance from the reference row selected in the Graphics Header to the end point of the line. Ranges same as row. On horizontal lines, this value must match the row value. If Using Vectors Angle of line. Values: 0, 90, 180, or 270. end column/ length If using Segments Distance from the reference column selected in the Graphics Header to the end point of the line. Ranges same as column. On vertical lines, this value must match the column value.
3. Defining Graphic Images Example L,S,110,30,110,150,10,"" p • Line • Line defined as a Segment • Origin row 1.1 inches from reference row • Origin column 0.3 inches from reference column • End point 1.1 inches from reference row • End point 1.5 inches from reference column • 10 dots thick • Solid line (""). Box (Quadrilateral) Field The box (quadrilateral) field in a graphic is identical to the quadrilateral field in a standard format.
Graphics for 9406 Printers column Distance from the reference column selected in the Graphics Header to the lower left corner of the box. Measure in units selected in the Graphics Header: 1/100 inches (English), 1/10 millimeters (Metric), or dots (Graphic). Ranges: English 0-400 Metric 0-1118 Dots 0-768 end row Distance from the reference row selected in the Graphics Header to the upper edge of the box. Ranges same as row.
3.
Graphics for 9406 Printers 3-16
4. Placing the Graphic in a Format Perform these tasks to print a graphic image within a format. 1. Create the graphic image as shown in Chapter 3, "Defining Graphic Images." 2. Send the graphic to the printer. 3. If the graphic will be stored in RAM, place a field definition in the format to reference the graphic. 4. Send the check digit (if necessary), format, and batch to the printer. The information placed in the format is called a graphic field definition.
Graphics for 9406 Printers NOTE: Add the row specified in the Constant Text, Bitmap, Line, or Box field definition to refrow to determine the actual position in the print image. refcol The distance between the left edge of the print area on the supply and the left edge of the graphic image. Use the units of measure specified in the Format Header. This value overrides the reference column in the Graphics Header.
Conversion Charts Appendix A. Conversion Charts Use the charts in this appendix to convert dot sequences from the image dot pattern to data stream codes. Use the Binary to Hex Conversion Chart to convert binary dot sequences to hexadecimal numbers for bitmap data streams. Use the Run Length Encoding Chart to convert dot sequences to alphabetic characters for bitmap data streams.
Graphics for 9406 Manuals A-2 Binary Hex Binary Hex 00100000 00100001 00100010 00100011 00100100 00100101 00100110 00100111 00101000 00101001 00101010 00101011 00101100 00101101 00101110 00101111 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 00110000 00110001 00110010 00110011 00110100 00110101 00110110 00110111 00111000 00111001 00111010 00111011 00111100 00111101 00111110 00111111 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 01000000 01000001 01000010 01000011 01000100 01000101 01000110 010
Binary Hex Binary Hex 01100000 01100001 01100010 01100011 01100100 01100101 01100110 01100111 01101000 01101001 01101010 01101011 01101100 01101101 01101110 01101111 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 01110000 01110001 01110010 01110011 01110100 01110101 01110110 01110111 01111000 01111001 01111010 01111011 01111100 01111101 01111110 01111111 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 10000000 10000001 10000010 10000011 10000100 10000101 10000110 10000111 10001000 10001001 10001010
Graphics for 9406 Manuals A-4 Binary Hex Binary Hex 10100000 10100001 10100010 10100011 10100100 10100101 10100110 10100111 10101000 10101001 10101010 10101011 10101100 10101101 10101110 10101111 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF 10110000 10110001 10110010 10110011 10110100 10110101 10110110 10110111 10111000 10111001 10111010 10111011 10111100 10111101 10111110 10111111 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF 11000000 11000001 11000010 11000011 11000100 11000101 11000110 110
Binary Hex Binary Hex 11100000 11100001 11100010 11100011 11100100 11100101 11100110 11100111 11101000 11101001 11101010 11101011 11101100 11101101 11101110 11101111 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF 11110000 11110001 11110010 11110011 11110100 11110101 11110110 11110111 11111000 11111001 11111010 11111011 11111100 11111101 11111110 11111111 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF A-5 Conversion Charts Appendix A.
Graphics for 9406 Manuals Run Length Encoding Chart Black Dots # of Dots 1 2 3 4 5 6 7 8 9 10 11 12 13 Code A B C D E F G H I J K L M # of Dots 14 15 16 17 18 19 20 21 22 23 24 25 26 Code N O P Q R S T U V W X Y Z White Dots # of Dots 1 2 3 4 5 6 7 8 9 10 11 12 13 A-6 Code a b c d e f g h i j k l m # of Dots 14 15 16 17 18 19 20 21 22 23 24 25 26 Code n o p q r s t u v w x y z
For supplies, service, or assistance call: TOLL FREE: 1-800-543-6650 (In the U.S.A.) 1-800-263-4650 (In Canada) Printed by the Techical Communications Department Printed in the U.S.A.