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 2 of 5

Mt Series Programmer's Manual, pages 10 to 18

Pages 10 to 18 of 44

The original document is the PDF (673 KB). 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 Printek Mt3

Page 10

This page is a scan with no text; see it in the PDF.

Page 11

Flash Based Font Download The Mt2 and Mt3 printers provide the user the ability to replace the factory-installed fonts. This allows the printer to adapt to many application specific character sets. Note: To protect the fonts from accidental corruption these must be the first commands received by the printer when it is powered on.

Normal ASCII Font Download (RS-232 only) Enter flash ASCII font program mode: n:

ESC D A n

Reserved for future use (‘0’ is recommended)

Note: This command must be the first ESC command received upon activating the printer. 1. 2. 3.

The printer will deactivate the CTS line and copy the requested Flash bank to SRAM. When the copying process is complete, the CTS will become active and the printer will transmit a ‘?’ (0x3F). Any character not accepted, as part of a font load command will be echoed back to the terminal device.

To Load an ASCII character:

ESC D n1 n2 data n1:

TABLE to save the character in {0x30, 0x31, 0x32, 0xFF} (0xFF = quit)

n2:

Character code {0x21 .. 0x7F} {CHR$(33) .. CHR$(127)} data:

16 x 23 bit (W x H) character matrix (46 bytes total). Each character must also fit into the matrix specified by the font size (see table below).

TABLE ‘0’ TABLE ‘1’ TABLE ‘2’

Courier Modes 1 & 2 12 & 16 cpi (12 x 23) Courier Mode 3 19 cpi (10x23) Courier Modes 4 & 5 21 & 24 cpi (8x23)

7

Page 12

Flash Based Font Download

Extended Font Download (RS-232 only) Enter flash extended font program mode: ESC D X n n:

Font BANK to modify {‘0’, ‘1’, ‘2’, ‘3’} {0x30, 0x31, 0x32, 0x33}

Note:

This command must be the first ESC command received upon activating the printer.

1.

The printer will deactivate the CTS line and copy the requested Flash bank to SRAM.

2.

When the copying process is complete, the CTS will become active and the printer will transmit a ‘?’ (0x3F).

3.

Characters not recognized, as part of a font load command will be echoed back to the terminal device.

To Load an extended character: ESC D n1 n2 data n1:

TABLE to save the character in {0x30, 0x31, 0xFF} (0xFF = quit)

n2:

character code {0x80 .. 0xFF} {CHR$(128) .. CHR$(255)} data:

16 x 23 bit (W x H) character matrix (46 bytes total). Each character must also fit into the matrix specified by the font size (see table below).

TABLE ‘0’

TABLE ‘1’

BANK ‘0’ International 12 & 16 cpi (Courier Modes 1 & 2) (12x23) International Rotated (Courier Mode 0) (14x23)

BANK ‘1’ International 19 cpi (Courier Mode 3) (10x23) International 21 & 24 cpi (Courier Modes 4 & 5) (8x23)

EXAMPLE:

To load a new character ‘A’

STEP 1 –

Describe the Bitmap:

BANK ‘2’ PC Line Draw 12 & 16 cpi (Courier Modes 1 & 2) (12x23) PC Line Draw Rotated (Courier Modes 0) (14x23)

BANK ‘3’ PC Line Draw 19 cpi (Courier Mode 3) (10x23) PC Line Draw 21 & 24 cpi (Courier Modes 4 & 5) (8x23)

This is best done within a font-editing program. Characters must be right justified within the 16 x 23 bit cell. To ensure the characters do not run together, care should be taken to leave at least a single line of space on one side of each character.

8

Page 13

Flash Based Font Download

STEP 2 –

Enter flash font program mode: Using the ESC D A 0 (Hexadecimal 1B 44 41 30) command to program the ASCII (0x20 – 0x7F) character sets. The printer will deactivate the CTS line.

STEP 3 –

Load new character shape for ‘A’: Once the printer has re-activated the CTS line, and transmitted the character ‘?’, it is possible to modify the character sets. Transmit the command ESC D 0 A (Hexadecimal 1B 44 30 41) followed by the data derived from the bitmap as shown. The order of transmission is Line 1 Left Byte, Line 1 Right Byte, Line 2 Left Byte, Line 2 Right Byte … Line 23 Left Byte, Line 23 Right Byte.

STEP 4 –

Save modified character sets: Currently all of the character sets are in the printer SRAM and may not be used for printing. To save the modified character sets into the flash memory, enter the command ESC D -xFF (Hexadecimal 1B 44 FF). The printer will transmit the character ‘D’ and then proceed to save the fonts to flash memory. THE PRINTER POWER MUST REMAIN ACTIVE AT THIS TIME. Once the fonts have been saved into flash memory, the printer will transmit the character ‘!’. At this time, the printer will transmit an ‘X’ every 500 milliseconds.

STEP 5 –

Cycle the printer power: To ensure optimal operation of the printer, remove the battery cartridge from the printer for several seconds. Replace the battery cartridge and the new fonts will be ready for use.

9

Page 14

Graphic Commands 8-Bit Dot Addressable Graphics The printer uses a single line thermal print head with elements spaced at 0.125mm. The Mt2 print head has 384 thermal elements for a total print width of 48mm, and the Mt3 has 576 elements for a print width of 77mm. The 8-bit graphic commands enable control of each one of the heating elements and advancing of the paper by increments of 0.125 mm. To select the 8-bit graphic mode the user application must issue the ESC V command. Next, the host application sends two bytes to indicate the number of the graphic lines desired, followed with packet of 48 bytes for each graphic line in the Mt2, or 72 bytes for each graphic line in the Mt3 or Mt3-II. The printer prints the graphic line and advances to the next line automatically. 8-Bit Dot Addressable Graphics commands ESC V n1 n2 data n2 n1 data Example:

16 bit integer indicating the number of graphic lines to be received. 48 bytes of graphic data for the Mt2, or 72 bytes for the Mt3/Mt3-II. Valid Graphic Character set is from 0x00 to 0xFF Hex using bits 0-7.

ESC V 0x01 0x00 and 72 bytes of data prints a single line of graphics on an Mt3/Mt3-II.

8-Bit Compressed Graphics ESC v height width counter data counter data… height

An eight bit value representing the number of dot lines contained in the following data set.

width

An eight bit value representing the number of bytes to be contained in each dot line of the following data set.

counter

An eight bit value describing how to process the following data: For signed values counter may be interpreted as follows: {127 ≥ counter ≥ 0} Process the next (counter + 1) bytes of data as 8 bit graphics. {0 > counter ≥ -128} Repeat the next single byte of data ((-counter) + 1) times. For unsigned values counter may be interpreted as follows: {127 ≥ counter ≥ 0} Process the next (counter + 1) bytes of data as 8 bit +1 times graphics. {128 ≤ counter ≤ 255} Repeat the next single byte of data, ((256 – counter).

10

Page 15

Graphic Commands Compressed Graphics Example: The following graphics data is to be printed:

This data may be represented in hexadecimal: 0x55 0x55

0x55 0x00

0x00 0x55

0x00 0x55

0xAA 0x55

0x11 0x55

The RLE compressed graphics command: DEC HEX

ESC

‘v’ height width counter

27 1B

118 76

2 02

6 06

255 FF data… 85 55

255 FF

0 00

3 03

170 AA

17 11

85 55

0 00

253 FD

85 55

Graphic Logo Commands Storing graphic logos in the printer’s memory will greatly reduce data trasmission time whenever the logo needs to be printed. The Mt2 and the Mt3-II support up to eight logos, while the Mt3 supports only one. A utility program is available for Windows desktop systems that will assist in creating the graphic definition of a logo. This graphic definition provides the graphic commands required in STEP 3, below. The utility. ‘prn2logo.exe’ is provided on the Mt Series Developer’s CD and may also be downloaded from www.printek.com. Please refer to the documentation provided with the utility for more information. Mt2 Enter Flash Logo Mode:

ESC D L n

Mt3 Enter Flash Logo Mode:

ESC D L

Mt3-II Enter Flash Logo Mode:

ESC D L n

Load /Record Graphic Logo:

ESC L G n

Stop Loading Graphic Logo:

ESC L G 0xFF

Print Graphic Logo:

ESC L g n Note:

The Mt2 supports 8 logos. n = 0-7. The Mt3 supports 1 logo. n = 0. The Mt3-II supports 8 logos. n = 0-7.

11

Page 16

Graphic Commands

Graphic Logo Operation STEP 1 –

Enter Flash Logo Program Mode: Mt2:

ESC D L n

(Hexadecimal 1B 44 4C and n = 30 – 37).

Mt3:

ESC D L

(Hexadecimal 1B 44 4C)

Mt3-II: ESC D L n

(Hexadecimal 1B 44 4C and n = 30 – 37).

Once received, the printer will deactivate the CTS line. Note: STEP 2 –

This command must be the first ESC command received upon activating the printer.

Start Logo Download: Once the printer has re-activated the CTS line, and transmitted the character ‘?’ it is possible to start the logo download. The host application selects the Graphic Logo record mode by sending the load command: Mt2:

ESC L G n

(Hexadecimal 1B 4C 47 and n = 30 – 37)

Mt3:

ESC L G 0

(Hexadecimal 1B 44 4C 30).

Mt3-II: ESC L G n Note:

STEP 3 –

(Hexadecimal 1B 44 4C and n = 30 – 37).

Any character not accepted as part of a logo load command will be echoed back to the host.

Transmit Logo: While in record mode, the Graphic Logo is downloaded using the 8-bit graphic command: Mt2:

ESC V n1 n2 48 bytes of graphic data

Mt3:

ESC V n1 n2 72 bytes of graphic data

Mt3-II: ESC V n1 n2 72 bytes of graphic data STEP 4 –

Save Logo to Flash Memory: At this time the logo is stored in the printer SRAM and may not be used for printing. To save the logo into the flash memory, enter the command: ESC L G 0xFF

(Hexadecimal 1B 4C 47 FF)

The printer will transmit the character ‘D’ and then proceed to save the logo to flash memory. THE PRINTER POWER MUST REMAIN ACTIVE AT THIS TIME. Once the logo has been saved into flash memory, the printer will transmit the character ‘!’. At this time, the printer will transmit an ‘X’ every 500 milliseconds. STEP 5 –

Cycle the printer power: To ensure optimal operation of the printer, remove the battery cartridge from the printer for several seconds. Replace the battery cartridge and the new logo will be ready for use.

12

Page 17

Bar Codes The Printek Mt2 and Mt3 printers support several bar code symbologies. Two commands are defined for printing bar codes: Bar Code Command Formats:

ESC z n1 n2 L data ESC Z n1 n2 L data z Z n1 print bar code only prints bar code and ASCII human readable text bar code type '1' Code 39 '2' Code 128, UCC/EAN-128 '3' Interleaved 2 of 5 '4' UPC/EAN/JAN '5' Codabar number of character bytes in data array 1 - 255 height of bar code printed in increments of 0.125mm n2 L

All barcodes are printed with the minimum bar width (“x-dimension”) of 0.250mm, in compliance with the respective official specification.

Code 39 Specifications Description:

Each symbol starts with Leading Quiet Zone, followed with Start Symbol, Data Symbols, ending with Stop Symbol and Trailing Quiet Zone.

Character set:

36 alphanumeric (0-9, A-Z and '-' 'space' '$' '/' '+' '%') Note: Only capital letters are supported.

Elements per symbol:

9 (5 bars, 4 spaces)

Character density:

6.25 CPI

Bar width:

0.25mm (narrow to wide ratio of 1:3).

Characters per line:

12 with auto center (maximum).

Example: Print "CODE-39", 1 mm high. Escape Sequence: ESC Hexadecimal: 1B

Z 5A

1 31

7 07

8 08

C 43

O 4F

D 44

E 45

2D

3 33

9 39

13

Page 18

Bar Codes

Code 128 Specifications Description:

Each symbol starts with Leading Quiet Zone, followed with Start Symbol, Data Symbols, ending with Stop Symbol and Trailing Quiet Zone.

Character set:

Support for full 256 ASCII set among three subsets.

Elements per symbol:

6 (3 bars, 3 spaces)

Character density:

9.1 CPI

Bar width:

0.25mm

Characters per line:

18 alphanumeric to 36 numeric only (maximum) - automatically centered.

Code 128 Start character:

<start character> {0x87, 0x88, 0x89} determines the character set to be printed.

IF <start character> is 0x87 CODE A: Characters Sent To Printer 0x020 through 0x03F ASCII 0x040 through 0x07F ASCII

Characters Read By Bar Code Reader 0x020 through 0x03F ASCII 0x00 through 0x07F ASCII

IF <start character> is 0x88 CODE B: Characters Sent To Printer 0x020 through 0x07F ASCII

Characters Read By Bar Code Reader 0x020 through 0x07F ASCII

IF <start character> is 0x89 CODE C: Characters Sent To Printer Characters Read By Bar Code Reader PAIRS 0x030 through 0x039 ASCII PAIRS 0x030 through 0x039 ASCII Note: With CODE C - each number must be paired with another. Code 128 data Bytes: The data bytes are defined by which character set is defined. The printer accepts all characters 0x20h - 0x7Fh with the translations defined above. Also, characters 0x080 - 0x86 may be used as code 128 control characters: HEX 0x080 0x081 0x082 0x083 0x084 0x085 0x086

DEC 128 129 130 131 132 133 134

CODE A FNC 3 FNC 2 SHIFT change to C change to B FNC 4 FNC 1

FNC 1: reserved CODE 128 character (used for UCC/EAN128) FNC 2: message append (not supported by all bar code readers) FNC 3: Initialize bar code reader FNC 4: extend characters (bar code reader reads character + 128)

14

CODE B FNC 3 FNC 2 SHIFT change to C FNC 4 change to A FNC 1

CODE C change to B change to A FNC 1