ubi direct protocol – programmer's guide 1....

60
1 UBI Direct Protocol – Programmer's Guide 1. INTRODUCTION 1. Contents 1. INTRODUCTION 1. Contents ................................................................................................ 1 2. Preface .................................................................................................. 3 2. GETTING STARTED 1. Computer Connection ........................................................................... 4 2 Check Paper Supply .............................................................................. 4 3. Turn On the Printer ............................................................................... 5 4. UBI Shell Startup Program .................................................................... 5 5. No Startup Program .............................................................................. 5 6. Serial Communication Test ................................................................... 6 3. PRINCIPLES OF OPERATION 1. Entering the UBI Direct Protocol from UBI Shell ................................. 7 2. Entering the UBI Direct Protocol from the Immediate Mode ................ 7 3. Special UBI Direct Protocol features .................................................... 7 4. Sending Instructions .............................................................................. 8 5. Fields .................................................................................................... 9 6. General Formatting Instructions ............................................................ 9 7. Field-Related Formatting Instructions ................................................. 10 8. Layout Instructions ............................................................................. 10 9. Printable Data Instructions .................................................................. 11 10. Printing Instructions ............................................................................ 11 11. Setting Up the Printer .......................................................................... 11 12. Reading Printer's Status ....................................................................... 12 13. File-Handling Instructions ................................................................... 12 14. Syntax Descriptions ............................................................................ 12 4. LABEL DESIGN 1. Introduction ........................................................................................ 13 2. General Formatting Instructions .......................................................... 14 3. Text Field ........................................................................................... 17 4. Bar Code Field .................................................................................... 19 5. Image Field ......................................................................................... 22 6. Box Field ............................................................................................ 24 7. Line Field ........................................................................................... 25 8. Layout Instructions ............................................................................. 26 9 Printable Data Instructions .................................................................. 27 5. FEEDING AND PRINTING 1. Paper Feed .......................................................................................... 31 INSTRUCTIONS 2. Label Printing ..................................................................................... 33 3. Batch Printing ..................................................................................... 34 6. SETTING UP THE PRINTER 1. Enabling/Disabling UBI Direct Protocol ............................................. 36 2. Selecting Standard I/O Channel .......................................................... 36 3. Setting Time and Date ......................................................................... 37 4. Selecting Format for Time and Date .................................................... 37 5. Changing Separators ........................................................................... 38 6. Creating Counters ............................................................................... 39 7. Enabling/Disabling label-Taken Sensor .............................................. 40 8. Enabling/Disabling Automatic Cutting ................................................ 40 9. Enabling/Disabling Print Key ............................................................. 41 10. Enabling/Disabling Ribbon Save ........................................................ 41 11. Producing Audible Signals .................................................................. 41 UBI Direct Protocol Programmer's Guide Included in UBI Fingerprint 6.0 Edition 1, June 1995 Art. No. 1-960395-00 Continued!

Upload: vokiet

Post on 26-Mar-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

1

UBI Direct Protocol – Programmer's Guide

1. INTRODUCTION

1. Contents

1. INTRODUCTION 1. Contents................................................................................................ 12. Preface.................................................................................................. 3

2. GETTING STARTED 1. Computer Connection........................................................................... 42 Check Paper Supply.............................................................................. 43. Turn On the Printer............................................................................... 54. UBI Shell Startup Program.................................................................... 55. No Startup Program.............................................................................. 56. Serial Communication Test................................................................... 6

3. PRINCIPLES OF OPERATION 1. Entering the UBI Direct Protocol from UBI Shell.................................72. Entering the UBI Direct Protocol from the Immediate Mode................ 73. Special UBI Direct Protocol features.................................................... 74. Sending Instructions.............................................................................. 85. Fields.................................................................................................... 96. General Formatting Instructions............................................................ 97. Field-Related Formatting Instructions................................................. 108. Layout Instructions............................................................................. 109. Printable Data Instructions.................................................................. 1110. Printing Instructions............................................................................ 1111. Setting Up the Printer.......................................................................... 1112. Reading Printer's Status....................................................................... 1213. File-Handling Instructions................................................................... 1214. Syntax Descriptions............................................................................ 12

4. LABEL DESIGN 1. Introduction........................................................................................ 132. General Formatting Instructions.......................................................... 143. Text Field........................................................................................... 174. Bar Code Field.................................................................................... 195. Image Field......................................................................................... 226. Box Field............................................................................................ 247. Line Field........................................................................................... 258. Layout Instructions............................................................................. 269 Printable Data Instructions.................................................................. 27

5. FEEDING AND PRINTING 1. Paper Feed.......................................................................................... 31 INSTRUCTIONS 2. Label Printing..................................................................................... 33

3. Batch Printing..................................................................................... 34

6. SETTING UP THE PRINTER 1. Enabling/Disabling UBI Direct Protocol.............................................362. Selecting Standard I/O Channel.......................................................... 363. Setting Time and Date......................................................................... 374. Selecting Format for Time and Date.................................................... 375. Changing Separators........................................................................... 386. Creating Counters............................................................................... 397. Enabling/Disabling label-Taken Sensor.............................................. 408. Enabling/Disabling Automatic Cutting................................................ 409. Enabling/Disabling Print Key............................................................. 4110. Enabling/Disabling Ribbon Save........................................................ 4111. Producing Audible Signals.................................................................. 41

UBI Direct ProtocolProgrammer's GuideIncluded in UBI Fingerprint 6.0Edition 1, June 1995Art. No. 1-960395-00 Continued!

Page 2: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

2

UBI Direct Protocol – Programmer's Guide

1. INTRODUCTION, cont'd.

1. Contents, cont'd.

6. SETTING UP THE PRINTER, cont'd. 12. Formatting the Printer's Memory......................................................... 4113. Preprocessing Input Data.................................................................... 4214. Selecting Character Set....................................................................... 4215. Rebooting the Printer.......................................................................... 4316. Setting Verbosity Level....................................................................... 4317. Selecting Type of Error Message........................................................ 4318. Error Handling.................................................................................... 4419. Setting Break for Batch Printing.......................................................... 4520. Changing the Printer's Setup............................................................... 46

7. READING THE PRINTER'S STATUS 1. Introduction........................................................................................ 472. Returning Information to Host............................................................ 473. Reading Date and Time....................................................................... 474. Testing Printer's Memory.................................................................... 475. Testing the Printhead.......................................................................... 476. Reading System Counters................................................................... 487. Reading Sensors and Straps................................................................ 488. Reading Printer's Status....................................................................... 499. Reading Software and Hardware Versions.......................................... 49

8. FILE-HANDLING 1. Reading Printer's Memory................................................................... 502. Removing Fonts, Images and Files...................................................... 503. Copying Files...................................................................................... 514. Downloading Binary Files.................................................................. 515. Downloading Image Files................................................................... 51

9. ADVANCED FEATURES 1. Specifying Complex Bar Codes.......................................................... 522. Font Scaling........................................................................................ 53

10. CHARACTER SET 1. Roman 8 ASCII Decimal Character Set.............................................. 54

11. ERROR MESSAGES 1. Interpretation Table............................................................................. 55

12. REFERENCE LISTS 1. Instructions in Alphabetical Order....................................................... 572. Instruction Syntax List........................................................................ 59

Information in this manual is subject to change without prior notice and does not representa commitment on the part of UBI Printer AB.

© Copyright UBI Printer AB, 1995. All rights reserved. Published in Sweden.

EasyCoder is a trademark of United Barcode Industries (UBI).Apple is a registered trademark of Apple Computer, Inc.Bitstream is a registered trademark of Bitstream, Inc.Centronics is a registered trademark of Centronics Data Computer Corp.IBM is a registered trademark of International Business Machines Corporation.Macintosh and TrueType are registered trademarks of Apple Computer, Inc.Microsoft, MS, and MS-DOS are registered trademarks of Microsoft Corporation.Speedo is a trademark of Bitstream, Inc.Windows is a trademark of Microsoft Corporation.

Page 3: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

3

UBI Direct Protocol – Programmer's Guide

1. INTRODUCTION, cont'd.

2. Preface UBI Direct Protocol is an easy-to-use printer protocol that has beendeveloped for use with the computer-controlled direct thermal andthermal transfer printers manufactured by United Barcode Indus-tries (UBI).

The UBI Direct Protocol can be used in two ways:• To create label layouts consisting of fields with fixed or variable

information. A layout can then be selected and provided withvariable input from the host computer in the form of a simplestring of data.

• To send input data and formatting instructions as a continuousstring of data directly from the host computer.

In both cases, the UBI Direct Protocol provides a flexible errorhandler, which allows you to compose your own error messages inany language.

The UBI Direct Protocol has been created with two main types ofapplication in mind:• Applications, where the end-user requires a simple printer control

program, and has little or no use for the sophistication andflexibility offered by UBI's Basic-inspired programming languageUBI Fingerprint, yet needs a versatile error handler.

• Applications, which are provided with a comprehensive printercontrol program in the host computer, making the use of UBIFingerprint programming more or less an overkill.

UBI Direct Protocol is easily accessible in most UBI EasyCoderprinters by means of the UBI Shell startup programs.

UBI Direct Protocol is included in UBI Fingerprint EPROMsstarting with version 6.0 and can be selected using UBI Shell 4.0.

Refer to chapter 12 at the end of this manual for lists of the variousinstructions in the UBI Direct Protocol.

We recommend having the following manuals accessible:• Technical Manual for the printer model in question.• UBI Shell Standard or Enhanced Startup Manual (depending on

type of printer).• This Programmer's Guide.• UBI Fingerprint Reference Manual (useful, but not necessary).

Page 4: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

4

UBI Direct Protocol – Programmer's Guide

2. GETTING STARTED

1. Computer Connection The UBI Direct Protocol is included in the UBI Fingerprintsoftware, which is stored in two EPROM packages fitted on theprinter's CPU board at delivery. No floppy disks or operativesystem, like e.g. MS-DOS, is required. The printer only needs to beconnected to a mains supply and to some device, which can transmitcharacters in ASCII format. It can be anything from a non-intelligent terminal to a mainframe computer system.

For running the printer, we recommend a computer with a screen,an alphanumeric keyboard, and a communication program, thatprovides two-way serial communication, preferably using RS232C.

It is possible to install an optional parallel communication board inthe printer for receiving data. However, since the parallel interfaceprovides one-way communication only, no data or messages can bereturned to the screen of the host.

Connect the printer and host as described in the Technical Manualfor the printer model in question. If the printer has several serialcommunication ports, it is recommended to use the serial port"uart1:", which by default is set up for RS 232C, for controlling theprinter. Other serial communication ports could also be used, seethe Technical Manual.

It is possible to set up the printer's communication protocol to fit thehost computer, as described in the Technical Manual. However,until you have become familiar with the UBI Direct Protocol, it maybe easier to adapt the host to the printer's default setup parameters.There is no communication setup for the parallel "centronics"interface:

Default serial communication setup on "uart1:"• Baud rate: 9600• Parity: None• Character length: 7• No. of stop bits: 2• Flow control: XON/XOFF to and from host• New line: CR/LF (Carriage Return + Line Feed)

Check that the printer has an ample supply of paper or otherreceiving material and, when applicable, of thermal transfer ribbon.Refer to the Operator's Guide or the User's Manual for loadinginstructions.

Continued!

2. Check Paper Supply

Page 5: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

5

UBI Direct Protocol – Programmer's Guide

Check that the printhead is lowered. Turn on the mains switch,which usually is fitted on the printer's rear plate, and check that the“Power” control lamp comes on. Then check the display window.What happens next depends on what kind of startup program thereis in the printer.

WARNING!Make sure that any paper cutter is locked in closed position.

The cutter will be activated when the power is turned on!

After a short while, when the printer has performed certain self-diagnostic tests and loaded the startup program, a countdown menuwill be displayed:

ENTER=UBI SHELL or PRINT=UBI SHELL5 sec. v.4.0 5 sec. v.4.0

These menus indicate that the printer is fitted with one of the UBIShell startup programs. Before the 5 seconds countdown is com-pleted, you should take action as to select the UBI Direct Protocolas described in the UBI Shell manual. You can start all over againby simply turning off the power.

Once you have selected UBI Direct Protocol, the printer willautomatically enter it at each startup, until you select anotheroption in UBI Shell.

If the printer is not fitted with any startup program at all, the displaywindow should show the following message directly after power-up:

UBI Fingerprint6.0

This means that the printer has entered the immediate mode of UBIFingerprint. You will have to enter the UBI Direct Protocol bysending a special instruction to the printer as described in chapter3.2.

3. Turn On the Printer

4. UBI Shell StartupProgram

2. GETTING STARTED, cont'd.

5. No Startup Program

Continued!

Page 6: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

6

UBI Direct Protocol – Programmer's Guide

6. Serial CommunicationsTest

2. GETTING STARTED, cont'd.

Check that you have a working two-way serial communication bysending a simple instruction from the host to the printer. On the host,type:

? VERSION$ ↵ (↵ = Carriage Return key)

Provided you have a serial two-way communication, the printershould respond by immediately returning the version of the in-stalled UBI Fingerprint software to the screen of the host, e.g.:

UBI Fingerprint 6.0Ok

This indicates that the communication is working both ways.

If the communication does not work, turn off the printer and checkthe connection cable and CPU board straps. Also check if thecommunication setup in the host corresponds to the printer's setupand if the connection is made between the correct ports. Then try thecommunication test again.

Once you know that the communication is working, you may go onand send a line of text to make sure that characters transmitted fromthe terminal are interpreted as expected by the printer's software:

FT "SW030RSN" ↵PT "ABCDEFGHIJKLM" ↵PF ↵

Each line will be acknowledged by “Ok” on the screen, providedit has been entered correctly. When you press the “CarriageReturn” key the third time, the printer will feed out a label, ticket,tag or piece of strip with the text printed in the lower left corner ofthe printable area.

You can try using other characters between the quotation marks inthe third line, especially typical national characters like ÅÄÖÜ¿¢¥çetc. Should any unexpected characters be printed, you may need toselect another character set, see chapter 6.14, or change the commu-nication setup from 7-bit to 8-bit character length.

ABCDEFGHIJKLM

Page 7: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

7

UBI Direct Protocol – Programmer's Guide

1. Entering the UBI DirectProtocol from UBI Shell

In UBI Shell, select the “UBI Direct Protocol” option under the“Select Application” headline. When you have selected the UBIDirect Protocol, the printer will restart. After a moment, the displaywill show the message:

Direct Protocol6.0

If you do not have UBI Shell installed in your printer, enter theimmediate mode of UBI Fingerprint. In the immediate mode, issuethe following instruction:INPUT ON ↵ (↵ is a carriage return character, ASCII 13 dec. )

The display will show the message:

Direct Protocol6.0

By default, no messages or characters will be returned to the hostuntil you leave the UBI Direct Protocol, see chapter 6.16.

If you are familiar with UBI Fingerprint, you will notice that theUBI Direct Protocol is rather similar to the Immediate Mode. Thereare, however some important differences:

• The UBI Direct Protocol has a built-in error handler, that canindicate selected error conditions and produce error-messages ofyour own creation in any language you like.

• The UBI Direct Protocol is able to receive variable input data ina special format to fields in a predefined layout.

• The UBI Direct Protocol allows you to create counters withoutextensive programming.

• The UBI Direct Protocol provides a simple way to enable thePrint key to produce printouts.

• By default, verbosity is off in the UBI Direct Protocol1.

• A number of instructions only work in the UBI Direct Protocol:COUNT&ERRORFORMAT INPUTINPUT ON/OFFLAYOUT ENDLAYOUT INPUTLAYOUT RUNPRINT KEY ON/OFF

3. PRINCIPLES OF OPERATION

Continued!

1/. While you develop your UBI DirectProtocol, we recommend to set theverbosity to On by means of a SYSVAR(18)instruction, see chapter 6.16.

2. Entering the UBI DirectProtocol from theImmediate Mode

3. Special UBI DirectProtocol Features

Page 8: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

8

UBI Direct Protocol – Programmer's Guide

4. Sending Instructions The UBI Direct Protocol allows you to send instructions to theprinter in two ways:

• You can send instructions that the printer will act upon directly.This method is used for setting up the printer, for reading variousdata from the printer back to the host and for managing files, fontsand images.

Examples:PRINT KEY ON ↵ (enable Print key)? DATE$ ↵ (read printer's calendar)KILL "LAYOUT1" ↵ (delete a layout or file)

This method can also be used for creating label layouts includingall the printable data as illustrated below.

• The other method is only intended for creating labels. First createa layout containing formatting instructions for a number of fieldsand such printable data that you do not need to change. Then senda string of printable data to the empty fields plus a print instruction.You can create a number of different layouts and select the oneyou need, and then add the variable data.

Let us create the simple label shown to the left using both methods:

Layout and Printable Data in One Sequence:BF ON:BF "SW030RSN":PP 10,10:PX 400,300,10:PP 25,25:PM "UBI":PP 75,250:BT"CODE39":PB "UBI":PP 75,200:FT "SW030RSN":PT "My FIRST label!":PF ↵

You can also send the same string line by line:

BF ON ↵ (enable bar code interpretation)BF "SW030RSN" ↵ (select bar code interpretation font)PP 10,10 ↵ (insertion point for box field)PX 400,300,10 ↵ (create a box)PP 25,25 ↵ (insertion point for image field)PM "UBI.1" ↵ (select image)PP 75,250 ↵ (insertion point for bar code field)BT "CODE39" ↵ (select bar code type)PB "UBI" ↵ (input data to bar code field)PP 75,200 ↵ (insertion point for text field)FT "SW030RSN" ↵ (select font for text field)PT "My FIRST label!" ↵ (input data to text field)PF ↵ (print one label)

UBI

My FIRST label!

Continued!

3. PRINCIPLES OF OPERATION, cont'd.

Page 9: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

9

UBI Direct Protocol – Programmer's Guide

Layout and Variable Input Data in Separate Sequences:First, create a layout:

LAYOUT INPUT "LABEL1" ↵ (start layout recorder)BF ON ↵ (enable bar code interpretation)BF "SW030RSN" ↵ (select bar code interpretation font)PP 10,10 ↵ (insertion point for box field)PX 400,300,10 ↵ (create a box)PP 25,25 ↵ (insertion point for image field)PM "UBI.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 "SW030RSN" ↵ (select font for text field)PT VAR2$ ↵ (variable input data to text field)LAYOUT END ↵ (save layout)

Then add the variable data and a print instruction:

LAYOUT RUN "LABEL1" ↵ (select layout)<STX> (start of input data, ASCII 02 dec)UBI ↵ (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)

The printable information on a label, ticket, tag or piece of stripconsists of various types of fields. 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, logotype or sign in a special bitmap

format• A box, i.e. a hollow square or rectangle• A line

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

Refer to chapter 4.2 for more information.

3. PRINCIPLES OF OPERATION, cont'd.

4. Sending Instructions,cont'd.

Continued!

5. Fields

6. General FormattingInstructions

Page 10: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

10

UBI Direct Protocol – Programmer's Guide

Continued!

1/. Refers to one-dimensional bar codes.Complex two-dimensional bar or dot codesmay have other formatting parameters.

Depending on type of field, additional formatting instructions canbe used:

Type of Field Formatting Instructions

Text Field Font (typeface)MagnificationNormal Image/Inverse Image

Bar Code Field1 Bar Code TypeHeight (height of bar pattern)Ratio (wide bars/narrow bars)Magnification (bar pattern)Bar Code Interpretation On/OffBar Code Interpretation Font

Image Field MagnificationNormal 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 bythe host, or be read from the printer's software, e.g. counter valuesor various data related to the printer's clock/calendar.

In the UBI Direct Protocol, you can either specify the fields both inregard of 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 andinput data to such fields that will always contain the same informa-tion. When the variable input data are added, they will be insertedinto their respective fields in a way similar to filling in a preprintedform.

When creating predefined layouts, you must use special instruc-tions for:• Clearing the working memory and starting the layout recorder.• Saving the layout and clearing the working memory

3. PRINCIPLES OF OPERATION, cont'd.

7. Field-RelatedFormatting Instructions

8. Layout Instructions

Page 11: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

11

UBI Direct Protocol – Programmer's Guide

3. PRINCIPLES OF OPERATION, cont'd.

Continued!

Depending on type of field and type of bar code, printable data totext 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

There are some instructions that control the printing and paper feed,e.g. for:• Activating the optional paper cutter• Speeding up batch printing• Rotating the print mechanism 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).

You can control how the printer will work, e.g.:• Enable/disable UBI Direct Protocol• 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 automatic cut-off operation• Enable/disable Print key• Enable/disable ribbon save operation• Produce audible signals• Format the printer's RAM memory or a memory card• Remap certain incoming characters• Select character set• Restart the printer• Set the LSS emitter• 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. Feeding and PrintingInstructions

9. Printable DataInstructions

11. Setting Up the Printer

Page 12: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

12

UBI Direct Protocol – Programmer's Guide

3. PRINCIPLES OF OPERATION, cont'd.

Provided you have a two-way serial communication betweenprinter and host, you can read the printer's status in regard of anumber of functions in the printer back to the screen of the host, e.g.:• Current date and time• Memory status• Printhead status and characteristics• Value of various system counters• Status of various sensors and straps• Software and hardware version

A number of instructions are used to control the printer's memory,for example to:• Read the number of free bytes in the printer's memory• Read the names of files, fonts or images stored in the printer's

memory• Remove files, fonts and images• Copy files• Download binary files• Download .PCX files and convert them to images

Many commonly used instructions have a shorthand version tominimize the transfer of data. In the explanations of the variousinstruction that follow, both the full name and the shorthand versionwill be shown, separated by a thin vertical line, e.g.:

PRPOS|PP

Upper- and lowercase characters can be used at will.

Parameters for the instruction are shown like this:<parameter> = numeric value"<parameter>" = alphanumeric text (enclosed by double quotation marks)

Compulsory space characters are indicated by ↔.

Square brackets [ ] indicate optional parameters.

Thin vertical bars (|) indicate alternatives.

Always enter parentheses, commas, colons, semicolons, minussigns, quotation marks and period characters exactly as shown.

Negative values are indicated by leading minus signs (-).

In this manual, the various instructions are described in as simpleterms as possible. Complete syntax descriptions and comprehen-sive information on each instruction can be found in the UBIFingerprint Reference Manual.

14. Syntax Descriptions

12. Reading Printer's Status

13. File-HandlingInstructions

Page 13: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

13

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN

1. Introduction Field Types:A label layout is made up of a number of fields. There are fivedifferent types of field:

• Text Field A text field consists of a single line of text.

• Bar Code Field A bar code field consists of a single barcode, with or without a bar code interpre-tation in human readable characters.

• Image Field An image field is a picture, drawing,logotype or other type of illustration in theinternal UBI Fingerprint bitmap format.

• Box Field A box field is a square or rectangularpaper-coloured area surrounded by a blackborder line. If the border is sufficientlythick, the whole area may appear black.

• Line Field A line field is a black line that goes eitheralong or across the paper web. A short butthick line can look like a black box.

There are no restrictions, other than the size of the memory,regarding the number of fields on a single label.

Continued!

UBI

My FIRST label!

Bar Code Field (w. interpretation)

Box Field

Text Field

Line Field

Image Field

Page 14: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

14

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

2. General FormattingInstructions

Continued!

Origo:The positioning of all printable objects on the label, i.e. text fields,bar code fields, images, boxes, and lines, uses a common system.The starting point is called “origo” and is the point on the paper thatcorresponds to the innermost active dot on the printhead at themoment when the printing is started.

The location of the origo is affected by the following factors:

• Position across the paper web (X-axis):The position of the origo is determined by the X-Start value in theSetup Mode.

• Position along the paper web (Y-axis):The position of the origo is determined by the Feed adjustment inthe Setup Mode and any FORMFEED instruction executed beforethe current PRINTFEED instruction or after the precedingPRINTFEED.

Coordinates:Starting from origo, there is a coordinate system where the X-axisruns across the paper web from left to right (as seen when facing theprinter) and the Y-axis runs along the paper web from the printheadand towards the rear end of the paper.

Units of Measure:The unit of measure is always “dots”, i.e. all measures depend onthe density of the printhead. For example, in a printer with an 8 dots/mm printhead, a dot is 1/8 mm = 0.125 mm = 0.00492" or 4.92 mils.This implies that a certain label originally designed for 8 dots/mmwill be printed smaller in an 11.81 dots/mm printer and larger in a6 dots/mm printer.

Generally, a dot has the same size along both the X-axis and the Y-axis. An exception is 11.81 dots/mm printers, where – for technicalreasons – there is a very small difference (see Technical Manual).

Insertion Point:The insertion point of any printable object is specified within thecoordinate system by means of PRPOS (PP). The coordinates mustbe selected so the field fits completely inside the printable area.

PRPOS|PP <x-coordinate>,<y-coordinate><x-coordinate> is the distance in dots along the x-axis from origo to insertion point<y-coordinate> is the distance in dots along the y-axis from origo to insertion pointDefault value: PRPOS 0,0. Reset to default by PRINTFEED (PF)Example:PP 100, 200 ↵

Page 15: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

15

UBI Direct Protocol – Programmer's Guide

Alignment:Once the insertion point is specified, you must also decide whichpart of the object should match the insertion point. For example, atext field forms a rectangle. There are 8 anchor points along theborders and one in the centre, numbered 1–9 and specified by meansof the instruction ALIGN:

ALIGN|AN <anchor point><anchor point> is a number 1–9Default value: 1. Reset to default by PRINTFEED (PF)Example:AN 1 ↵This instruction will place the lower left corner of the text field at the insertionpoint specified by PRPOS. Refer to the illustration below, and to the UBIFingerprint Reference Manual; ALIGN statement, for detailed information onthe anchor points for various types of printable objects.

4. LABEL DESIGN, cont'd.

2. General FormattingInstructions, cont'd.

Continued!

1 2

4

7 8

base- line5

3

6

9

Abcfg

01C39

1 2 3

4

7 8 9

651 2 3

7 8 9

4 65

1, 4 or 7 2, 5 or 8 3, 6 or 9

1, 4 or 7 2, 5 or 8 3, 6 or 9

Page 16: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

16

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

2. General FormattingInstructions, cont'd.

PAPER FEED DIRECTIONDot 0

Dot-line on printhead

X-start X-Coordinate

Origo

Y-Co

ordi

nate

Insertion point = Anchor pointDIR 2

DIR

4

DIR 3 3

6

7 8 9

DIR 1

TEXT FIELD1

4 5

2

Directions:UBI Direct Protocol allows printing in four different directions.You can rotate the printable object clockwise around the anchorpoint/insertion point with a 90° increment (0°, 90°, 180°, or 270°)by means of a DIR instruction:

DIR <direction><directions> is a number 1–4 (DIR 1 = 0°; DIR 2 = 90°; DIR 3 = 180°; DIR 4 = 270°)Default: 1. Reset to default by PRINTFEED (PF)Example:DIR 3 ↵This instruction rotates all printable fields that follow to be printed across thepaper web and upside down in relation to how the paper is fed out from theprinter.

This illustration summarizes the three general formatting instruc-tions PRPOS (PP), ALIGN (AN) and DIR:

Continued!

Page 17: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

17

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

3. Text Field

Continued!

A text field consists of one or several alphanumeric characters onthe same line (max 300 characters). UBI Fingerprint cannot wraptext to a new line, but each line must be specified as a separate textfield.

In addition to the general formatting instructions PRPOS, ALIGN andDIR (see chapter 4.2), a text field can contain the following instruc-tions:

Select FontThe FONT instruction specifies the bitmap font to be printed. Thereis no default font. Therefore, a font must always be specified or anerror condition will occur. Once a font has been specified, it will beused in all text fields until a new FONT instruction is executed.

FONT|FT "<font name>"<font name> is the name of a font enclosed by double quotation marks.Extension (.1 or .2) is optional, see UBI Fingerprint Reference Manual.Default: No default fontAll EasyCoder printers contain the font:"SW030RSN" (Swiss 030 Roman)Standard EasyCoder printers also contain the following fonts:"MS030RMN" (Monospaced 030 Roman)"MS050RMN" (Monospaced 050 Roman)"MS060BMN" (Monospaced 060 Bold)"SW020BSN" (Swiss 020 Bold)"SW050RSN" (Swiss 050 Roman)"SW060BSN" (Swiss 060 Bold)"SW080BSN" (Swiss 080 Bold)"SW120BSN" (Swiss 120 Bold)"OB035RM1" (OCR B 035)

In some EasyCoder printers, outline fonts in Speedo and TrueTypeformat can be scaled and converted to bitmap fonts, see chapter 9.2.

Select MagnificationBitmap fonts can be magnified 1-4 times independently in regardof height and width by means of a MAG instruction. Scalable fontscan be scaled to a suitable size when the bitmap font is generated.

MAG <height mag>,<width mag><height mag> is the magnification factor 1, 2, 3 , or 4 times in regard of height.<width mag> is the magnification factor 1, 2, 3 , or 4 times in regard of width.Default: MAG 1,1. Reset to default by PRINTFEED (PF).

To obtain the best printout appearance, select a larger font ratherthan magnifying a smaller one.

Page 18: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

18

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

3. Text Field, cont'd.

NORIMAGEINVIMAGE

Select Normal/Inverse PrintingNormally, text is printed in black without any background(NORIMAGE). Using INVIMAGE the printing can be inversed so thepaper gives the colour of the characters, whereas the backgroundwill be black. The size of the background is decided by the charactercell. A NORIMAGE statement is only needed when changing backfrom INVIMAGE printing.

NORIMAGE|NI

INVIMAGE|IIDefault: NORIMAGE. Reset to default by PRINTFEED (PF).

Summary:To create a text field, the following formatting instructions must begiven (in most cases default values may substitute missing para-meters). Input data to the field and printing instructions are ex-plained in chapters 4.9 and 5.2 respectively.

Purpose Instruction Default Remarks

X/Y Position PP (PRPOS) 0/0 Number of dotsAlignment AN (ALIGN) 1 Select AN 1 – 9Direction DIR 1 Select DIR 1 – 4Typeface FT (FONT) n.a. e.g. "SW030RSN"Magnification MAG 1,1 Height 1–4, Width 1–4Appearance II (INVIMAGE) off White-on-black print

NI (NORIMAGE ) on Black-on-white printExample:PP 200,500:AN 7:DIR 2:FT "SW030RSN":MAG 2,2:II ↵

Continued!

Page 19: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

19

UBI Direct Protocol – Programmer's Guide

As standard, the UBI Direct Protocol supports approximately 30 ofthe most common bar code symbologies. Other bar codes and dotcodes like Code 16K, PDF417, USD5, MaxiCode, and LEB areavailable as options. Each bar code (optionally including its humanreadable interpretation) makes up a bar code field.

In addition to the general formatting instructions PRPOS, ALIGN andDIR (see chapter 4.2), a bar code field can contain the followinginstructions:

Select Bar Code Type:The type of bar code is specified by a BARTYPE instructioncontaining an abbreviation of the bar code name. The abbreviationmust be entered exactly as listed below.

BARTYPE|BT "<bar code name abbreviation>"<bar code name abbreviation> is the designation of the bar code type according tothe list below and must be enclosed by double quotation marks.Default: "INT2OF5". Reset to default by PRINTFEED (PF)Standard Bar Codes AbbreviationCodabar ...................................................................................... "CODABAR"Code 11 ....................................................................................... "CODE11"Code 39 ....................................................................................... "CODE39"Code 39 full ASCII ....................................................................... "CODE39A"Code 39 w. checksum ................................................................. "CODE39C"Code 93 ....................................................................................... "CODE93"Code 128 ..................................................................................... "CODE128"DUN-14/16 .................................................................................. "DUN"EAN-8 ......................................................................................... "EAN8"EAN-13 ....................................................................................... "EAN13"EAN-128...................................................................................... "EAN128"Five-Character Supplemental Code ........................................... "ADDON5"Industrial 2 of 5 ........................................................................... "C2OF5IND"Industrial 2 of 5 w. checksum ..................................................... "C2OF5INDC"Interleaved 2 of 5 ........................................................................ "INT2OF5"Interleaved 2 of 5 w. checksum .................................................. "INT2OF5C"Interleaved 2 of 5 A ..................................................................... "I2OF5A"Matrix 2 of 5 ................................................................................ "C2OF5MAT"MSI (modified Plessey) ............................................................... "MSI"Plessey ....................................................................................... "PLESSEY"Straight 2 of 5 .............................................................................. "C2OF5"Two-Character Supplemental Code ........................................... "ADDON2"UCC-128 Serial Shipping Container Code ................................... "UCC128"UPC-5 digits Add-On Code .......................................................... "SCCADDON"UPC-A ......................................................................................... "UPCA"UPC-D1 ....................................................................................... "UPCD1"UPC-D2 ....................................................................................... "UPCD2"UPC-D3 ....................................................................................... "UPCD3"UPC-D4 ....................................................................................... "UPCD4"UPC-D5 ....................................................................................... "UPCD5"UPC-E ......................................................................................... "UPCE"UPC Shipping Container Code .................................................... "UPCSCC"

Continued!

4. LABEL DESIGN, cont'd.

4. Bar Code Field

Page 20: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

20

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

4. Bar Code Field, cont'd.

Continued!

Select Bar Code Type, cont'd:Optional Bar Codes AbbreviationCode 16K ....................................................................... "CODE16K"Code 49 .......................................................................... "CODE49"Philips ............................................................................ "PHILIPS"/"DOT CODE A"USD5 (UBI Fingerprint ≥ 5.1) .......................................... "USD5"USD5 (UBI Fingerprint < 5.1) .......................................... "USD5_239"also see chapter 9.1.

Specify Bar Code Height:The height of the bars that make up the bar code can be specified bymeans of the BARHEIGHT instruction.

BARHEIGHT|BH <height><height> is the height of the bars in dots.Default: 100. Reset to default by PRINTFEED (PF).

Specify Bar Code Ratio:The ratio between the wide and the narrow bars can be set using aBARRATIO instruction.

BARRATIO|BR <wide bars>,<narrow bars><wide bars> is a relational factor wide bars vs narrow bars<narrow bars> is a relational factor narrow bars vs wide barsDefault: 3:1. Reset to default by PRINTFEED (PF).

Specify Bar Code Magnification:The magnification of the bar code and the bar code ratio decide theactual thickness of the bars. For example, if BARRATIO is 3:1 andBARMAG is 2, then the wide bars will be 6 dots thick (3x2) and thenarrow bars will be 2 dots (1x2). Magnification also affects inter-pretations that are integrated in the code, e.g. EAN and UPC codes.

BARMAG|BM <magnification><magnification> is the enlargement factor of the bar code pattern.Default: 2. Reset to default by PRINTFEED (PF).

Specify Bar Codes (combined instruction):The BARSET instruction is primarily intended for complex 2-dimensional codes (see chapter 9.1), but can also be used to specifymore simple bar codes by means of a single instruction:

BARSET"<code name>",<ratio wide bars>,<ratio narrow bars>,<magn.>,<height><code name> (=BARTYPE) specifies bar code (default "INT2OF5")<ratio wide bars> (=BARRATIO) specifies ratio wide/narrow bars (default 3)<ratio narrow bars> (=BARRATIO) specifies ratio wide/narrow bars (default 1)<magnification> (=BARMAG) specifies magnification (default 2)<height> (=BARHEIGHT) specifies height of bars in dots (default 100)All parameters reset to default by PRINTFEED (PF)

Note:Complex bar codes, such as PDF 417,LEB and MaxiCode, must be specifiedby means of an extended version of theBARSET instruction, see chapter 9.1.

Page 21: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

21

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

4. Bar Code Field, cont'd.

Continued!

Select Font for Bar Code Interpretation:Most bar codes do not automatically include any bar code interpre-tation in human readable characters. If a bar code interpretationnevertheless is desired, the bitmap fonts to be used for the bar codeinterpretation (human readables) must be specified. In some Easy-Coder printers, outline fonts in Speedo and TrueType format can bescaled and converted to bitmap fonts, see chapter 9.2.

BARFONT|BF[#<start parameter>,]"<fontname1>"[,"<fontname2>"[,<vert. offset>[,<height mag>[,<width mag>]]]][ON]

<start parameter> limits size of syntax by specifying its first parameter ( default 1)<fontname1> specifies a bar code font (default –)<fontname2> specifies another bar code font, e.g. in another direction (default –)<vert. offset> specifies distance between bar code and interpretation (default 6)<height mag> specifies magnification in regard of height (default 1)<width mag> specifies magnification in regard of width (default 1)<ON> enables printing of bar code interpretation (default OFF).All parameters reset to default by PRINTFEED (PF)

Bar code interpretation printing can be enabled or disabled bymeans of these instructions:

BARFONT|BF↔ON

BARFONT|BF↔OFF

By default, bar code interpretation is disabled.

Summary:To create a bar code field, the following formatting instructionsmust be given (in most cases default values may substitute missingparameters). Input data and printing instructions are explained inchapters 4.9 and 5.2 respectively.

Purpose Instruction Default Remarks

X/Y Position PP (PRPOS) 0/0 Number of dotsAlignment AN (ALIGN) 1 Select ALIGN 1 – 9Direction DIR 1 Select DIR 1 – 4Bar Code Select BARSET see above Can be replaced by

BT, BH, BR, BMHuman Readables BF...ON Off Can be omitted

Example:PP 100,100:AN 7:DIR 4:BARSET "CODE39",2,1,3,120:BF #2,"SW030RSN",5,1,1 ON ↵

Page 22: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

22

UBI Direct Protocol – Programmer's Guide

An image field is a field containing some kind of picture orlogotype, which has been converted to the internal bitmap formatof UBI Fingerprint. The image can either be stored in the printer'sEPROM:s, in a memory card or be downloaded as a file in .PCXformat and converted to a special bitmap format by means of anIMAGE LOAD instruction, see chapter 8.4.

In addition to the general formatting instructions PRPOS, ALIGN andDIR, an image field can contain the following instructions:

Select an Image:An image is selected by the full name under which it is stored in theprinter's memory, either as plain text or as a variable (also seechapter 4.9).

PRIMAGE|PM "<image name>"<image name> is the full name of the image incl. extension, enclosed by doublequotation marks.Default: not applicableThe UBI image name convention includes an extension (.1 or .2), where .1 indicatesthat the image is intended for print directions 1 and 3, whereas .2 indicates printdirections 2 and 4. For example, the image "UBI.1" is suited for directions 1 and 3. Alsorefer to UBI Fingerprint Reference Manual.

Select Magnification:Images can be magnified 1-4 times independently in regard ofheight and width by means of a MAG instruction.

MAG <height mag>,<width mag><height mag> is the magnification factor 1, 2, 3 , or 4 times in regard of height.<width mag> is the magnification factor 1, 2, 3 , or 4 times in regard of width.Default: MAG 1,1. Reset to default by PRINTFEED (PF).

To obtain the best printout appearance, select a larger image ratherthan magnifying a smaller one.

Select Normal/Inverse PrintingNormally, an image is printed in black and white, just as it wascreated . Using INVIMAGE, the black and white can be inversed. Thesize of the background is decided by the actual size of the imageincluding “invisible” background. A NORIMAGE statement is onlyneeded when changing back from INVIMAGE printing.

NORIMAGE|NI

INVIMAGE|IIDefault: NORIMAGE. Reset to default by PRINTFEED (PF).

Continued!

4. LABEL DESIGN, cont'd.

5. Image Field

Page 23: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

23

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

5. Image Field, cont'd. Summary:To create an image field, the following formatting instructions mustbe given (in most cases default values may substitute missing para-meters). Image selection by means of variable input, and printinginstructions are explained in chapters 4.9 and 5.2 respectively.

Purpose Instruction Default Remarks

X/Y Position PP (PRPOS) 0/0 Number of dotsAlignment AN (ALIGN) 1 Select ALIGN 1 – 9Direction DIR 1 Select DIR 1 – 4Magnification MAG 1,1 Height 1–4, Width 1–4Appearance II (INVIMAGE) off Black and white parts inversed

NI (NORIMAGE) on Normal (revokes INVIMAGE)Image name PM (PRIMAGE) n.a. Full name incl. extension

Example:PP 200,500:AN 3:DIR 3:MAG 2,2:II:PM "UBI.1" ↵

Continued!

Page 24: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

24

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

6. Box Field A box is a hollow square or rectangle that can be rotated with anincrement of 90° according to the print direction. If the linethickness is sufficiently large, the box will appear to be filled(another method is to print an extremely thick short line).

In addition to the general formatting instructions PRPOS, ALIGN andDIR, a box field is specified by a single instruction.

Specify Size of the Box:The size of the box is specified in regard of height, width and lineweight (thickness).

PRBOX|PX <height>,<width>,<line thickness><height> is the height of the box in dots perpendicular to the selected direction.<width> is the length of the box in dots along the selected direction.<line thickness> is the line weight in dots.No default values.

Summary:To create a box field, the following formatting instructions must begiven (in most cases default values may substitute missing para-meters). Printing instructions are explained in chapter 5.2.

Purpose Instruction Default Remarks

X/Y Position PP (PRPOS) 0/0 Number of dotsAlignment AN (ALIGN) 1 Select ALIGN 1 – 9Direction DIR 1 Select DIR 1 – 4Box size PX (PRBOX) n.a. Height, width and line thickness

in dotsExample:PP 250,250:AN 1:DIR 3:PX 200,200,10 ↵

Continued!

Page 25: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

25

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

7. Line Field A line can be printed in right angles along or across the paperaccording to the print direction.

In addition to the general formatting instructions PRPOS, ALIGN andDIR, a line field is specified by a single instruction.

Specify Size of the Line:The size of the line is specified in regard of length and line weight(thickness).

PRLINE|PL <length>,<line thickness><length> is the length of the line in dots along the selected direction.<line thickness> is the line weight in dots.No default values.

Summary:To create a line field, the following formatting instructions must begiven (in most cases default values may substitute missing para-meters). Printing instructions are explained in chapter 5.2 .

Purpose Instruction Default Remarks

X/Y Position PP (PRPOS) 0/0 Number of dotsAlignment AN (ALIGN) 1 Select ALIGN 1 – 9Direction DIR 1 Select DIR 1 – 4Line size PL (PRLINE) n.a. Length and line thickness in dots

Example:PP 100,100:AN 1:DIR 4:PL 200,10 ↵

Continued!

Page 26: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

26

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

8. Layout Instructions Start Layout Recorder:The LAYOUT INPUT instruction clears the printer's working memory,starts the layout recorder and allows you to assign a name to thelayout.

LAYOUT INPUT "<layout name>"<layout name> can be up to 30 characters enclosed by double quotation marks.Example:LAYOUT INPUT "Shipping Label" ↵

Assign Input Variables to Fields:The layout may consist of both fixed fields and fields for variableinformation. In the layout, you must give each text, bar code orimage field – intended to receive variable data – a reference, so theinput data can be inserted into the correct field. The variableVAR<n>$ should be used to indicate variable input, where <n>specifies the number of the field. The first variable input data blockwill be combined with the field containing VAR1$, the second blockwith VAR2$ etc. Fixed data and variable data can be combined in thesame field. Also refer to chapter 4.9.

VAR<n>$

<n> is the number of the field (1–nnnn...)Examples:PT VAR1$ ↵ (text field with variable input)PT "Price: ";VAR2$ ↵ (text field with fixed and variable input)PB VAR3$ ↵ (bar code field with variable input)PM VAR4$ ↵ (image field with variable input)

Save the Layout:After having completed the layout, save it in the printer's RAMmemory, turn off the layout recorder and clear the printer's workingmemory by means of a LAYOUT END instruction. The layout canthen be copied or killed like any other file, see chapter 8.

LAYOUT END

Example:LAYOUT END ↵

Continued!

Page 27: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

27

UBI Direct Protocol – Programmer's Guide

Continued!

Select a Layout:Before any variable data can be transmitted to a preprogrammedlayout, the layout must be selected by means of a LAYOUT RUNinstruction.

LAYOUT RUN "<layout name>"<layout name> is the name given to the layout in the LAYOUT INPUT instruction andmust be enclosed by double quotation marks.Example:LAYOUT RUN "Shipping Label" ↵

Transmit Variable Data to a Layout:After having selecting a layout using a LAYOUT RUN instruction,you can transmit the variable data to their respective layout fields:• The transmission starts with a start-of-text separator.• Then comes a block of data to the field containing VAR1$.• A field separator separates the blocks of data.• Next block goes to the field containing VAR2$.• A field separator separates the blocks of data and so on.• The last block must also end with a field separator.• The end of transmission is indicated by an End-of text separator.

By default, the following separators should be used:• Start separator: STX (ASCII 02 dec)• Field separator: CR (ASCII 13 dec)• End separator: EOT (ASCII 04 dec)All separators can be changed at will by means of a FORMAT INPUTinstruction, see chapter 6.5.

<STX> <Input data to VAR1$> <CR> <Input data to VAR2$> <CR>.....<EOT>Input data must not be enclosed by double quotation marks.Example:<STX> Abcdefg <CR>123456789 <CR> <EOT>

4. LABEL DESIGN, cont'd.

9. Printable DataInstructions

Page 28: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

28

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

Continued!

Input Data to Text FieldsThe input data to a text field is given by means of a PRTXTinstruction. You can add various types of data to a text field:• Plain text, by typing e.g. "Abcdefgh" or "012345"• Variable input data, using variables e.g.VAR1$• Counter values, e.g. CNT1$• Current date, using DATE$ or DATE$ ("F")• Current time, using TIME$ or TIME$ ("F")• The weekday of the current or specified date, using WEEKDAY$• The number of the current or specified date, using WEEKNUMBER• A future date, using DATEADD$ or DATEADD$ ("F")• A future time, using TIMEADD$ or TIMEADD$ ("F")

You can combine different types of data in a single PRTXT instruc-tion. The different parts are placed adjacently by means of separat-ing semicolons (;). Note that plain text must be enclosed by doublequotation marks.

PRTXT|PT "<input data>"[;"<input data>"...]

Examples:PT "Price: $1.99" ↵PT "Price: ";VAR1$;" per dozen" ↵PT "Box No. ";CNT15$;" Packed: ";DATE$ ("F") ↵PT WEEKDAY$(DATE$);", ";DATE$("F") ↵PT "Week Number ";WEEKNUMBER(DATE$) ↵PT "Expiry date: ";DATEADD$ (30,"F") ↵

Input Data to Bar Code FieldsThe input data to a bar code field is given by means of a PRBARinstruction. You can add the same types of data to a bar code fieldas to a text field, as long as the type of data (e.g. numeric/alpha-numeric) and the number of characters etc. comply with the barcode specification.

You can combine different types of data in a single PRBAR. Thedifferent parts are placed adjacently by means of separating semi-colons (;). Note that alphanumeric input must be enclosed by doublequotation marks, whereas numeric input must not.

PRBAR|PB <input data>[;<input data>...]

Examples:PB 71543;VAR5$ ↵PB "UBI" ↵PB DATE$;TIME$ ↵

9. Printable DataInstructions, cont'd.

Page 29: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

29

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

9. Printable DataInstructions, cont'd.

Input Data to Image FieldsAn image can be selected either by name in plain text (e.g. "UBI.1"),or in the form of a variable (e.g. VAR1$), also see chapter 4.5. Notethat plain text input must be enclosed by double quotation marks.

PRIMAGE|PM <image name>Examples:PM VAR5$ ↵PM "LOGOTYPE.2" ↵

Input Data from Counters:By means of a COUNT& instruction, various counters can becreated, see chapter 6.6. You can read the present value of a counterand use it as input data by including a reference to the counter in thePRTXT or PRBAR instructions in the form of a variable.

CNT<Counter No.>$

<counter No.> is the number is assigned to the counter in the COUNT& instruction.Example:PT "Label number: ";CNT1$ ↵PB CNT2$ ↵

Input Data from the Printer's Clock/Calendar:The printer's clock/calendar can be used to provide input data to textand bar code fields by including any of the following instructionsin the PRTXT or PRBAR instructions:

DATE$

Returns the current date according to the printer's calendar in the standard formatYYMMDD, where YY is the last two digits of the year, MM is the number of the month(01–12) and DD is the number of the day (01–31).Example:PT DATE$ ↵

DATE$ ("F")

Returns the current date according to the printer's calendar in the format specifiedby FORMAT DATE$, see chapter 6.4.Example:PT DATE$("F") ↵

TIME$

Returns the current time according to the printer's clock in the standard date formatHHMMSS, where HH is the hour (00–24), MM is the minute (00–59) and SS is thesecond (00–59).Example:PT TIME$ ↵

Continued!

Chapter 6.3 provides information onhow to set the printer's clock/calendar.The format for printing date and timecan be specified by FORMAT DATE$ andFORMAT TIME$ instructions, see chapter6.4.

Page 30: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

30

UBI Direct Protocol – Programmer's Guide

4. LABEL DESIGN, cont'd.

9. Printable DataInstructions, cont'd.

TIME$ ("F")

Returns the current time according to the printer's clock in the format specified byFORMAT TIME$, see chapter 6.4.Example:PT TIME$("F") ↵

WEEKDAY$ ("<date>")Returns the name of the weekday in plain text according to NAME WEEKDAY$ (seechapter 6.4) from a given date or the current date.<date >can be specified in the standard format "YYMMDD" or by a DATE$ instruction.Examples:PT WEEKDAY$("950601") ↵PT WEEKDAY$(DATE$) ↵

WEEKNUMBER ("<date>")Returns the weeknumber from a given date or the current date.<date> can be specified in the standard format "YYMMDD" or by a DATE$ instruction.Examples:PT WEEKNUMBER("950601") ↵PT WEEKNUMBER(DATE$) ↵

DATEADD$ (["<original date>",]<number of days>[,"F"])Adds or subtracts a certain number of days to the current date or optionally to aspecified date.<original date> is optional and is entered in the standard date format "YYMMDD".Note that the original date must be enclosed by double quotation marks.<number of days> specifies the number of days to be added to or subtracted from thecurrent date or, optionally, the date specified by <original date>. In case of subtraction,the <number of days> should be preceded by a minus sign (-)."<F" > is an optional flag specifying that the result should be returned in the formatspecified by FORMAT DATE$ instead of the standard format YYMMDD.Example:PT DATEADD$("950601",-15,"F") ↵

TIMEADD$ (["<original time>",]<number of sec's>[,"F"])Adds or subtracts a certain number of seconds to the current time or optionally to aspecified moment of time.<original time> is optional and is entered in the standard date format "HHMMSS".Note that the original time must be enclosed by double quotation marks.<number of sec's> specifies the number of seconds to be added to or subtracted fromthe current time or, optionally, the moment of time specified by <original time>. In caseof subtraction, the <number of sec's> should be preceded by a minus sign (-)."<F" > is an optional flag specifying that the result should be returned in the formatspecified by FORMAT TIME$ instead of the standard format HHMMSS.Example:PT TIMEADD$("123026",100,"F") ↵

Page 31: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

31

UBI Direct Protocol – Programmer's Guide

5. FEEDING AND PRINTING INSTRUCTIONS

In order to provide maximum flexibility, there are a number ofinstructions for controlling the paper feed and the optional papercutter:

CLEANFEED <feed length in dots>Runs the printer's paper feed mechanism in order to facilitate cleaning of the printroller.

FORMFEED|FF [<feed length in dots>]Feeds out a blank label or optionally feeds out (+) or pulls back (-) a certain amountof paper without printing.

TESTFEED

Feeds out a blank label while adjusting the label stop/black mark sensor.

CUT

Makes the optional paper cutter perform a cutting cycle.

The paper is feed past the printhead by a rubber-coated roller drivenby a stepper motor. The software can control the stepper motor withan accuracy of one dot in either direction. The movement of thepaper is detected by the label stop sensor (LSS) or black mark sensor(BMS), except when various types of paper strip are used.

The printer's setup in regard of Detection, Media Size; Length andMedia Type is essential for how the paper feed will work. There arefour or five different types of Media Type options (also seeTechnical Manual):• Label (w gaps)• Ticket (w mark) (some printer models only)• Ticket (w gaps)• Fix length strip• Var length strip

When a FORMFEED, TESTFEED or PRINTFEED instruction is ex-ecuted, the photoelectrical label stop sensor (LSS) detects theforward edge of each new label or the forward edge of eachdetection gap, and the black mark sensor (BMS) detects the forwardedge of each black mark, as the paper is moved past the sensor.

By performing a couple of FORMFEED or TESTFEED operationsafter loading a new supply of paper, the software is able to measurethe distance between e.g. the forward edges of two consecutivelabels, thereby determining the label length, and can adjust thepaper feed accordingly. The same principle applies to tickets or tagswith detection gaps, and to tickets with black marks.

Continued!

1. Paper Feed

Page 32: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

32

UBI Direct Protocol – Programmer's Guide

5. PRINTING INSTRUCTIONS, cont'd.

1. Paper Feed, cont'd. In case of paper strip, the LSS will only detect possible out-of-paperconditions and the amount of paper feed is decided in two differentways:

• Fixed length stripThe amount of paper feed for each FORMFEED, TESTFEED andPRINTFEED operation is decided by the Media Size; Length setup.

• Variable length stripAt the execution of a PRINTFEED, the software will add asufficient amount of paper feed after the last printable object toallow the paper to be properly torn off. Note that e.g. a blank spacecharacter or a “white” part of an image is also regarded as aprintable object. The length of TESTFEED and FORMFEEDoperations is decided by the Media Size; Length setup.

The Detection setup allows you to perform two global adjustmentsto the paper feed described above:• Start Adjust• Stop Adjust

By default, both these two parameters are set to 0, which allows forproper tear-off operation when there is no requirement of printingimmediately at the forward edge of the label (equivalent).

• Start Adjust decides how much paper will be fed out or pulledback before the FORMFEED, TESTFEED or PRINTFEED is executed.Usually, there is a small distance between the dispenser shaft ortear off edge and the printhead. Thus, if you e.g. want to startprinting directly at the forward edge of the label, you must pullback the paper before printing by means of a negative start adjustvalue.

• Stop Adjust decides how much more or less paper will be fed outafter the FORMFEED, TESTFEED or PRINTFEED is executed.

If the FORMFEED instruction is issued without any specification ofthe feed length, a complete blank label (or the equivalent) will be fedout. By specifying a positive or negative value in the FORMFEEDinstruction, the global Start Adjust and Stop Adjust setup can besubstituted or supplemented for individual layouts or labels.

It is important whether the FORMFEED instruction is executedbefore or after the PRINTFEED instruction:- FORMFEED before PRINTFEED corresponds to Start Adjust.- FORMFEED after PRINTFEED corresponds to Stop Adjust.

Continued!

Page 33: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

33

UBI Direct Protocol – Programmer's Guide

5. PRINTING INSTRUCTIONS, cont'd.

The relation between paper and printhead at the moment when theactual printing starts decides all positioning along the Y-axis, i.e.along the paper web. Likewise, the relation between the paper andthe cutting edge when the cutter is activated decides where the paperwill be cut off.

Printing Instructions:When a PRINTFEED instruction is issued, the software processes allpreviously entered text fields, bar code fields, image fields, boxfields and line fields into a bitmap pattern. The bitmap patterncontrols the heating of the printhead dots as the paper is fed pastthem. Each PRINTFEED instruction produces one single copy or,optionally, a batch of labels, tickets, tags or pieces of strip.

PRINTFEED|PF [<batch size>]<batch size> specifies the number of copies to be printed.Default: 1

The execution of a PRINTFEED instruction resets the followinginstructions to their respective default values:ALIGN BARFONT BARFONT ON/OFF INVIMAGEBARHEIGHT BARMAG BARRATIO MAGBARTYPE DIR FONT PRPOSBARSET

This does only affect new instructions executed after the PRINTFEEDinstruction, but not already executed instructions, which makesbatch printing possible.

1. Paper Feed, cont'd.

2. Label Printing

Page 34: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

34

UBI Direct Protocol – Programmer's Guide

5. PRINTING INSTRUCTIONS, cont'd.

3. Batch Printing

Continued!

General Information:The term “Batch Printing” means the process of printing severallabels without stopping the paper feed motor between labels. Thelabels may be exact copies or differ more or less in appearance.

For batch printing, the most critical factor is the time required toprocess the print image into a bitmap pattern and store it in the imagebuffer. The image buffer compensates for differences betweenprocessing time and printing time. If the bit pattern is too large asto be stored in its entity in the image buffer, the pattern will bedivided into a number of segments across the paper feed direction,that will be processed one after the other and downloaded to theimage buffer. As the buffer is emptied by printing, a new segmentcan be processed and downloaded.

A large image buffer takes more time to process and fill, which maydelay the start of the printing, whereas a small image buffer may beemptied before a new segment has been processed and down-loaded. The print speed is also important. Obviously, the faster alabel is printed, the faster next segment or label must be processed.

When printing a batch of labels from a predefined layout, the layoutis processed before the printing of each new copy, as to allowcounter, date and time values to be updated. When a layout is notused, all copies will contain exactly the same information.

When using batch printing, consider this:• In case of small differences between labels, make use of CLL and

FIELDNO instructions (see below) and edit the layout so thevariable data are processed last.

• Increase or decrease the size of the image buffer as to obtain asmooth flow of data to the printhead.

Should any problems arise, e.g. the printer stops between labels, theimage buffer is probably too small. Increase the image buffer in theSetup Mode, lower the print speed, or make the print image easierto process. Vertical printing (DIR 2 & 4) is more demanding for textin regard of buffer size and processing time. Thus, if possible,design the label so most of the text is printed horizontally (DIR 1 &3). The print direction does not matter so much for the processingof bar codes, lines, boxes and images. However, ladder style barcodes (DIR 2 & 4) generally lowers the print speed.

By default, you can break the printing of a batch of labels bysimultaneously pressing the <C > and <Pause> keys on theprinter's built-in keyboard (if any). Other methods for issuing abreak instruction can be selected as described in chapter 6.19.

Page 35: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

35

UBI Direct Protocol – Programmer's Guide

Clearing the Image Buffer:The image buffer stores the bitmap pattern of the label betweenprocessing and printing. The size of the image buffer is decided inthe Setup Mode. The image buffer can be cleared partially orcompletely by means of a CLL instruction.

CLL [<field>%]<field> is the same alphanumeric designator as in the corresponding FIELDNOinstruction, followed by a mandatory % sign.CLL clears image buffer completelyCLL <field>% clears image buffer from the corresponding FIELDNO instruction to theend of the label.

Complete clearing is useful to avoid printing a faulty label aftercertain errors have occurred.

Partial clearing is used in connection with print repetition when onlypart of the label should be modified between the copies. In this case,the CLL statement must include a reference to a field, specified bya FIELDNO instruction. When a CLL instruction is issued, the imagebuffer will be cleared from the specified field to the end of the label.

<field>% = FIELDNO

<field> is the same alphanumeric designator as in the corresponding CLL instructionfollowed by a mandatory % sign.

Example:In this example, the text “Month” is kept in the image buffer, whereas the namesof the months are cleared from the image buffer, one after the other, as soon asthey have been printed:

FT "SW030RSN" ↵MAG 2,2 ↵PP 100,300 ↵PT "MONTH:" ↵PP 100,200 ↵A%=FIELDNO ↵PT "JANUARY":PF ↵CLL A% ↵PP 100,200 ↵PT "FEBRUARY":PF ↵CLL A% ↵PP 100,200 ↵PT "MARCH":PF ↵CLL A% ↵

5. PRINTING INSTRUCTIONS, cont'd.

3. Batch Printing, cont'd.

Page 36: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

36

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER

Unless you use UBI Shell to select the UBI Direct Protocol, youmust issue this instruction to switch from the UBI FingerprintImmediate Mode to the UBI Direct Protocol:

INPUT ON

When you start the UBI Direct Protocol, you enable the receptionof data to a layout, start up the error handler and sets the verbosityto off. The message “Direct Protocol 6.0” appears in the printer'sdisplay.

To return from the UBI Direct Protocol to the Immediate Mode, usethis instruction:

INPUT OFF

Reception of data to layouts are disabled, the error-handler is turnedoff and the verbosity is reset to the level selected before last INPUTON instruction was executed. The message “UBI Fingerprint 6.0”appears in the display.

By default, the printer will receive and transmit data on the standardserial communication channel "uart1:", which is present on allprinter models. If you require communication via an optionalinterface board, you can select another communication channel asstandard IN/OUT channel by means of a SETSTDIO instruction. Notethat in case of parallel communication, the two-way communica-tion will be lost and the printer will not be able to echo any data backto the host or returning any other data. It is possible to select differentchannels as standard IN and standard OUT channels.

SETSTDIO <IN channel>, <OUT channel><IN channel> and <OUT channel> can be individually specified as:1 = "uart1:" serial communication channel (default)2 = "uart2" or "rs485" serial communication channel (optional)3 = "uart3:" serial communication channel (optional)4 = "centronics:" parallel communication channel (IN channel only)Example:SETSTDIO 3,3

1. Enabling/DisablingUBI Direct Protocol

Continued!

2. Selecting StandardIN/OUT Channel

Page 37: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

37

UBI Direct Protocol – Programmer's Guide

The printer's CPU board is, as standard, provided with an internalclock/calendar without battery backup, i.e. the setting will be lostwhen the printer is turned off.

The CPU board may be fitted with a real-time clock circuit (RTC),which is a standard feature in some models and optional in others.The RTC is battery backed-up and will keep running even when theprinter is turned off.

If no RTC is installed and you try the read the date or time beforethe internal clock has been set, an error will occur (error 1010“Hardware Error” ). Once either time or date has been set, theinternal clock will work until next power off or reboot. If only timehas been set, by default the current date will be Jan 01 1980 and ifonly date has been set, by default the clock will start running at00:00:00.

The following instructions are used to set the clock/calendar:

DATE$ = "<YYMMDD>"<YYMMDD> is the current date in the standard format, where...YY = Years, last two digits, MM = Month, two digits, DD = Day, two digitsNote that the input data must be enclosed by double quotation marks.Example:DATE$ = "950601" ↵

TIME$ = "<HHMMSS>"<HHMMSS> is the current time in the standard format, where...HH = Hour (00–24), MM = Minute (00–59), SS = Second (00–59)Note that the input data must be enclosed by double quotation marks.Example:TIME$ = "131548" ↵

The formats for printing dates and time in connection withDATE$("F"), DATEADD$("F"), TIME$("F") and TIMEADD$("F"), seechapter 4.9, can be specified by the instructions FORMAT DATE$and FORMAT TIME$. In both these instructions, you should entercharacters representing the various types of information. The orderand number of the characters decides the format. You can alsoinclude separating characters like periods, slashes, colons etc. Notethat the input string must be enclosed by double quotation marks.

FORMAT DATE$ "<string>"Y = Year, M = Month, D = Day (Default: YYMMDD)Examples:FORMAT DATE$ "YYYY.MM.DD" ↵ yields e.g. 1995.06.01FORMAT DATE$ "DD/MM/YY" ↵ yields e.g. 01/06/95

6. SETTING UP THE PRINTER, cont'd.

3. Setting Time and Date

Continued!

4. Selecting Format forDate and Time

Page 38: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

38

UBI Direct Protocol – Programmer's Guide

Continued!

6. SETTING UP THE PRINTER, cont'd.

FORMAT TIME$ "<string>"H = Hour in 24-hour cycle (one digit per H; right-justified)h = Hour in 12-hour cycle (one digit per h; right-justified)M = Minute (one digit per M; right-justified)S = Second (one digit per S; right-justified)P = AM/PM (uppercase) in 12-hour cycle (one character per P; left-justified)p = am/pm (lowercase) in 12-hour cycle (one character per p; left-justified)(Default: HHMMSS)Examples:FORMAT TIME$ "HH:MM:SS" ↵ yields e.g. 14:15:37FORMAT TIME$ "HH.MM" ↵ yields e.g. 14.15FORMAT TIME$ "hh.MM.SS p" ↵ yields e.g. 2.15.37 pFORMAT TIME$ "hh.MM PP" ↵ yields e.g. 2.15 PM

In many cases, it is desired to have the names of months andweekdays printed in plain text rather than as a number. There aretwo instructions that allows you to assign names in any language tomonths and weekdays:

NAME DATE$<No. of month>,"<name of month>"<No. of month> is 1–12.<name of month> is the desired name enclosed with double quotation marks.The name of the month will be printed according to the format specified by FORMATDATE$ and will be truncated at the left side.

NAME WEEKDAY$<No. of weekday>,"<name of weekday>"<No. of weekday> is 1 (Monday) – 7 (Sunday).<name of weekday> is the desired name enclosed by double quotation marks.Default: Full English names in lowercase characters, e.g. Monday.

Note that the date and time formats as well as the names of monthsand weekdays are not saved in the printer's battery backed-upmemory, but must be transmitted to the printer after each power-up.

When transmitting variable input data to a predefined layout, thestring must contain certain separating characters. By default, youshould use <STX> as start-of-text separator, <CR> as field separatorand <EOT> as end-of-text separator(see chapter 4.9).

However, the FORMAT INPUT instructions allows you to selectother characters as separators if the default separators for somereason cannot be produced or will interfere with the overheadcomputer system. Simply insert the desired separator characters(enclosed by double quotation marks) into the FORMAT INPUTinstruction. Avoid using characters like XON/XOFF or ENQ/ACK,which may interfere with the communication between printer andhost.

4. Selecting Format forDate and Time, cont'd.

5. Changing Separators

Page 39: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

39

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

You must first leave the UBI Direct Protocol by means of an INPUTOFF instruction, change the separators using a FORMAT INPUTinstruction and then enter the UBI Direct Protocol again by meansof an INPUT ON instruction1.

FORMAT INPUT "<start separator>","<end separator>","<field separator>"

Example:INPUT OFF ↵FORMAT INPUT "#","&","@" ↵INPUT ON ↵

Note that the separators are not saved in the printer's batterybacked-up memory, but must be transmitted to the printer after eachpower-up.

You can create a number of counters for use in text and bar codefields, see chapter 4.9. The counters are global, i.e. the same countercan be used in many different labels and layouts, but will beincremented/decremented at any PRINTFEED operation, regardlessof label. Thus, if you want to use a counter for a specific layout only,you must make sure not to use it any other layout too.

Each counter is designated by means of a number. Alpha counterscount A–Z , numeric counters have no practical limit. The type ofcounter is decided by the type of start, stop or reset value.

There is a number of instructions for creating a counter andspecifying its characteristics. Note that input data must be enclosedby double quotation marks.

Start Value:COUNT& "START", <counter number>,"<start value>"

< start value> is the first value to be printed (positive or negative). Negative values areindicated by a leading minus sign (-).Default: 1 or A

Number of Digits:COUNT& "WIDTH", <counter number>,"<number of digits>"

<number of digits> adds leading zero characters up to the specified number of digits.Must only be used in numeric counters.Default: 1

Number of Copies Before Update:COUNT& "COPY", <counter number>,"<number of copies>"

<number of copies> sets the quantity of copies to be printed before the counter isincremented or decremented.Default: 1

Continued!

5. Changing Separators,cont'd.

1/. If you transmit a FORMAT INPUTinstruction containing separators identicalto one, two, or all three of the separatorsalready stored in the printer's memory, anerror will occur unless you first leave theUBI Direct Protocol.

6. Creating Counters

Page 40: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

40

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

Incrementation/Decrementation:COUNT& "INC", <counter number>,"<incr. value>|<decr. value> "

<incr. value>|<decr. value> sets by which value the counter should be incrementedor decremented. Decrementation is indicated by a leading minus sign (-).Default: 1.

Stop Value:COUNT& "STOP", <counter number>,"<stop value>"

<stop value> sets after which value the counter should start all over again at therestart value.Default: 2,147,483,647 or Z.

Restart Value:COUNT& "RESTART", <counter number>,"<restart value>"

<restart value> sets at which counter value the counter should start all over againafter having exceeded the stop value.Default: 1 or A.

Note that counters are not saved in the printer's battery backed-upmemory, but must be transmitted to the printer after each power-up.

Most printers are, or can be , fitted with a so called label-taken sensor(LTS) that detects if there is a label left in the printer's outfeed slotand holds the printing until the label has been removed. This facilityis especially useful for batch printing.

You can enable or disable this function by means of the followinginstruction. By default, LTS is disabled.

LTS& ON|OFF

Most printers can, as an option, be fitted with a paper cutter that cancut non-adhesive paper strip or the backing paper between labels.

As an alternative to issuing separate CUT instructions, you canenable or disable automatic cutting in connection with eachPRINTFEED operation by means of the following instruction. Bydefault, automatic cutting is disabled.

The amount of paper to be fed out before automatic cutting and bepulled back afterwards can optionally be specified:

CUT <feed length> ON|OFF

<feed length> is the desired length in dots.

6. Creating Counters,cont'd.

Continued!

8. Enabling/DisablingAutomatic Cutting

7. Enabling/DisablingLabel-Taken Sensor

Page 41: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

41

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

All printers have at least one key on its front panel, usually labelled“Print”, which can be used to initiate a PRINTFEED operation.

You can enable or disable this function by means of the followinginstruction. By default, the Print key is disabled.

PRINT KEY ON|OFF

Some thermal transfer printers are fitted with an optional ribbonsave device that lifts the printhead and stops the transfer ribbonwhile longer parts of paper without any printing is fed out, therebyreducing the ribbon consumption.

You can enable or disable this function by means of the followinginstruction. By default, ribbon save operation is automaticallyenabled if the printer is fitted with a ribbon save device.

RIBBON SAVE ON|OFF

The printers can emit audible signal from their built-in buzzers.There are two instructions you can use for that purpose, e.g. to givewarning signals to the operator:

BEEP

Emits a short beeping sound

SOUND <frequency in Hz>,<duration in units of 0.02 sec:s>Produces a sound of variable frequency and duration.

By formatting the printer's memory, you will erase all files storedin the RAM memory. You can also format a RAM-type memorycard inserted in the printer's memory card adapter to MS-DOSformat. Be careful not to use this instruction unintentionally!

FORMAT "<device>"[,<no. of entries>[,<no. of bytes>]]<Device> is either "ram:" or "card1:"<No. of entries> is only used in case of "card1:" and specifies number of entries in theroot directory (default 208).<No. of bytes> is only used in case of "card1:" and specifies number of bytes per sector(default 512 bps).

Continued!

9. Enabling/DisablingPrint Key

10. Enabling/DisablingRibbon Save

11. Producing AudibleSignals

12. Formatting Printer'sMemory

Page 42: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

42

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

All input data to the printer come in binary form via the standard INchannel (by default "uart1:"). Characters are transmitted in ASCIIformat, which upon reception will be preprocessed by the printer'ssoftware according to possible MAP instructions.

The MAP instruction is used to modify a character set, or to filter outundesired characters on a specified communication channel bymapping them as Null (ASCII 0 dec).

If no character set meets your requirements completely (see NASCbelow), select the set that comes closest and modify it using MAPinstructions. Mapping will be reset to normal at power-up or reboot.

MAP [<device>],<original ASCII value>, <desired ASCII value><device> is either 1 = Serial channel "uart1:" or 4 = Parallel channel "centronics:"<original ASCII value> is the value of the character according to the selectedcharacter set, see NASC below.<desired ASCII value> is the new ASCII value you want to assign to the character.Example: You want to use the Roman 8 character set and 7- bit communication. However,you need to print £ characters which are not included in the 7-bit part of theRoman 8 character set (see chapter 9). On the other hand, you have no need forthe $ character. Then remap the £ character (ASCII 187 dec.) to the value of the$ character (ASCII 36 dec.):MAP 36,187 ↵

The NASC instruction is used to select a character set that decideshow the various characters will be printed. This instruction makesit possible to adapt the printer to various national standards. Bydefault, characters will be printed according to the Roman 8character set (see chapter 10).

NASC <character set number><character set number> is one of the following numbers (also see UBI FingerprintReference Manual):1: Roman 8 44: English 81: Japanese Latin33: French 46: Swedish 351: Portuguese34: Spanish 47: Norwegian -1: PCMAP39: Italian 49: German -2: ANSI

Suppose you order the printer to print the character ASCII 124 dec.ASCII 124 will generate the character “|” according to the Roman8 character set, “ù” according to the French character set and ñaccording to the Spanish set etc. The same applies to a number ofspecial national characters, whereas digits 0–9 and characters A–Z,a–z plus most punctuation marks are the same in all sets.

Check the character set tables in the UBI Fingerprint ReferenceManual and select the set that best matches your data equipment andprintout requirements.

Continued!

13. PreprocessingInput Data

14. Selecting Character Set

Page 43: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

43

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

Continued!

14. Selecting Character Set,cont'd.

If none of the sets matches your requirements exactly, select the onethat comes closest. Then, you can make final corrections by meansof MAP instructions, see chapter 6.13.

Text on labels will be printed according to the selected character set.However, instructions concerning the printable label image, thatalready has been processed before the NASC instruction is executed,will not be affected. This implies that labels may be multilingual.

The pattern of the bars reflects the ASCII values of the input dataand is not affected by a NASC instruction. The bar code interpreta-tion (i.e. the human readable characters below the bar pattern) isaffected by a NASC instruction. However, the interpretation of barcodes, that have been processed and are stored in the print buffer,will not be affected.

As an alternative to turning off and on the printer by means of themain switch, you can issue a REBOOT instruction. Any data orlayout in the working memory that has not been saved will bedeleted and the buffers will be emptied.

REBOOT

Note that counters, time and date formats, separators and errormessages will be lost and a number of instructions will be reset todefault.

The verbosity level controls the amount of information to bereturned from print to host:

SYSVAR (18) = <value><value> = -1 All levels enabled (default in Immediate and Programming Modes)<value> = 0 No verbosity (default in UBI Direct Protocol)<value> = 1 Echo received characters<value> = 2 “Ok” after correct command lines<value> = 4 Echo input characters from communication port<value> = 8 Error after failed lineBits can be combined, so e.g. SYSVAR(18)=3 means both “Echo received characters”and “Ok after correct command lines”.

Four types of error messages can be selected:

SYSVAR (19) = <value><value> = 1 <string> in line <line no.>, e.g. “Invalid font in line 10” (default)<value> = 2 Error <number> in line <line no.>:<string>,

e.g. Error 19 in line 10: Invalid font”<value> = 3 E<number>, e.g." E19”<value> = 4 Error <number> in line <line number>, e.g.“Error 19 in line 10”

15. Rebooting Printer

16. Setting Verbosity Level

17. Selecting Type of ErrorMessage

Page 44: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

44

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

Continued!

18. Error Handling When an INPUT ON instruction is executed, the error-handler of theUBI Direct Protocol starts. By default, it handles five error condi-tions (see below). All other errors are ignored unless specified byan ERROR instruction.

The general response to an error is to set the standard IN channelbusy, then turn off the “Ready” LED, and turn on the “Error” LED.The message specified for the error by the ERROR instruction isdisplayed. In case of the five error conditions listed above, astandard message in English will be displayed if no other messageis specified by an ERROR instruction.

In most cases, the operator should acknowledge the error bypressing the Print key on the printer.

The ERROR instruction activates error-handling for the specifiederror type and allows you to write an error message, which will bothbe displayed in the printer's display window, and transmitted backto the printer (according to selected verbosity and type of errormessage, see chapter 6.16 and 6.17):

ERROR <error number>, "<error message>"<error number> is the error number (see chapter 10)<error message> is a text string enclosed by double quotation marks.

Max. 33 characters with line wrap:Character 1-16 specifies text in the upper line in the display.Character 17 is not displayed.Character 18-33 specifies the text in the lower line.

Example:ERROR 43,"MEMORY

- - - - - - - - - - -OVERFLOW" ↵

Five error conditions are always handled without having to beactivated by an ERROR instruction:

Out of paper:A message is shown in the display and a beep is emitted. The printerwaits for the printhead to be lifted and lowered, then a formfeed isperformed. If this formfeed produces an error, the process starts allover again.

No field to print:A formfeed is performed. If the formfeed produces an error, theerror-handling starts all over again.

Head lifted:A message is shown in the display and a beep is emitted. The printerwaits for the printhead to be lowered, then a formfeed is performed.If the error stopped a print operation, the operation will be restartedautomatically.

Page 45: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

45

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

18. Error-Handling, cont'd.

Continued!

Out of transfer ribbon:A message is shown in the display. The printer waits for a ribbon tobe loaded. If the error stopped a print operation, the operation mustbe restarted.

Next label not found:A message is shown in the display. The printer perform formfeedsas long as the error remains detected. After five formfeeds, theprinter stops and waits for the operator to press the <Print > key.

Note that error handling and error messages specified by ERRORinstructions are not saved in the printer's battery backed-up memory,but must be transmitted to the printer after each power-up.

When printing large batches of labels, it is useful to be able to breakthe printing, should e.g. an error be detected. You can break theprinting either via any serial communication channel or from theprinter's built-in keyboard (if any). By default, a break instructionis produced by simultaneously pressing the <Pause> and <C> keyson the printer's keyboard.

Two instructions allow you to create other ways of issuing a breakinstruction. BREAK specifies an individual break interrupt characterfor each serial communication channel and for the keyboard,whereas BREAK ON/OFF enables/disables break interrupt and de-letes the break character for the corresponding devices.

Note that the break interrupt characters are not saved in theprinter's battery backed-up memory, but must be transmitted to theprinter after each power-up.

BREAK <device>,<break char.><device> = 0 Printer's keyboard<device> = 1 "uart1:" serial communication channel<device> = 2 "uart2:"/"rs485" serial communication channel<device> = 3 "uart3:" serial communication channel<break char.> is the ASCII decimal value of the desired break character.Default: Communication channels: ASCII 03 dec.

Keyboard: ASCII 158 decimal (<Pause> + <C>)

BREAK <device>ON|OFF

<device> corresponds to the same parameter in the BREAK instruction.Default: Communication channels disabled

Keyboard enabled.

19. Setting Break for BatchPrinting

By default, the function keys on the printer'skeyboard produce the following ASCIIvalues (Enhanched models only):F1 1 F1 + C 129F2 2 F2 + C 130F3 3 F3 + C 131F4 4 F4 + C 132F5 5 F5 + C 133Enter 13 Enter + C 141Feed 28 Feed + C 156Setup 29 Setup + C 157Pause 30 Pause + C 158

Page 46: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

46

UBI Direct Protocol – Programmer's Guide

6. SETTING UP THE PRINTER, cont'd.

The basis for how the printer works is the setup in the Setup Mode.There are several ways to change the setup:• Manually by means of the printer's built-in keyboard, see Technical

Manual for the printer model in question.• Remotely by means of UBI Shell's Terminal Setup, see UBI Shell

manuals• Remotely by means of setup files, see UBI Fingerprint Reference

Manual• Remotely by means of setup strings, see below.

The various setup parameters are described in the TechnicalManuals.

Setup strings allow you to change individual setup parametersdirectly from the host:

SETUP "<setup string>"<setup string> is a string of data according to a special syntax listed below andenclosed by double quotation marks.In the syntax description below, bold characters separated by vertical bars indicatealternatives, n–nnnnn indicate variable numeric input and underscored spacecharacters indicate compulsory space characters:

20. Changing the Printer'sSetup

SETUP "CONTRAST,5"SETUP "SER-COM,UART1|UART2|UART3,BAUDRATE,300|600|1200|2400|4800|9600|19200|38400"SETUP "SER-COM,UART1|UART2|UART3,PARITY,NONE|EVEN|ODD|MARK|SPACE"SETUP "SER-COM,UART1|UART2|UART3,CHAR_LENGTH,7|8"SETUP "SER-COM,UART1|UART2|UART3,STOPBITS,1|2"SETUP "SER-COM,UART1|UART2|UART3,FLOWCONTROL,RTS/CTS,ENABLE|DISABLE"SETUP "SER-COM,UART1|UART2|UART3,FLOWCONTROL,ENQ/ACK,ENABLE|DISABLE"SETUP "SER-COM,UART1|UART2|UART3,FLOWCONTROL,XON/XOFF,DATA_TO_HOST,ENABLE|DISABLE"SETUP "SER-COM,UART1|UART2|UART3,FLOWCONTROL,XON/XOFF,DATA_FROM_HOST,ENABLE|DISABLE"SETUP "SER-COM,UART2,FLOWCONTROL,PROT_ADDR,ENABLE|DISABLE"SETUP "SER-COM,UART1|UART2|UART3,NEW_LINE,CR/LF|LF|CR"SETUP "DETECTION,LSS_ADJUST,n|nnn"SETUP "DETECTION,FEEDADJ,STARTADJ,nnnn"SETUP "DETECTION,FEEDADJ,STOPADJ,nnnn"SETUP "SERVICE,MEDIA_SIZE,XSTART,nnn"SETUP "SERVICE,MEDIA_SIZE,WIDTH,nnnn"SETUP "SERVICE,MEDIA_SIZE,LENGTH,nnnn"SETUP "SERVICE,MEDIA_TYPE,LABEL_(w_GAPS)|TICKET_(w_MARK)|TICKET_(w_GAPS)|FIX_LENGTH_STRIP|VAR_LENGTH_STRIP "SETUP "SERVICE,PRINT_DEFS,HEAD_RESIST,nnn"SETUP "SERVICE,PRINT_DEFS,PAPER_TYPE,(name of paper or transfer ribbon)"SETUP "SERVICE,PRINT_DEFS,NEW_SUPPLIES,nnnnnnnnnnnnn"SETUP "SERVICE,PERFORMANCE,NORMAL|HIGH|ULTRA HIGH"SETUP "SERVICE,MEMORY_ALLOC,IMAGE_BUFF_SIZE,nnnn"SETUP "SERVICE,MEMORY_ALLOC,REC_BUF_UART1|UART2|UART3,nnnnn"SETUP "SERVICE,MEMORY_ALLOC,TRANS_BUF_UART1|UART2|UART3,nnnnn"

Page 47: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

47

UBI Direct Protocol – Programmer's Guide

7. READING PRINTER'S STATUS

1. Introduction Provided there is a working two-way serial communication be-tween the printer and the host computer, the printer's status in regardof various functions can be read back to the host. This implies thatthe serial channel "uart1:" must be selected standard IN/OUTchannel (default, see SETSTDIO instruction in chapter 6.2).

The PRINT instruction reads the printer's status as specified by acomplementary instruction and returns the result on the std OUTchannel to the host, where it usually will be printed on the screen.The shorthand version of PRINT is a question mark (?).

PRINT|?

The current date and time according to the printer's clock/calendarcan be read as follows:

? DATE$ or ? DATE$("F")

? TIME$ or ? TIME$("F")

Various parts of the printer's memory can be tested by reading theresult of a FUNCTEST$ instruction:

? FUNCTEST$ ("<RAM>|<ROMn>|<CARD>")<RAM> tests the RAM memory and returns either “RAM OK” or “Fail,n” where n isthe hex address of the first faulty byte.<ROMn> tests the ROM package specified by n and returns either a 4-digit hexchecksum or “NO ROM”.<CARD> checks an inserted memory card and performs either a RAM or a ROM testdepending on type of card. If no card is inserted, “NO CARD” is returned.

The thermal printhead can be tested in three ways:

? FUNCTEST$ ("HEAD")The printhead is tested for number of dots and possible faults. There are 3 possibleresponses:“HEAD OK, SIZE:nnn DOTS” (nnn is the number of dots)“HEAD LIFTED” (lower the printhead and try again)“FAULTY PRINTHEAD” (an error is detected)

Continued!

2. Returning Informationto Host

4. Testing Printer'sMemory

5. Testing the Printhead

3. Reading Date and Time

Page 48: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

48

UBI Direct Protocol – Programmer's Guide

7. READING PRINTER'S STATUS, cont'd.

5. Testing the Printhead,cont'd.

Continued!

? HEAD(<type of check>)

<type of check> ≥ 0: returns the resistance of the specified dot in ohms<type of check> = -1: checks printhead. Returns -1 of OK, else 0<type of check> = -7: returns mean resistance of printhead in ohmsRefer to UBI Fingerprint Reference Manual for full explanations

? SYSVAR (<parameter>)

<parameter> = 21 returns printhead density in dots per mm<parameter> = 22 returns the number of dots in the printhead

There are a number of counters in the printer's system, that can beread and returned to the host:

? SYSVAR (<parameter>)

<parameter> = 12 returns the value of the ribbon counter(requires a ribbon low sensor)

<parameter> = 13 returns the value of the paper counter(requires a paper low sensor)

<parameter> = 14 returns number of errors detected since last startup<parameter> = 15 returns number of errors detected since last SYSVAR (15)<parameter> = 24 returns power-up status since last SYSVAR(24):

(0 = No; 1=Yes)

NOTE!SYSVAR (24) is important for the operation of the UBI Direct Protocol, sinceessential functions, like counters, date and time formats, separators anderror messages will be lost at power up and other functions will be reset totheir default values. Save all such data in the host and retransmit them to theprinter as soon as a power-up has been detected by a polling program takingadvantage of SYSVAR(24).

There are a number of sensors, hardware strap and setup parametersin the printer that can be read and their status or value be returnedto the host:

? SYSVAR (<parameter>)

<parameter> = 18 returns selected verbosity level (see chapter 6.16)<parameter> = 19 returns selected type of error message (see chapter 6.17)<parameter> = 20 returns printer's paper type setup

(0= Direct thermal printing; 1= Thermal transfer printing)<parameter> = 23 returns status of the ribbon end sensor

(0=No ribbon; 1=Ribbon)

6. Reading SystemCounters

7. Reading Sensors andStraps

Page 49: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

49

UBI Direct Protocol – Programmer's Guide

7. READING PRINTER'S STATUS, cont'd.

The printer's status in regard of various errors and other conditionscan be read and returned to the host using the PRSTAT instruction:

? (PRSTAT AND <parameter>)

<parameter> = 0 Ok<parameter> = 1 printhead lifted<parameter> = 2 label not removed<parameter> = 4 printer out of paper<parameter> = 8 printer out of transfer ribbon<parameter> = 16 printer voltage too high<parameter> = 32 printer is feedingParameters can be combined, e.g. <3> checks for both “printhead lifted” and “labelnot removed” conditions. The printer will return 1 (= yes) or 0 (= no).

The version of the UBI Direct Protocol, the type of printer familyand the type of CPU board can be read using a VERSION$ instruc-tion:

? VERSION$[(type of info)]<type of info> = 0 returns the version of the UBI Direct Protocol (default).<type of info> = 1 returns the type of printer family:

101 = EasyCoder 101201 = EasyCoder 201 II401 = EasyCoder 401501 = EasyCoder 501601 = EasyCoder 601

<type of info> = 2 returns the type of CPU board:#1 = CPU board 971,700,27 and 776,707,27#2 = CPU board 971,700,28#3 = CPU board 040,700,28#4 = CPU board 040,700,29

9. Reading Software andHardware Versions

8. Reading Printer's Status

Page 50: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

50

UBI Direct Protocol – Programmer's Guide

8. FILE-HANDLING

1. Reading the Printer'sMemory

There are a number of instructions for reading the content in theprinter's memory and returning the information to the host. Thisrequires a working two-way serial communication, i.e. the sameserial communication channel must be selected standard IN/OUTchannel (default, see SETSTDIO in chapter 6.2):

? FRE (1)

Returns the number of free bytes in the printer's RAM memory.

FONTS

Returns the names of all bitmap fonts in the printer's entire memory plus informationon used and free size of the RAM memory. Font files will not be included.

IMAGES

Returns the names of all images in the printer's entire memory plus information onused and free size of the RAM memory. Images files will not be included.

FILES ["<rom:>|<card1:>"]Returns the names of all files in the printer's RAM memory or optionally in the ROMmemory ("rom:") or in an inserted DOS-formatted memory card ("card1:"). Informationon the size of each file and the total number of used and free bytes in the RAM memorywill also be returned.

You can remove fonts and images from the printer's RAM memory,but not from the ROM memory:

REMOVE↔IMAGE|FONT "<name>"The name of the image or font must correspond exactly to the name returned whenusing the IMAGES or FONTS instruction and be enclosed by double quotation marks.

Files, including font files and images files, can be removed from theRAM memory or from an inserted DOS-formatted memory card:

KILL "<filename>|card1:<filename>"The name of the file must correspond exactly to the name return when using a FILESinstruction and be enclosed by double quotation marks. By default, files will beremoved from the RAM memory. If the file name is preceded by "card1:", the file willbe removed from the inserted memory card.

2. Removing Fonts,Images and Files

Continued!

Page 51: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

51

UBI Direct Protocol – Programmer's Guide

You can copy a file from anywhere in the printer's memory to theRAM memory (ram:) or to a DOS-formatted memory card (card1:).You cannot copy to the ROM memory (rom:). You can also use theCOPY instruction to give the copy a new name.

COPY "[rom:|card1:]<original file name>"[,"[card1:]<new file name>"]The size of the name is max. 30 characters. If no reference to "rom:" or "card1:" is given,"ram:" is assumed.Example:COPY "card1:Logotype.1","LOGO.1"

Binary files, e.g. font files in Speedo or TrueType format, can bedownloaded to the printer's RAM memory using a single instruc-tion. Before the transfer can be performed, the communicationsetup must be changed to 8 characters, CTS/RTS handshake.

FILE& LOAD"<file name>",<file size><file name> is the name you want to assign to the file in the printer's memory.<file size> is the size in bytes of the original file in the host.

Upon receiving this instruction, the printer waits for the specifiednumber of bytes to be received with a 25 sec. timeout betweencharacters.

Image files in .PCX format can be downloaded to the printer's RAMmemory and converted to the internal bitmap format of UBIFingerprint using a single instruction. After convention, they aretreated as images (as opposed to image files). Before the transfer canbe performed, the communication setup must be changed to 8characters, CTS/RTS handshake.

IMAGE LOAD"<image name>",<file size>,"<flag>"<file name> is the name you want to assign to the image in the printer's memory.<file size> is the size in bytes of the original .PCX file in the host.<flag> is either "S" or an empty string " ":S specifies that the image will be saved in the battery backed-up part of the RAMmemory; an empty string species that the image will be saved in the no-save area ofthe RAM memory and thus will be deleted at next power-up.

Upon receiving this instruction, the printer waits for the specifiednumber of bytes to be received with a 25 sec. timeout betweencharacters.

We recommend that you follow the UBI Fingerprint convention byincluding the extension .1 or .2 in the image name, so you can betterkeep tabs on which directions the image is suited for:.1 is used for directions across the paper web, i.e. DIR 1 & 3..2 is used for directions along the paper web, i.e. DIR 2 & 4.

8. FILE-HANDLING

3. Copying Files

4. DownloadingBinary Files

5. DownloadingImage Files

Page 52: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

52

UBI Direct Protocol – Programmer's Guide

9. ADVANCED FEATURES

1. Specify ComplexBar Codes

Complex 2-dimensional bar or dot codes, e.g. PDF417, requiremany specifying parameters. Therefore, there is a complex instruc-tion that allows all bar code parameters to be specified within asingle instruction. This instruction can also be used for one-dimensional bar codes, see chapter 4.4.

BARSET[#<start parameter>,]["<bar code name>"[,<ratio wide bars>[,<ratio narrow bars>[,<magnification>[,<height>[,<security level>[,<aspect ratio height>[,<aspect ratio width>[,<no. of rows>[,<no. of columns>[,<truncate flag>]]]]]]]]]]]

<start parameter> limits size of syntax by specifying first parameter (default 1)<bar code name> (=BARTYPE) specifies bar code (default "INT2OF5")<ratio wide bars> (=BARRATIO) specifies ratio wide/narrow bars (default 3)<ratio narrow bars> (=BARRATIO) specifies ratio wide/narrow bars (default 1)<magnification> (=BARMAG) specifies magnification (default 2)<height> (=BARHEIGHT) specifies height of bars in dots (default 100)<security level> is only used in some complex codes (default 2)<aspect height ratio> is only used in some complex codes (default 1)<aspect height width> is only used in some complex codes (default 2)<no. of rows> is only used in some complex codes (default 0)<no. of columns> is only used in some complex codes (default 0)<truncate flag> is only used in some complex codes (default 0)

Optional Complex Bar Codes AbbreviationLEB ............................................................................................. "LEB"MaxiCode ................................................................................... "MAXICODE"PDF 417 ....................................................................................... "PDF417"

Continued!

Page 53: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

53

UBI Direct Protocol – Programmer's Guide

9. ADVANCED FEATURES, cont'd.

2. Font Scaling Some printer models can be fitted with a “Scalable Fonts Kit” thatallows outline font files stored in the printer to be converted tobitmap format. The easiest way to scale a font is to use the UBI Shellfont scaling extension, which however requires a printer fitted witha keyboard (see UBI Shell Enhanced manual). If the printer does nothave a built-in keyboard, you will need to use the FONT instruction,which not only allows you to control the conversion but also at thesame time select the generated bitmap font for printing. For fullexplanation of the various parameters, please refer to the UBIFingerprint Reference Manual.

There are two types of syntax depending on whether you want todefine the range of characters to be converted by an interval ofASCII values or as a string of characters.

FONT|FT "<bitmap font>"[,"<outline font>"[,<height>[,<first ASCII value>[,<last ASCIIvalue>[,<dir>[,"<flag(s)>"[,<slant >[,<rotation>[,"<map filename>"]]]]]]]]]

FONT|FT "<bitmap font>"[,"<outline font>"[,<height>[,"<string of char.>"[,<dir>[,"<flag(s)>"[,"<slant>[,<rotation>[,"<map file>"]]]]]]]]

<bitmap font> is the desired name of the bitmap font to be created<outline font > is the name of the original outline font file to be converted<height> is the distance (baseline to top of ascenders) of the bitmap font (default 40)<first ASCII value> is the start of a range of characters to be converted (default 32)<last ASCII value> is the end of a range of characters to be converted (default 126)<string of char.> specifies the characters to be converted (default ASCII 32–126)<dir> is the print direction [1=Horizontal; 2=Vertical] (default 1)<flag(s)> is A, S, P and/or B: A = Add characters to existing bitmap font

S = Save in printer's RAM memoryP = Height specified in points (else dots)B = Height is size of uppercase A characterDefault: No flag

<slant > is the slanting (c.w.) of the bitmap font in degrees (default 0)<rotation > is the rotation (c.w.) of the individual char:s in degrees (default 0)<map file> is the name of a custom-made character map table

Page 54: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

54

UBI Direct Protocol – Programmer's Guide

• Characters between ASCII 0 decimal and ASCII 31 decimal are unprintable control characters.• Characters between ASCII 32 decimal and ASCII 127 decimal can always be printed, regardless of 7-bit or 8-

bit communication protocol, provided that the selected font contains the characters in question• Characters above ASCII 127 decimal can only be printed if the selected font contains the characters in question

and an 8-bit communication protocol is used. If you use 7-bit communication, select another national characterset (see NASC statement) or use a MAP statement to remap a character set.

• If a character, which does not exist in the selected font, is used, an error condition will occur.

10. ROMAN 8 – ASCII decimal Character Set NASC: 1

DC3DC2DC1DLESISOCRFFVTLFGSFSESCSUBEMCANETBSYNNAKDC4

'&%$#"!spaceUSRS10/.-,+*)(;:98765432EDCBA@?>=<ONMLKJIHGFYXWVUTSRQPcba`_^]\[Zmlkjihgfedwvutsrqpon ~}|{zyx `´

´ ´ÏÎËÊÈÂÀ

°yY—£ÛÙ~¨^§¥£¤¿¡ñÑçÇúóéáûôê⢃ÎÅüöëäùòèàÜÖìÄæøíåÆØÍãÃÁÔßïÉÿŸÚõÕÒÓÌa1/21/4–3/4¶µ•

±» «o

987654321000102030405060708090100110120130140150160170180190200210220230240250

HTBSBELACKENQEOTETXSTXSOHNUL

D oS s

ASCII

Page 55: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

55

UBI Direct Protocol – Programmer's Guide

11. ERROR MESSAGES

1. Interpretation Table

Continued!

0 No error1 Syntax error.2 Unbalanced parenthesis.3 Feature not implemented.4 Evaluation syntax error.5 Unrecognized token.6 Tokenized line too long.7 Evaluation stack overflow.8 Error in exectab.9 Undefined token.

10 Non-executing token.11 Evaluation stack underflow.12 Type mismatch.13 Line not found.14 Division with zero.15 Font not found.16 Bar code device not found.17 Bar code type not implemented.18 Disk full.19 Error in file name.20 Input line too long.21 Error stack overflow.22 RESUME without error.23 Image not found.24 Overflow in temporary string buffer.25 Wrong number of parameters.26 Parameter too large.27 Parameter too small.28 RETURN without GOSUB29 Error in startup file.30 Assign to a read-only variable.31 Illegal file number.32 File is already open.33 Too many files open.34 File is not open.37 Cutter device not found.38 User break.39 Illegal line number.40 Run statement in program.41 Parameter out of range.

42 Illegal bar code ratio.43 Memory overflow.44 File is write protected.45 Unknown store option.46 Store already in progress.47 Unknown store protocol.48 No store defined.49 NEXT without FOR50 Bad store record header.51 Bad store address.52 Bad store record.53 Bad store checksum.54 Bad store record end.55 Remove in ROM.56 Illegal communication channel.57 Subscript out of range.58 Field overflow.59 Bad record number.60 Too many strings.61 Error in setup file.62 File is list protected.63 ENTER function.64 FOR without NEXT65 Evaluation overflow.66 Bad optimizing type.67 Error from communication channel.68 Unknown execution entity.69 Not allowed in immediate mode.70 Line label not found.71 Line label already defined.72 IF without ENDIF.73 ENDIF without IF.74 ELSE without ENDIF.75 ELSE without IF.76 WHILE without WEND.77 WEND without WHILE78 Not allowed in execution mode.79 Not allowed in a layout.80 Download timeout

Code Message/Explanation Code Message/Explanation

Page 56: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

56

UBI Direct Protocol – Programmer's Guide

11. ERROR MESSAGES, cont'd.

1. Interpretation Table, cont'd.

Code Message/Explanation Code Message/Explanation

1001 Not implemented.1002 Memory too small.1003 Field out of label.1004 Wrong font to chosen direction.1005 Out of paper.1006 No field to print.1007 Lss too high.1008 Lss too low.1009 Invalid parameter.1010 Hardware error.1011 I/O error.1012 Too many files opened.1013 Device not found.1014 File not found.1015 File is read-only.1016 Illegal argument.1017 Result too large.1018 Bad file descriptor.1019 Invalid font.1020 Invalid image.1021 Too large argument for MAG.1022 Head lifted.1023 Incomplete label.1024 File too large.1025 File does not exist.1026 Label pending.1027 Out of transfer ribbon.1028 Paper type is not selected.1029 Printhead voltage too high.1030 Character is missing in chosen font.1031 Next label not found.1032 File name too long.1033 Too many files are open.1034 Not a directory.1035 File pointer is not inside the file.1036 Subscript out of range.1037 No acknowledge received within specified timeout.1038 Communication checksum error.1039 Not mounted.1040 Unknown file operating system.1041 Error in fos structure.1042 Internal error in mcs.1043 Timer table full.1044 Low battery in memory card.

1045 Media was removed.1046 Memory checksum error.1047 Interrupted system call.1051 Dot resistance measure out of limits.1052 Error in printhead.1053 Unable to complete a dot measurement.1054 Error when trying to write to device.1055 Error when trying to read from device.1056 O_BIT open error.1057 File exists.1058 Transfer ribbon fitted.1059 Cutter does not respond.1060 DC motor to ribbon save did not start/stop.1061 Wrong type of media.1101 Illegal character in bar code.1102 Illegal bar code font.1103 Too many characters in bar code.1104 Bar code too large.1105 Bar code parameter error.1106 Wrong number of characters.1107 Illegal bar code size.1108 Number or rows out of range.1109 Number of columns out of range.1201 Insufficient font data loaded.1202 Transformation matrix out of range.1203 Font format error.1204 Specifications not compatible with output module.1205 Intelligent transform not supported.1206 Unsupported output mode requested.1207 Extended font not supported.1208 Font specifications not set.1209 Track kerning data not available.1210 Pair kerning data not available.1211 Other Speedo error.1212 No bitmap or outline device.1213 Speedo error six.1214 Squeeze or clip not supported.1215 Character data not available.1301 Index outside collection bounds.1302 Collection could not be expanded.1303 Ptr ptr is not a collection.1304 Item not a member of the collection.1305 No compare function, or compare returns faulty value.1306 Tried to insert a duplicate item.

Page 57: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

57

UBI Direct Protocol – Programmer's Guide

12. REFERENCE LISTS

1. Instructions in Alphabetical Order

Instruction See Chapter Purpose

ALIGN (AN) 4.2 Specifying which part (anchor point) of a text, bar code field, image field, line orbox will be positioned at the insertion point.

BARFONT (BF) 4.4 Specifying fonts for the printing of bar code interpretation.BARFONT (BF) ON/OFF 4.4 Enabling/disabling the printing of bar code interpretation.BARHEIGHT (BH) 4.4 Specifying the height of a bar code.BARMAG (BM) 4.4 Specifying the magnification in regard of width of the bars in a bar code.BARRATIO (BR) 4.4 Specifying the ratio between the wide and the narrow bars in a bar code.BARSET 4.4, 9.1 Specifying a bar code and setting additional parameters to complex bar codes.BARTYPE (BT) 4.4 Specifying the type of bar code.BEEP 6.11 Ordering the printer to emit a beep.BREAK 6.19 Specifying a break interrupt character separately for the keyboard and each serial

communication channel.BREAK ON/OFF 6.19 Enabling/disabling break interrupt separately for the keyboard and each serial

communication channel.CLEANFEED 5.1 Running the printer's feed mechanism.CLL 5.3 Partial or complete clearing of the print image buffer.COPY 8.3 Copying files.COUNT& 6.6 Creating a counter.CUT 5.1 Activating an optional paper cutting device.CUT ON/OFF 6.8 Enabling/disabling automatic cutting after PRINTFEED execution and optionally

adjusting the paper feed before and after the cutting.DATE$ 4.9, 6.3, 7.2 Setting or returning the current date.DATEADD$ 4.9 Returning a new date after a number of days have been added to, or subtracted

from, the current date or optionally a specified date.DIR 4.2 Specifying the print direction.ERROR 6.18 Defining error messages and enabling the error handler for specified error

conditions.FIELDNO 5.3 Getting the current field number for partial clearing of the print buffer by a CLL

instruction.FILE& LOAD 8.4 Reception and storing of binary files in the printer's RAM memoryFILES 8.1 Listing the files stored in one of the printer's directories to the standard OUT

channel.FONT (FT) 4.3, 9.2 Selecting a font for the printing of the subsequent PRTXT instructions, and

optionally generating a bitmap font from a scalable outline font in Speedo orTrueType format.

FONTS 8.1 Returning the names of all bitmap fonts stored in the printer's memory to thestandard OUT channel.

FORMAT 6.12 Formatting the printer's RAM memory, or formatting a RAM-type memory cardto MS-DOS format.

FORMAT DATE$ 6.4 Specifying the format of the string returned by DATE$("F") andDATEADD$(...,"F") instructions.

FORMAT INPUT 6.5 Specifying separators for the LAYOUT RUN instruction.FORMAT TIME$ 6.4 Specifying the format of the string returned by TIME$("F") and

TIMEADD$(...,"F") instructions.FORMFEED 5.1 Activating the paper feed mechanism in order to feed out or pull back a certain

length of the paper web.FRE 8.1 Returning the number of free bytes in the printer's RAM memory.FUNCTEST$ 7.4, 7.5 Performing various hardware tests.HEAD 7.5 Returning the result of a thermal printhead check.IMAGE LOAD 8.5 Reception and conversion of image files in .PCX format to images in a special

bitmap format.

Continued!

Page 58: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

58

UBI Direct Protocol – Programmer's Guide

12. REFERENCE LISTS, cont'd.

Instruction See Chapter Purpose

IMAGES 8.1 Returning the names of all images stored in the printer's memory to the standardOUT channel.

INPUT ON/OFF 6.1 Enabling/disabling the UBI Direct Protocol.INVIMAGE (II) 4.3, 4.5 Inversing the printing of text and images from “black-on-white” to “white-on-

black.KILL 8.2 Deleting a file from the printer's RAM memory or from a DOS-formatted

memory card inserted in an optional memory card adapter.LAYOUT END 4.8 Stopping the recording of a layout description and saving the layout.LAYOUT INPUT 4.8 Starting the recording of a layout description.LAYOUT RUN 4.9 Providing variable input data to a predefined layout.LTS& ON/OFF 6.7 Enabling or disabling the label taken sensor.MAG 4.3, 4.5 Magnifying a font, barfont or image up to four times separately in regard of height

and width.MAP 6.13 Changing the ASCII value of a character when received on the standard IN

channel, or optionally on another specified communication channel.NAME DATE$ 6.4 Formatting the month parameter in return strings of DATE$("F") and

DATEADD$(...,"F").NAME WEEKDAY$ 6.4 Formatting the day parameter in return strings of WEEKDAY$.NASC 6.14 Selecting a character set.NORIMAGE (NI) 4.3, 4.5 Returning to normal printing after an INVIMAGE statement has been issued.PRBAR (PB) 4.9 Providing input data to a bar code.PRBOX (PX) 4.6 Creating a box.PRIMAGE (PM) 4.5, 4.9 Selecting an image stored in the printer's memory.PRINT (?) 7.2 Printing of data to the standard OUT channel.PRINT KEY ON/OFF 6.9 Enabling/disabling printing of a label by pressing the Print key.PRINTFEED (PF) 5.2 Printing and feeding out one or a specified number of labels, tickets, tags or

portions of strip, according to the printer's setup.PRLINE (PL) 4.7 Creating a line.PRPOS (PP) 4.2 Specifying the insertion point for a line of text, a bar code, an image, a box or a

line.PRSTAT 7.8 Returning the printer's current status or, optionally, the current position of the

insertion point.PRTXT (PT) 4.9 Providing the input data for a text field, i.e. a line of text.REBOOT 6.15 Restarting the printer.REMOVE IMAGE/FONT 8.2 Removing a specified image or bitmap font from the printer's memory.RIBBON SAVE ON/OFF 6.10 Enabling/disabling the optional Ribbon Save mechanism.SETSTDIO 6.2 Selecting standard IN and OUT communication channel.SETUP 6.20 Entering the printer's Setup Mode, changing the setup by means of a setup file

or setup string, or creating a setup file containing the printer's current setup values.SOUND 6.11 Making the printer's beeper produce a sound specified in regard of frequency and

duration.SYSVAR 6.16, 6.17, 7.5, 7.6, 7.7 Reading or setting various system variables.TESTFEED 5.1 Performing a formfeed to allow the label stop sensor to adjust itself according to

the presently loaded paper web.TIME$ 4.9, 6.3, 7.2 Setting or returning the current time.TIMEADD$ 4.9 Returning a new time after a number of seconds have been added to, or subtracted

from, the current time or optionally a specified time.VERSION$ 7.9 Returning the version of the software, printer family, or type of CPU boardWEEKDAY$ 4.9 Returning the name of the weekday from a specified date.WEEKNUMBER 4.9 Returning the number of the week for a specified date.

1. Instructions in Alphabetical Order, cont'd.

Page 59: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

59

UBI Direct Protocol – Programmer's Guide

12. REFERENCE LISTS, cont'd.

Continued!

ALIGN|AN <anchor point>BARFONT|BF[#<start parameter>,]"<fontname1>"[,"<fontname2>"[,<vert. offset>[,<height mag>[,<width mag>]]]][ON]BARFONT|BF´ONBARFONT|BF´OFFBARHEIGHT|BH <height>BARMAG|BM <magnification>BARRATIO|BR <wide bars>,<narrow bars>BARSET"<code name>",<ratio wide bars>,<ratio narrow bars>,<magn.>,<height>BARSET[#<start parameter>,]["<bar code name>"[,<ratio wide bars>[,<ratio narrow bars>[,<magnification>[,<height>

[,<security level>[,<aspect ratio height>[,<aspect ratio width>[,<no. of rows>[,<no. of columns>[,<truncate flag>]]]]]]]]]]]BARTYPE|BT "<bar code name abbreviation>"BEEPBREAK <device>,<break char.>BREAK <device>ON|OFFCLEANFEED <feed length in dots>CLL [<field>%]COPY "[rom:|card1:]<original file name>"[,"[card1:]<new file name>"]COUNT& "START", <counter number>,"<start value>"COUNT& "WIDTH", <counter number>,"<number of digits>"COUNT& "COPY", <counter number>,"<number of copies>"COUNT& "INC", <counter number>,"<incr. value>|<decr. value> "COUNT& "STOP", <counter number>,"<stop value>"COUNT& "RESTART", <counter number>,"<restart value>"CUTCUT <feed length> ON|OFFDATE$ = "<YYMMDD>"DATE$[("F")]DATEADD$ (["<original date>",]<number of days>[,"F"])DIR <direction>ERROR <error number>, "<error message>"<field>% = FIELDNOFILE& LOAD"<file name>",<file size>FILES ["<rom:>|<card1:>"]FONT|FT "<font name>"FONT|FT "<bitmap font>"[,"<outline font>"[,<height>[,<first ASCII >[,<last ASCII >[,<dir>[,"<flag(s)>"[,<slant >[,<rotation>[,"<map file>"]]]]]]]]]FONT|FT "<bitmap font>"[,"<outline font>"[,<height>[,"<string of char.>"[,<dir>[,"<flag(s)>"[,"<slant>[,<rotation>[,"<map file>"]]]]]]]]FONTSFORMAT "<device>"[,<no. of entries>[,<no. of bytes>]]FORMAT DATE$ "<string>"FORMAT INPUT "<start separator>","<end separator>","<field separator>"FORMAT TIME$ "<string>"FORMFEED|FF [<feed length in dots>]FRE (1)FUNCTEST$ ("<RAM>|<ROMn>|<CARD|HEAD>")HEAD(<type of check>)

2. Instruction Syntax List

Page 60: UBI Direct Protocol – Programmer's Guide 1. …apps.intermec.com/downloads/eps_man/96039500.pdf ·  · 2003-08-08UBI Direct Protocol – Programmer's Guide 1. ... variable input

60

UBI Direct Protocol – Programmer's Guide

12. REFERENCE LISTS, cont'd.

IMAGE LOAD"<image name>",<file size>,"<flag>"IMAGESINPUT ON|OFFINVIMAGE|IIKILL "<filename>|card1:<filename>"LAYOUT ENDLAYOUT INPUT "<layout name>"LAYOUT RUN "<layout name>"LTS& ON|OFFMAG <height mag>,<width mag>MAP [<device>],<original ASCII value>, <desired ASCII value>NAME DATE$<No. of month>,"<name of month>"NAME WEEKDAY$<No. of weekday>,"<name of weekday>"NASC <character set number>NORIMAGE|NIPRBAR|PB <input data>[;<input data>...]PRBOX|PX <height>,<width>,<line thickness>PRIMAGE|PM "<image name>"PRINT|?PRINT KEY ON|OFFPRINTFEED|PF [<batch size>]PRLINE|PL <length>,<line thickness>PRPOS|PP <x-coordinate>,<y-coordinate>(PRSTAT AND <parameter>)PRTXT|PT "<input data>"[;"<input data>"...]REBOOTREMOVE

´IMAGE|FONT "<name>"

RIBBON SAVE ON|OFFSETSTDIO <IN channel>, <OUT channel>SETUP "<setup string>"SOUND <frequency in Hz>,<duration in units of 0.02 sec:s>SYSVAR (<parameter>)TESTFEEDTIME$ = "<HHMMSS>"TIME$ [("F")]TIMEADD$ (["<original time>",]<number of sec's>[,"F"])VERSION$[(type of info)]WEEKDAY$ ("<date>")WEEKNUMBER ("<date>")

2. Instruction Syntax List, cont'd.