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 3 of 15

EasyCoder E4 Direct Protocol 2.01 Programmer's Guide: Chapter 3: Principles of Operation

Pages 9 to 16 of 113, from EasyCoder E4 Direct Protocol 2.01 Programmer's Guide

The original document is the PDF (2.3 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 E4

Page 9

Chapter 3

Principles of Operation 1. Intermec Direct Protocol Special Features

There is a built-in error handler, that can indicate selected error conditions and produce error-messages of your own creation in any language you like. Variable input data (in a special format) can be inserted into fields in a predefined layout. You can create counters without extensive programming. You can easily enable the Feed key to produce printouts. By default, verbosity is turned on in Intermec Direct Protocol1. Intermec Direct Protocol allows you to send commands to the printer in two ways: • Immediate Mode • Layout Mode

2. Sending Commands

• Immediate Mode You send commands that the printer will act upon immediately. This method is used for setting up the printer, for returning information from the printer back to the host and for managing files, fonts and images. Examples: PRINT KEY ON ↵ ? DATE$ ↵ KILL "LAYOUT1" ↵

(enable Feed key) (read printer's calendar) (delete a layout or file)

Immediate Mode can also be used for creating label layouts including all the printable data as illustrated below.

1

/. While you are experimenting with Intermec Direct Protocol, we recommend that you retain the default verbosity setting (ON). Later you should change it to OFF, since this will produce optimum printer performance.

8

• Layout Mode Layout Mode is only intended for creating labels. Firstly, create a layout containing formatting commands for a number of fields and such printable data that you do not need to change. Secondly, send a string of printable data to the empty fields plus a print command. You can create a number of different layouts, select the one you need, add the variable data and print out the labels.

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 10

Chapter 3

2. Sending Commands, cont'd.

Principles of Operation

Let us create the simple label shown on the left using both methods: Immediate Mode You can send the string as a single line: BF ON:BF "Swiss 721 BT",9,0:PP 10,20: PX 400,300,10:PP 25,25:PM "ROM:GLOBE.1": PP 75,250:BT "CODE39":PB "ABC":PP 75,200: FT "Swiss 721 BT",9,0:PT "My FIRST label!": PF ↵ You can also send the same string line by line:

ABC

BF ON ↵ (enable bar code interpretation) BF "Swiss 721 BT",9,0 ↵ (select bar code interpr. font) PP 10, 20 ↵ (insertion point for box field) PX 400,300,10 ↵ (create a box) PP 25,25 ↵ (insertion point for image field) PM "ROM:GLOBE.1" ↵ (select image) PP 75,250 ↵ (insertion point for bar code field) BT "CODE39" ↵ (select bar code type) PB "ABC" ↵ (input data to bar code field) PP 75,200 ↵ (insertion point for text field) FT "Swiss 721 BT",9,0 ↵ (select font for text field) PT "My FIRST label!" ↵ (input data to text field) PF ↵ (print one label) Layout Mode First, create a layout:

Note: If a label has been printed using a predefined layout and you want to return to Immediate Mode, the predefined layout must first be cleared from the printer's working memory using the following command: LAYOUT RUN ""

LAYOUT INPUT "LABEL1" ↵ (start layout recorder) BF ON ↵ (enable bar code interpretation) BF "Swiss 721 BT",9,0 ↵ (select bar code interpr. font) PP 10,20 ↵ (insertion point for box field) PX 400,300,10 ↵ (create a box) PP 25,25 ↵ (insertion point for image field) PM "ROM:GLOBE.1" ↵ (select image) PP 75,250 ↵ (insertion point for bar code field) BT "CODE39" ↵ (select bar code type) PB VAR1$ ↵ (variable input data to bar code field) PP 75,200 ↵ (insertion point for text field) FT "Swiss 721 BT",9,0 ↵ (select font for text field) PT VAR2$ ↵ (variable input data to text field) LAYOUT END ↵ (save layout)

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

9

Page 11

Chapter 3 Principles of Operation

2. Sending Commands, cont'd.

Then add the variable input data and a print command: LAYOUT RUN "LABEL1" ↵ (select layout) INPUT ON ↵ (enables layouts and var. data fields) <STX> (start of input data, ASCII 02 dec) ABC ↵ (variable input data to VAR1$) My FIRST label! ↵ (variable input data to VAR2$) <EOT> (end of input data, ASCII 04 dec) PF ↵ (print one label) INPUT OFF ↵ (disables layouts and var. data fields)

3. Fields

The printable information on a label, ticket, tag or piece of strip consists of various types of field. A field can consist of: • A single line of text • A bar code with or without human readable interpretation • An image, i.e. a picture, logo or sign in .PCX format • A box, i.e. a hollow square or rectangle • A line

4. General Formatting Commands

Any type of field should be specified with regard to: • Position • Alignment • Direction

5. Field-Related Formatting Commands

Depending on the type of field, additional formatting commands can be used:

1

/ . This refers to one-dimensional bar codes only. Complex twodimensional bar or dot codes may have other formatting parameters.

10

• Text Field: - Font (typeface) - Font Size - Font Slant - Magnification - Normal Image/Inverse Image • Bar Code Field1: - Bar Code Type - Height (height of bar pattern) - Ratio (wide bars/narrow bars) - Magnification (bar pattern) - Bar Code Interpretation On/Off - Bar Code Interpretation Font - Bar Code Interpretation Font Size - Bar Code Interpretation Font Slant

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 12

Chapter 3

5. Field-Related Formatting Commands, cont'd.

Principles of Operation

• Image Field: - Magnification - Normal Image/Inverse Image • Box Field: - Size (height, width, line thickness) • Line Field: - Size (length, line thickness) Text, bar code and image fields also require some input data: • Text Field: Alphanumeric text • Bar Code Field: Alphanumeric or numeric value (depending on type of code) • Image Field: Name of the image The input data to text and bar code fields may either be provided by the host or read from the printer's software, e.g. counter values or various data related to the printer's clock/calendar. In Intermec Direct Protocol, you can either specify the fields both with regard to formatting parameters and input data in the same string, or you can create a layout to which you can send variable data later. The layout should contain formatting parameters for all fields and input data to such fields that will always contain the same information. When the variable input data are added, they will be inserted into their respective fields (like filling in a pre-printed form).

6. Layout Commands

When creating predefined layouts, special commands must be used for: • Starting the layout recorder • Saving the layout

7. Printable Data Commands

Depending on the type of field and the type of bar code, printable data to text and bar code fields may consist of: • Alphanumeric data (i.e. text) • Numeric data • Counter values • Current date • Current time • Current date +/- nn days • Current time +/- nn seconds • Current week number • Current weekday

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

11

Page 13

Chapter 3 Principles of Operation

8. Feeding and Printing Commands

Some commands control printing and paper feed, e.g.: • Changing paper feed speed • Rotating the print roller during cleaning • Feeding out an empty label, ticket, tag or piece of strip • Adjusting the label stop/black mark sensor. • Printing one label or a batch of labels (or similar).

9. Setting Up the Printer

You can control how the printer will work, e.g.: • Select standard IN and OUT channels • Set the printer's clock/calendar • Set formats for the printing of date and time • Set separators for input data strings to predefined layouts • Create label counters • Enable/disable the optional label-taken sensor • Enable/disable Feed key • Format the printer's RAM memory or a memory card • Remap certain incoming characters • Select character set(s) • Restart the printer • Select verbosity level • Select type of error message • Enable error handling and create customized error messages • Select method for breaking the printing of a batch of labels • Change the printer's setup

10. Reading Printer's Status

Provided you have two-way serial communication between printer and host, you can return the printer's status with regard to a number of functions to the host, e.g.: • Current date and time • Memory status • Printhead status and characteristics • Value of various system counters • Status of various sensors • Software and hardware version

12

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 14

Chapter 3

Principles of Operation

11. File-Handling Commands

A number of commands are used to control the printer's memory, for example: • Read the names of files, fonts or images stored in the printer's memory • Download binary files • Download .PCX files • Remove files • Remove downloaded images • Copy files

12. Syntax Descriptions

Many commonly used commands have a shorthand version to minimise the transfer of data. In the explanations of the various command that follow, both the full name and the shorthand version will be shown, separated by a thin vertical line, e.g.: PRPOS | PP

Upper- and lower-case characters can be used at will in commands. Parameters for commands are shown like this: <parameter> numeric value "<parameter>" alphanumeric text (enclosed by double quotation marks) • Compulsory space characters are indicated by a double-headed arrow (↔). • Square brackets [ ] indicate optional parameters. • Thin vertical bars (|) indicate alternatives. • Always enter parentheses, commas, colons, semicolons, minus signs, quotation marks and period characters exactly as shown. • Negative values are indicated by leading minus signs (-).

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

13

Page 15

Chapter 3 Principles of Operation

13. File Storage Devices and File Names

Files can be stored in the EasyCoder E4 on one of five devices: • "ROM:" Contains the built-in files necessary for using the printer. This is a read-only device that resides in the flash memory. • "RAM:" Contains files created by the user. This is a read/write device that resides in the flash memory. • "CACHE:" Can only contain images. This device is volatile, i.e. its contents will be lost at power off or reboot. • "CARD1:" A PCMCIA card in the slot nearest the ON/OFF switch, which can be a DOS-formatted card or a specially formatted font cartridge. • "CARD2:" A PCMCIA card in the slot farthest from the ON/OFF switch, which can be a DOS-formatted card or a specially formatted font cartridge. The files in each device can be listed using the FILES command, e.g. FILES "RAM:" In general, "ROM:" and font cartridges in "CARD1:" or "CARD2:" are read-only devices; you cannot create, copy or delete files on these devices, e.g. the following commands would cause errors: FILE&LOAD "ROM:NEWFILE",123 COPY "RAM:OLDFILE","CARD1:NEWFILE" (if CARD1: contains a font cartridge) KILL "CARD2:OLDFILE" (if CARD2: contains a font cartridge) In contrast, "RAM:", "CACHE:", and DOS-formatted cards in "CARD1:" or "CARD2:" are read/write devices which support all file operations. When using a Direct Protocol command which has the name of an existing file as a parameter, you can: • specify the device name before the filename, e.g. KILL "RAM:MYFILE.TXT" • omit the device name, e.g. KILL "MYFILE.TXT" in which case, the printer will search each device in turn until it finds a file with this name.

14

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

Page 16

Chapter 3

13. File Storage Devices and File Names, cont'd.

Principles of Operation

If you use a Direct Protocol command which creates a file, you can either... • specify the device on which the file is to be stored, e.g. FILE&LOAD "CARD1:MYFILE.TXT", 123 • or omit the device name, e.g. FILE&LOAD "MYFILE.TXT", 123 in which case the file will be stored on "RAM:". The EasyCoder E4 Direct Protocol supports wildcards, i.e. devices, filenames, or filename extensions can be substituted by asterisks ("*"; ASCII 42 dec.). For example, the command KILL "RAM:*.PRG" will erase all files with the extension .PRG in the device "RAM:". A file downloaded under the name "Autoexec.bat" will automatically start running when the printer is started, see 8.4

Intermec EasyCoder E4 Direct Protocol 2.01 – Programmer's Guide Ed. 1

15