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 4 of 10

O'Neil Programming Language Reference Manual: Using Easy Print Mode, pages 16 to 24

Pages 16 to 24 of 69, from O'Neil Programming Language Reference Manual

The original document is the PDF (2.1 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 O'Neil MicroFLASH 4T (MF4T) and Datamax MicroFLASH 4T (MF4T)

Page 16

Using Easy Print Mode

3

Overview The Easy Print protocol is much more than just a printing protocol. In its most basic form, Easy Print mode allows the user to send and execute commands. As part of the command execution, the printer may return data to the host. In addition to printing, commands also allow paper motion, configuring, and control of peripherals such as the magnetic and smart card readers. All commands begin with an opening "left curly bracket" or '{' (ASCII 0x7C) and end with a closing "right curly bracket" or '}' (ASCII 0x7D). The commands immediately follows the opening bracket '{'. A colon ':' separates the command from the data that follows. The general format of any Easy Print command is: {[COMMAND]<:DATA>}. Easy Print mode controls the printer down to a single dotline. At the printer's resolution of 8 dots per mm, or approximately 200 dots per inch, one dotline is approximately .005". Most dimensions in Easy Print are in dotlines. For example, a simple command that allows paper to advance or retract would be {AHEAD:200} or {BACK:50} (the command AHEAD or BACK is followed by the number of dotlines to move paper). Easy Print commands are categorized as follows: •

Paper movement and misc.

•

Toggle Protocols

•

Printing

•

Downloading Fonts and Graphics

•

Configuration

O’Neil Programming Language Reference Manual

15

Page 17

Chapter 3: Using Easy Print Mode

COMMAND

MEANING

ORIGINAL MF2/MF3/2t/4t

RADIO READY 2t/3l/4t

PAPER MOVEMENT Advances paper by nnn dotlines X X Retracts paper by nnn dotlines X X Status (returns a fixed status string) X X SWITCH PROTOCOLS Puts printer into configured default DP X protocol LP Puts printer into Line Printer mode X X ESC Synonym for LP X Puts printer into emulation mode EMZn EMZn X (where n = 1, 2, 3 etc,) Puts printer into emulation mode EMCn EMCn X (where n = 1, 2, 3 etc.) Puts printer into emulation mode EMPn EMPn X (where n =1, 2, 3 etc.) PRINTING Prints a self test printout (does not TP X X require any data) Prints the data received. Note that the PRINT:data data must be in a particular format (see X X AN07 for Printing With Easy Print DOWNLOADING FONTS AND GRAPHICS Easy print is used for downloading fonts and graphics. It is best to use the Windows Configuration Program or the OPDI Suite for downloading, rather than attempt to write the code yourself. Other Application Notes describe this process in detail CONFIGURATION Easy Print is used to set configuration values into the printer. More detailed information is given in other Application Notes AHEAD:nnn BACK:nnn S

You can use Easy Print mode to design custom receipts, tickets, or reports with borders, lines, stored graphics, logos, bar codes, and text. For example, you can create a receipt with your company logo at the top, an identifying bar code in the middle, and a signature line at the bottom. Easy Print mode also allows you to use stored graphics, thus increasing your print speed. You can also use Easy Print mode to create images that are missing variable data which can be inserted when the image prints. For example, if a graphic is used multiple times on a receipt, ticket, or report, use Easy Print mode to store the graphic in Flash memory, minimizing the communication time between the printer and the host computer and increasing your print speed. Depending on the size of the format and the amount of memory available in your microFlash printer (1M or 4M), up to 100 different formats can be stored in internal memory. Only variable data is then sent from the handheld computer to the printer. This chapter contains the following information: •

Easy Print Commands

•

Easy Print: Using the Print Command

•

Easy Print: Using Configuration Commands

O’Neil Programming Language Reference Manual

16

Page 18

Chapter 3: Using Easy Print Mode

Note 1: This chapter assumes a basic knowledge of computer programming and is designed to be used by programmers, software engineers, and technicians. Note 2: To switch between Easy Print and Line Printer modes, enter ESC EZ to go to Easy Print mode. To switch from Easy Print mode to Line Printer mode, enter {LP}.

Easy Print Commands: General Guidelines Use the following guidelines when entering Easy Print commands: •

Easy Print commands appear as {Command:Information} where Information indicates a set of instructions needed by the printer to carry out a command. Not all Easy Print commands require a set of instructions to carry out a command. Some commands, such as {LP}, contain only a few characters with no additional instructions. To determine if a command needs additional instructions, see the specific Easy Print command on page 18.

•

Some Easy Print commands, such as the Print command, require a complex set of instructions to carry out a command. For more information about the Print command, see Easy Print: Using the Print Command.

•

If the printer is asleep, null characters must precede Easy Print or Line Printer commands. If the printer is awake in either mode, do not precede a command with null characters.

•

Always use Easy Print mode for graphics that are used multiple times, such as a company logo.

•

Do not insert spaces in a command unless they are part of the data. For information on the data, see Easy Print: Using the Print Command.

•

All commands must be entered in uppercase.

Sample Easy Print Job

O’Neil Programming Language Reference Manual

17

Page 19

Chapter 3: Using Easy Print Mode

Easy Print Commands Easy Print commands have a unique format and function. All but the Query class of commands are documented on the following pages. For information on queries, refer to Querying the Printer in the O'Neil Thermal Programming Guide. Note: In this chapter, an n indicates ASCII numbers, not binary numbers. For more information, see the specific command listed in the table below.

The following table lists available Easy Print commands: Command

Page

Ahead

18

Back

18

LP

18

Self-Test Printout

18

Status

18

Initial Program Load

19

Print Commands

20

Configuration

27

Ahead Command Ahead Command Format {AHEAD:nnn} {

A left bracket begins the command set.

AHEAD:nnn

AHEAD:nnn or Ahead:nnn or A:nnn advances the paper by nnn dotlines. Use the Ahead command as an alternative to manually advancing the paper. The range for nnn is 1 to 65,000 dotlines.

}

A right bracket ends the command set.

Back Command Back Command Format {BACK:nnn} {

A left bracket begins the command set.

BACK:nnn

BACK:nnn or Back:nnn or B:nnn backs the paper by nnn dotlines. Use the BACK command to reposition the edge of the paper for minimum paper waste.

}

A right bracket ends the command set.

O’Neil Programming Language Reference Manual

18

Page 20

Chapter 3: Using Easy Print Mode

Line Printer Mode Line Printer Mode {LP} {

A left bracket begins the command set.

LP

LP puts the printer into Line Printer mode. Note: Do not send additional characters for 500ms (is this the time period?) after sending this command (need more info. Why not?)

}

A right bracket ends the command set.

Self-Test Printout Self-test Printout {TP} {

A left bracket begins the command set.

TP

TP commands a self-test printout.

}

A right bracket ends the command set.

Limited Self-test Printout {TP1} {

A left bracket begins the command set.

TP1

TP1 commands a limited self-test printout.

}

A right bracket ends the command set.

Status Status {S} {

A left bracket begins the command set.

S

Returns an Easy Print status string.

}

A right bracket ends the command set.

Initial Program Load Initial Program Load {IPL:0xAA55} {

A left bracket begins the command set.

IPL:0xAA55

Erases the .BIN printer application file. This command is used in preparation to reload a new file.

}

A right bracket ends the command set.

O’Neil Programming Language Reference Manual

19

Page 21

Chapter 3: Using Easy Print Mode

Easy Print: Using the Print Command In Easy Print mode, the Print command includes all possible printer actions used to stop the paper, rotate images, print images, and alter images. Use the following format for Print commands: {Print, Global Options:@row,col:Name,Field Options|data|} {

A left bracket ({) begins the print command set.

Print,

A comma (,) follows the Print command if there are additional global options. If no additional set of instructions are specified, the print command is entered as {Print}.

Global Options:

Use Global Options: to specify actions that apply to an entire receipt or label. Follow global options with a colon (:). Do not enter spaces before or after the colon (:). Global options may modify the entire Easy Print command. For example, a global option can be used to stop the paper after a specified number of dotlines or at a specified mark, to rotate an image, or to print a specified number of copies simultaneously or on demand. For more information, see Print Command: Specifying Global Options.

@row, column:

Use @row,column: to specify the row and column where each line of text, graphics, bar codes and lines are to be printed. Follow the row and column information with a colon(:). Do not enter spaces before or after the colon. The range for each row is 1-65,000 dotlines. The column range for the 2t printer and LP3 printer and microFlash 2 printer is 1 384 dotlines. The column range for the microFlash 3 printer is 1 - 576 dotlines.The column range for the 4t printer is 832 dotlines. A typical print request consists of the Print command and the number of items to be printed, each at a different row and possibly a different column. For text to line up correctly, the column numbers must be identical, for example, @10,30 (Information)| and @60,30 (Information)|. If the column numbers are too large for the paper, or the print request skips to a row further down the paper, the print request is rejected. Note: In a typical print request, there may be five or more @row,col commands for a single Print command.

Name

Use Name to specify the name of the font, bar code, line, or file name of the graphic. An example of a font name is MF102. Do not add spaces to Name or the print request will be rejected. For more information, see Font Names, Graphic Names, Line Names, or Bar Code Names. Note: The Name can only be five characters long, even for usercreated graphics.

Field Options

Use Field Options to increase the size of fonts, bar codes, lines, or graphics. Each field option must be separated by a comma (,). For more information, see Font Field Options, Bar Code Field Options, or Graphic Field Options.

|Data|

Use |Data| to specify the text printed on a receipt or label, or to specify characters that can be read by a scanner. Vertical bars (|) surround the data.

}

A right bracket (}) ends the print request. O’Neil Programming Language Reference Manual

20

Page 22

Chapter 3: Using Easy Print Mode

Print Command: Guidelines •

Use the correct terms for global and field options (for example, QSTOPn or WIDEn where n indicates a number in the range). If a global or field option is entered incorrectly, the print request is rejected. For more information, see the appropriate global or field option on the following pages.

•

A single print command can be used for multiple print lines; therefore, you do not need to enter Print each time another line of text is printed.

Print Command: Specifying Global Options The following global options are available for the Print command: BACKnnn

Back Global Option

Format

BACKnnn

Function

Backs the paper up nnn dotlines before printing.

Example

{PRINT,BACK50:@10,30:MF107|Hi world|}

QSTOPnnn

Qstop Global Option

Format

QSTOPnnn (1<nnn<65000)

Function

Stops nnn dotlines after sensing the Q mark. When the Q mark is found, the paper advances by nnn dotlines and stops, even if the image is not yet complete. If the Q mark is not found, the printer continues to advance; therefore, use the STOP option when stop conditions are larger than the desired image. The value of nnn ranges from 1 to 65,535 dotlines.

(1<nnn<200)

(microFlash 2/3/2t)

QSTOP Bnnn - QMark bottom QSTOP Tnnn - QMark top QSTOP Gnnn - QMark gap QSTOP N - Ignore QMark The commands notes above override label and sensor congiuration settings in the printer. Note: When the paper is properly aligned, the Q mark cannot be positioned below the sensor. For more information, refer to Specifications in the O'Neil Thermal Programming Guide. Example

{PRINT,QSTOP500:@10,30:MF107|Hi world|}

ROTxxx

Rotate Global Option

Format

ROT270, ROT180, ROT090

Function

Rotates the image with the left edge of the image printing first either 270, 180, or 90 degrees.

Example

{PRINT,ROT270:@10,30:MF107|Hi world|}

O’Neil Programming Language Reference Manual

21

Page 23

Chapter 3: Using Easy Print Mode

STOPnnn

Stop Global Option

Format

STOPnnn

Function

Advances the paper to the proper point for tearing. This option stops the paper nnn dotlines (.005”/dotline or 200 dotlines/inch) after the beginning of the label or receipt. The data nnn is sent after the STOP option specifies the total number of dotlines high for the image. For example, for the microFlash series of printers (which have a 203dpi mechanism), specifying STOP500 gives a 2.5" total height image from the top of the paper to where it stops under the printhead.

(1<nnn<65000)

If the paper has advanced nnn dotlines and the printed part of the image is not yet complete, the image is truncated. If the printed part of the image is complete, white space is added to the bottom until nnn dotlines have advanced. The value of nnn ranges from 1 to 65,535 dotlines. The STOP option can also be used with the QSTOP option. Specify the STOP to stop the printing just after the stop using the QSTOP option. This ensures the paper stops advancing whether paper with Q marks is loaded, or regular paper is loaded. Example

{PRINT,STOP500,QSTOP125 :@10,30:MF107|Hi world| } In this example, the paper stops advancing when it has advanced 500 dotlines, or 125 dotlines after the Q mark is detected, whichever occurs first.

O’Neil Programming Language Reference Manual

22

Page 24

Chapter 3: Using Easy Print Mode

Print Command: Customizing Fonts Font Names {Print, Global Options:@row,column:NAME,Field Options|data|} Use the following options to customize fonts. Each font has a five-character name. The following is a partial list of font names. For a list of all available fonts, refer to the O'Neil Portable Printers Fonts Guide or call your O'Neil representative at (949) 458-0500. Font Name

CPI

Description

MF055

5.5

96 characters, large block (26 characters for lowercase, 26 characters for uppercase, plus symbols, etc.)

MF072

7.5

96 characters, large block

MF102

10.2

223 characters, medium block, bold

MF107

10.7

96 characters, block, bold

MF185

18.5

96 characters, block, normal

MF204

20.4

224 characters, block, normal (default font for microFlash 2/3/2t)

MF226

22.6

97 characters, small block microFlash 2i Only Font Name

CPI

Description

IM5X7

22.1

96 characters for impact 5x7

IM5X8

22.1

96 characters for impact 5x8

Font Field Options {Print, Global Options:@row,column:Name,FIELD OPTIONS|data|} Use the following options to heighten or widen the font: Field Option

Abbr. Description

HMULTn

HMn

Widens text: 1<n<255

VMULTn

Vn

Heightens text: 1<n<255

Note: To compare the available fonts, run the demo program and print the samples. For more information, see ___ on page ___.

O’Neil Programming Language Reference Manual

23