Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 32 of 33

IPL Programming Reference Manual: Appendix E: Using Direct Graphics Mode

Pages 277 to 286 of 298, from IPL Programming Reference Manual

The original document is the PDF (1.4 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec 3600 and Intermec 4400

Page 277

E Using Direct Graphics Mode

Page 278

alexdaddy sdf

Page 279

Using Direct Graphics Mode

E

This appendix explains how to use Direct Graphics mode.

What Is Direct Graphics Mode? You can significantly reduce the amount of time necessary to download and image a graphic by using Direct Graphics mode. Direct Graphics mode allows the printer to receive a compressed bitmap graphic and image it directly into the image bands without storing it in the printer. Before you download the graphic, you must compress it into run-length encoded (RLE) data. The data compression greatly reduces the amount of data to download and the rasterized graphic requires minimal processing to image it into the image bands. You no longer need to store the graphic in Program mode and then set up a format in Print mode. When you download a direct graphic to the printer, the printer stores the graphic in the image bands until you: •

Clear the label data.

•

Set up another format.

•

Enter Program mode or Test and Service mode.

When printing a label with direct graphics, you must have enough dynamic RAM installed in your printer to contain the entire label. Because Intermec printers normally reuse image bands, you can print long labels with standard RAM; however, when you download direct graphics, the printer retains no information regarding the existence of the graphic in its image bands. Therefore, the printer cannot reuse those image bands when you download a direct graphic. With standard dynamic RAM, you should be able to print almost any label up to 6 inches long. You may need to install expanded dynamic RAM for longer labels.

What Is Run-Length Encoding? Run-length encoding (RLE) is a method of compressing bitmap graphics. RLE compresses graphics that have repeated runs of white or black dots in a column, reducing the amount of time required to download the graphics to a printer. RLE sends a series of commands that define each bitmap column of a graphic and takes advantage of a series of repeated dots within a column by encoding them as transition commands. Instead of sending the entire column of bitmap data, it sends commands telling the printer how many series of black and white dots to image. If columns are identical, a command can instruct the printer to repeat the last column. RLE is ideal for bar code graphics or designs with simple patterns.

E-3

Page 280

IPL Programming Reference Manual

In cases where patterns do not exist, you can send uncompressed bitmap data to the printer. You can mix raw bitmap data and RLE commands to ensure the most efficient way to download a graphic. The RLE file may contain five types of data, each of which is one byte long: Immediate commands Immediate commands are recognized and executed as regular IPL commands or protocol commands. Immediate commands are removed from the compressed data. Compression encodation commands Compression encodation commands are used as a part of the compressed graphics file to change or set data modes, repeat lines, change the origin where the next line or lines of data will print, and to end the compressed graphics file and return to IPL command parsing. Low order data Low order data is 7 bits long and may be combined with high order data. A single low order data byte can represent up to 7 bits of data (0-127). Combined with a high order byte, the combined data can represent 13 bits of data (0 - 8191) at most. Because data bytes cannot exist by themselves, they must be preceded by a command byte so that the printer knows how to interpret them. Any data may be represented by either combined data or low order data. The 8th bit is always set to 1. High order data High order data is 6 bits long and is always combined with low order data. The combined data can represent 13 bits of data (0 - 8191) at most. Because data bytes cannot exist by themselves, they must be preceded by a command byte so that the printer knows how to interpret them. Any data may be represented by either combined data or low order data. The printer will ignore high order data followed by a command or more high order data. You must set the 7th bit to 1 and the 8th bit to 0. Bitmap data Bitmap data is composed of uncompressed bytes that represent columns of your graphic. The uncompressed bytes contain 7 data bits per byte. The 8th bit is always set to 1. Use this table to understand how the printer uses these five types of data:

E-4

Type of Data

Byte Format (7 - 0)

Range

Data it Represents

Immediate commands

0 0 0 x x x x x

0 - 31

N/A

Compression encodation commands

0 0 1 x x x x x

32 - 63

N/A

Low order data

1 x x x x x x x

128 - 255

0 - 127

High order data

0 1 x x x x x x

64 - 127

0 - 63

Bitmap data

1 x x x x x x x

128 - 255

Raw data

Page 281

Using Direct Graphics Mode

E

How Do I Send a Direct Graphic to the Printer? Once you have compressed the graphic, you need to use several IPL commands to send the RLE file to the printer. These are the commands accompanied by their descriptions:

Direct Graphics Mode, Enter Purpose:

Instructs the printer to receive RLE compressed graphics data in nibblized format.

Default:

m=0

Syntax:

<ESC>gm Where m specifies the format of the data to follow. m=0 m=1

8 bits per byte. 7 bits per byte of nibblized data.

When you select m = 0, the printer parses subsequent data streams as RLE commands. The printer still recognizes immediate IPL commands. Non-immediate commands are not parsed. The printer resumes normal IPL parsing when it receives an end of bitmap RLE command. When you select m = 1, the printer receives the RLE compressed graphics data in nibblized format. The printer converts each pair of bytes from ASCII to their numerical equivalent and combines them to form the original byte. For example: ASCII

Numerical

Original byte

1,B

0x1,0xB

0x1B

E-5

Page 282

IPL Programming Reference Manual

Change Origin Purpose:

Tells the printer the X and Y coordinates of the next RLE data column.

Default:

0,0

Syntax:

0x21[x,y] Where x and y are the coordinates of the next data column. Values for x and y range from 0 to 8191. The change origin command tells the printer where to place the graphic on the label. If you do not send the command, the printer uses the default setting of 0,0. You can use the command to place different sections of the RLE graphic in different parts of the label.

Notes:

It is not necessary to use this command for every column. Column-to-column transitions are automatic following the end of line command. The default origin of any direct graphic (0,0) is in the lower left corner instead of in the upper left corner. The upper left corner is the label format origin.

End of Bitmap Purpose:

Marks the end of RLE encoded data.

Syntax:

0x28

Notes:

The printer parses subsequent characters as IPL commands. On the final column of the RLE encoded data, an end of line command does not need to precede the end of bitmap command.

End of Line

E-6

Purpose:

Causes the printer to assign subsequent bitmap data to the next column.

Syntax:

0x22

Notes:

The printer images the next data stream in the next column position, incrementing the X position. This command causes an action similar in function to a carriage return.

Page 283

Using Direct Graphics Mode

E

Raw Bitmap Data Follows Purpose:

Indicates raw bitmap data bytes follow.

Syntax:

0x27[data]

Notes:

The printer only uses the first 7 bits of the data byte. If you set a bit to 1, it prints black. The most significant bit prints farthest to the left. Data order runs from right to left, so the first dot in a column is the least significant bit of the first data byte.

Repeat Last Line Purpose:

Causes the printer to copy the previously defined column n number of times.

Syntax:

0x24n Values for n range from 0 - 8191.

Notes:

The printer automatically increments the X origin of each column. This command is only valid when preceded by a column of encoded, raw data or an end of line command.

Transition Black Purpose:

Transition data follows. The first transition is black.

Syntax:

0x25[data,data,...data] Where data specifies the number of black or white dots. Values for data can range from 0 - 8191.

Notes:

Each transition data specifies the number of dots to draw (either black or white). Each data alternates black and white dot counts.

Transition White Purpose:

Transition data follows. The first transition is white.

Syntax:

0x26[data,data,...data] Where data specifies the number of black or white dots. Values for data can range from 0 - 8191.

Notes:

Each transition data specifies the number of dots to draw (either black or white). Each data alternates black and white dot counts.

E-7

Page 284

IPL Programming Reference Manual

Using Direct Graphics Commands This example consists of two parts: a graphic and a line. The origin of the direct graphic is defined the same as the origin of a normal graphic. In this example, the coordinates for the origin of the complicated graphic are X0,Y450; however, once you enter Direct Graphics mode, your printer loads the information in the reverse Y direction. Each column of the graphic loads from the bottom to the top. Y coordinates now start at 0 from the bottom left corner and increase in size as the data loads. So, the printer starts loading data for the complicated graphic at X0,Y450 and loads up to X0,Y425. Likewise, the data for the line starts loading at X19,Y450 and loads up to X19,Y0. 450

X0, Y0

25

25

24

24

23

23

22

22

21

21

20

20

19

19

18

18

17

17

16

16

15

15

14

14

13

13

12

12

11

11

Y 10

25 24 23 22 21 20 19 18

10

17 16 15 14 13

9

9

8

8

7

7

6

6

5

5

4

4

3

3

2

2

1

1

12 11

Y 10 9 8 7 6 5 4 3 2 1 0 0

X0,Y450

1 2 3

4

5 6

X

19

X19,Y450

0

0 0

1 2 3

4

5 6

19

X

3440A.001

Here is a hex data file for the example above:

E-8

1B

67

30

21

80

43

C2

27

90

A8

D5

90

22

26

84

96

22

22

26

8C

84

22

24

82

25

88

22

21

93

43

C2

25

43

C2

28

Page 285

Using Direct Graphics Mode

E

This table explains the hex data file in the example: Data

Command

Description

1B 67 30

<ESC>g0

Enter Direct Graphics mode

21 80 43 C2

0x21 80 43 C2

Change origin 80 - 80 (LO) = 0x00 -> X0 43 - 40 (HI) = 0x03 C2 - 80 (LO) = 0x42 (0x03 ∗ 0x80) + 0x42 = 1C2 -> Y450

27 90 A8 D5 90 22

0x27 90 A8 D5 90 0x22

Raw bitmap data follows, starts at Y0 90 - 80 (LO) = 0x10 -> 1 dot at Y4 A8 - 80 (LO) = 0x28 -> 2 dots at Y10 and Y12 D5 - 80 (LO) = 0x45 -> 3 dots at Y14, Y17, and Y20 90 - 80 (LO) = 0x10 -> 1 dot at Y25 End of line

26 84 96 22

0x26 84 96 0x22

Transition white 84 - 80 (LO) = 4 white 96 - 80 (LO) = 22 black End of line

22

0x22

End of line

26 8C 84 22

0x26 8D 84 0x22

Transition white 8D - 80 (LO) = 13 white 84 - 80 (LO) = 4 black End of line

24 82

0x24 82

Repeat last line 82 - 80 (LO) = 2 times

25 88 22

0x25 88 0x22

Transition black 89 - 80 (LO) = 9 black End of line

21 93 43 C2

0x21 93 43 C2

Change origin 93 - 80 (LO) = 0x13 -> X19 43 - 40 (HI) = 0x03 C2 - 80 (LO) = 0x42 (0x03 ∗ 0x80) + 0x42 = 1C2 -> Y450

25 43 C2

0x25 43 C2

Transition black 43 - 40 (HI) = 0x03 C2 - 80 (LO) = 0x42 (0x03 ∗ 0x80) + 0x42 = 1C2 -> Y450

28

0x28

End of bitmap

E-9

Page 286

asdf