The text of a manual · part 2 of 5
Monarch 6017 HandiPrint Printer Programmer's Manual, pages 10 to 18
Pages 10 to 18 of 44
The original document is the PDF (3.7 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 Monarch HandiPrint 6017
Page 10
Using Data Stream Graphics You print data stream graphics one line at a time. To create a line, you specify bits to turn off or on. Bits turned off represent white space, and bits turned on represent part of the graphic. There is a .125 mm gap between consecutive lines. Command Summary Command
Description
ESC -'V' -01 hex-00 hex#data#
Prints a graphic line.
#data#
72 hex bytes, indicating the dots to turn on or off. For example, if a specified byte is FF, all the dots are on. If it is 01, only one dot is o n, and the other 7 are off. If you accidentally specify less than 72 bytes, the printer does not print the graphic. If you specify more than 72 bytes, a fatal exception occurs.
You do not directly specify the bits turned on or off. You specify the bits in groups of eight by using hex values. Example This line of code prints a solid horizontal line of dots. ESC -V-1-0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFF
2-4 Creating and Printing Formats
Page 11
Using Flash Memory Graphics You can also use a graphic previously stored in flash memory. You are limited to one graphic stored in memory at a time. Saving a graphic to flash memory when there is already one there overwrites the previous one. To store a graphic in flash memory:
1. Remove the printer’s battery and wait several seconds. 2. Re-insert the battery and enter Download Mode immediately (see below). It takes two commands to make the transition to Download Mode. Design the application so that it waits to send the second command until the printer responds to the first command by returning a ‘?‘ character.
3. Transmit the graphic one line at a time, using a graphic created as described in “Using Data Stream Graphics.”
4. Save the graphic to flash memory (see below). When it receives the command, the printer returns a ‘D‘ character, and begins the save. When the save is complete, the printer transmits an ‘!’ character, and then an ‘X’ character every 500 milliseconds.
5. Remove the printer’s battery and wait several seconds before replacing it.
Creating and Printing Formats 2-5
Page 12
Command Summary
Commands
Description
ESC -'DL'
Step 1 of entering Download Mode. After processing this command, the printer returns a ‘?’ character.
ESC -'LG0'
Step 2 of entering Download Mode. Any character not accepted as part of this command is sent back the handheld.
ESC -'LG' -FF hex
Saves the graphic. After receiving this command, the printer returns a ‘D’ character, and then saves the graphic. When finished, the printer sends an ‘!’ character, then it sends an ‘X’ character every 500 milliseconds.
ESC -'Lg0'
Prints the graphic stored in flash memory.
ESC -'V' -< l o w >-<high>#data#
Prints a number of graphic lines.
< l o w > a nd <high>
#data#
The hex digits (listed backward) of a number indicating how many lines to print. For example, to print 10 lines, < l o w > is A, and <high> is 0. 72 hex bytes, indicating the dots to turn on or off. For example, if a specified byte is FF, a ll the dots are on. If it is 01, only one dot is on, and the other 7 are off. If you accidentally specify less than 72 bytes, the printer does not print the graphic. If you specify more than 72 bytes, a fatal exception occurs.
Note that you are not directly specifying the bits turned on or off. You are specifying the bits in groups of eight by using two digit hex values.
2-6 Creating and Printing Formats
Page 13
Creating Bar Code Fields The printer can print the following bar codes, with or without humanreadable data. ♦
Code 39
♦
Codabar
♦
Interleaved 2 of 5
♦
Code 128 (UCC/EAN-128)
♦
UPC/EAN/JAN
Command Summary Command
Description
ESC -' z ' -<bctype> <length>-<height><data>
Prints a bar code without human-readable data.
ESC -'Z' -<bctype> <length>-<height><data>
Prints a bar code with human-readable data.
<bctype>
<length>
The type of bar code to print (values are the ASCII representation, not hex). '1'
Code 39
'2'
Code 128 (UCC/EAN-128)
'3'
Interleaved 2 of 5
'4'
UPC/EAN/JAN
'5'
Codabar
The data length, specified in hex. This value is dependent on the bar code you choose with <bctype> . See “Specifying Particular Bar Codes.”
Creating and Printing Formats 2-7
Page 14
Command
Description <height>
The bar code height, specified in hex, in increments of .125 mm. <height> can be no smaller than 14. For example, 14 = 2.5 mm, 15 = 2.625 mm, etc. For UPC/EAN/JAN bar codes, the height you specify includes a 1.25 mm drop bar pattern after the bar code.
(data)
The data for the bar code. It must equal <length>. See “Specifying Particular Bar Codes” for data restrictions, which vary by bar code.
Specifying Particular Bar Codes Values for the <length> and <data> parameters depend on the type of bar code you choose with <bctype> . Bar Code
<length>
<data>
Code 39
9 (maximum)
0-9, A-Z, -, (space), $, /, +, and %
Interleaved 2 of 5
24 (maximum)
Pairs of numeric characters (0-9)
UPC/EAN/JAN
UPCA: 12
0-9
UPCE: 7 EAN/JAN-8: 8 EAN/JAN-13: 13 These lengths are fixed and all include a check digit. Codabar
2-8 Creating and Printing Formats
20 (maximum) plus start and stop characters. The printer adds the stop character automatically.
Data: 0-9, $, -, : , / , . , and +. Start: a (the default), b, c, or d.
Page 15
Code 128 (UCC/EAN-128) Details For Code 128 (UCC/EAN-128) bar codes, <length> can be a maximum of 18 (with alphanumeric/control code data) or 36 (if you use subset C and numeric pairs). The first character of <data> must specify the subset to use: A, B, or C (listed as 87, 88, and 89 hex, respectively). The rest of the data can be all 256 ASCII characters by using a combination of the subsets. The data must appear as numeric pairs corresponding to the hex values for the ASCII character in question. Each subset enables the bar code to contain different characters. Subset A uses 20-3F hex and 40-7F hex (read by a bar code reader as 00-7F hex), subset B uses 20-7F hex, and subset C uses 30-39 hex. The following table explains how to switch from one subset to another. Character
Subset A
Subset B
Subset C
80 hex
Function 3
Function 3
81 hex
Function 2
Function 2
82 hex*
Shift
Shift
83 hex
Switch to Subset C
Switch to Subset C
84 hex
Switch to Subset B
Function 4
Switch to Subset B
85 hex
Function 4
Switch to Subset A
Switch to Subset A
86 hex
Function 1
Function 1
Function 1
* A temporary, one character shift to another subset. The following table describes the purpose of each function. Function Number
Purpose
1
Uses reserved Code 128 characters (UCC/EAN128).
2
Appends data (subsets A and B only).
3
Initializes a bar code reader.
4
Extends characters. For example, 'a' (97 decimal) is changed to 'β' (225 decimal) by adding 128 to it. This function is unavailable in subset C.
Creating and Printing Formats 2-9
Page 16
Positioning Fields The following commands/control characters move the supply through the printer to position the fields on the format. The application can also write spaces to the printer before it prints text to position a field. There are .157-inch no-print zones on the image area’s right and left sides and a .7-inch no-print zone at the top. Command Summary Command
Description
D hex (CR)
Advances to the beginning of the next line.
C hex (FF)
Advances 10 lines.
14 hex (Norm)/F hex (SI)
Sets the printer to 48-column mode.
E hex (SO)
Sets the printer to 24-column mode.
B hex (VT)
Advances 5 lines.
9 hex (HT)
Tabs to the next position or the beginning of the next line.
A hex (LF)
Advances to the beginning of the next line.
ESC -'J' -< n u m >
Performs a specified number of line feeds. <num>
2-10 Creating and Printing Formats
1-FF
The number of line feeds, specified in hex. The default is 1 (.125 mm).
Page 17
CONFIGURING THE PRINTER
3
There are several commands for configuring the printer. You can include these commands at any place in a data stream. This chapter describes these commands.
Selecting the Operating Mode The printer works in either online or buffer mode. In online mode, the printer prints characters as soon as they are received. In buffer mode, the printer receives and stores characters, and then prints them upon receipt of an EOT control character (4 hex). Command Summary Command
Description
ESC -'P#'
Selects online mode.
ESC -'P$'
Selects buffer mode.
Setting the Print Contrast You can increase or decrease the print contrast for lighter or darker print. This setting affects the print speed (the higher the contrast, the lower the speed and vice versa). The print contrast also depends on the battery voltage. We recommend designing your applications so the user can adjust the print contrast. Command Summary Command
Description
ESC -' P ' -<value>
Sets the print contrast. <value>
0-9
0 is the highest contrast and 9 is the lowest contrast. The default is 5.
Configuring the Printer 3-1
Page 18
Setting the Power Mode The printer can operate in five different power modes, each using a different number of printhead sections, which are groups of dots on the printhead. The mode selected also affects the print speed (the more printhead sections used, the faster the printer speed and vice versa). Command Summary Command
Description
ESC -' P ' -<value>
Sets the power mode. <value>
The number of printhead sections to use, specified in hex. 1
Use one printhead section.
2
Use two printhead sections.
3
Use three printhead sections.
6
Use six printhead sections.
7
Default. Dynamically choose the number of printhead sections to use (1, 2, 3, or 6), depending on what is printed.
Checking the Battery Voltage The following commands/control characters involve the printer's battery. We recommend designing your applications so the user can check the printer's battery voltage. Command Summary Command
Description
ESC -' P ^ '
Prints the battery voltage.
ESC -'P!'
Requests the battery voltage from the printer.
3-2 Configuring the Printer