background image

1

UBI EasyCoder 301 Direct Protocol – Programmer's Guide Ed. 1

Contents

Contents

Contents

UBI EasyCoder 301
Direct Protocol
Programmer's Guide
Edition 1, July 1997
Part No. 1-960419-00

1. Introduction

1. Introduction .......................................................................... 4

2. Getting Started

1. Computer Connection .......................................................... 5
2. Check Paper Supply ............................................................. 6
3. Turn on the Printer ............................................................... 6
4. Serial Communications Test ................................................. 6

3. Principles of Operation

1. UBI Direct Protocol Special Features ................................... 8
2. Sending Commands ............................................................. 8
3. Fields ................................................................................. 10
4. General Formatting Commands .......................................... 10
5. Field-Related Formatting Commands ................................. 10
6. Layout Commands ............................................................. 11
7. Printable Data Commands .................................................. 11
8. Feeding and Printing Commands ........................................ 12
9. Setting Up the Printer ......................................................... 12
10. Reading Printer's Status ...................................................... 12
11. File-Handling Commands .................................................. 13
12. Syntax Descriptions ........................................................... 13
13. File Storage Devices and File Names ................................. 14

4. Label Design

1. Introduction ........................................................................ 15
2. General Formatting Commands .......................................... 16
3. Text Field ........................................................................... 19
4. Bar Code Field ................................................................... 23
5. Image Field ........................................................................ 28
6. Box Field ........................................................................... 30
7. Line Field ........................................................................... 31
8. Layout Commands ............................................................. 32
9. Printable Data Commands .................................................. 33

5. Feeding and Printing

1. Paper Feed ......................................................................... 39

    Commands

2. Label Printing ..................................................................... 41
3. Batch Printing .................................................................... 42

Summary of Contents for EasyCoder 301

Page 1: ...s 8 3 Fields 10 4 General Formatting Commands 10 5 Field Related Formatting Commands 10 6 Layout Commands 11 7 Printable Data Commands 11 8 Feeding and Printing Commands 12 9 Setting Up the Printer 12...

Page 2: ...13 Verbosity Level 53 14 Error Message Types 53 15 Error Handling 53 16 Break in Batch Printing 55 17 Printer Setup 55 7 Reading the Printer s 1 Introduction 58 Status 2 Date and Time 58 3 Memory 58...

Page 3: ...puter Corp Microsoft MS and MS DOS are registered trademarks of Microsoft Corporation Speedo is a trademark of Bitstream Inc TrueType are registered trademarks of Apple Computer Inc Unicode is a trade...

Page 4: ...a simple string of data To send input data and formatting commands as a continuous string of data directly from the host computer In both cases UBI Direct Protocol provides a flexible error handler wh...

Page 5: ...serial port A Centronics parallel port can also be used but it will provide one way communication only no data or messages can be returned to the screen of the host Connect the printer and host as de...

Page 6: ...ycommunication theprintershould respond by immediately returning the version of the installed UBI Direct Protocol software to the screen of the host e g D6 1 Ok This indicates that the communication i...

Page 7: ...abel ticket tag or piece of strip with the text printed in the lower left corner of the printable area You can try using other characters between the quotation marks in thethirdline especiallytypicaln...

Page 8: ...r for returning information from the printer back to the host and for managing files fonts and images Examples PRINT KEY ON enable Feed key DATE read printer s calendar KILL LAYOUT1 delete a layout or...

Page 9: ...for text field BF Swiss 721 BT 10 0 select font for text field PT My FIRST label input data to text field PF print one label Layout Mode First create a layout LAYOUT INPUT LABEL1 start layout recorde...

Page 10: ...a hollow square or rectangle A line Any type of field should be specified with regard to Position Alignment Direction Refer to chapter 4 2 for more information Depending on the type of field addition...

Page 11: ...u can either specify the fields both with regard to formatting parameters and input data in the same string or you can create a layout to which you can send variable data later The layout should conta...

Page 12: ...data strings to predefined layouts Create label counters Enable disable the optional label taken sensor Enable disable Feed key Format the printer s RAM memory or a memory card Remap certain incoming...

Page 13: ...explanations of the various com mand that follow both the full name and the shorthand version will be shown separated by a thin vertical line e g PRPOS PP Upper and lower case characters can be used a...

Page 14: ...on these devices e g the following commands would cause errors FILE LOAD ROM NEWFILE 123 COPY RAM OLDFILE CARD1 NEWFILE if CARD1 contains a font cartridge KILL CARD2 OLDFILE if CARD2 contains a font c...

Page 15: ...image field is a picture drawing logo or other type of illustration in bitmap format Box Field A box field is a square or rectangular paper coloured area surrounded by a black border line If the borde...

Page 16: ...after the preceding PRINTFEED Coordinates Starting from the origin the X axis runs across the paper web from left to right as seen when facing the printer and the Y axis runs along the paper web from...

Page 17: ...re 8 anchor points along the borders and one in the centre numbered 1 9 as shown in this illus tration Thedesiredanchorpointisspecifiedbymeansofthe ALIGN command ALIGN AN anchor point anchor point is...

Page 18: ...80 or 270 by means of a DIR command DIR direction direction is a number from 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 DIR rotates all following...

Page 19: ...mmands Font typeface Font Size in points Font Slant in degrees Magnification Normal Image Inverse Image Select a Font The FONT command specifies the file name of the scalable font to use and the heigh...

Page 20: ...721 Bold Condensed BT Zapf Dingbats BT use NASC ZAPF NSC Zurich Extra Condensed BT For examples of the above fonts see chapter 11 2 Previous EasyCoder printers contained bitmapped fonts i e fonts sca...

Page 21: ...the aspect ratio of printed characters For example to specify Swiss 721 Roman at 12 points with double width use FONT Swiss 721 BT 12 0 MAG 1 2 To specify Swiss 721 Roman at 12 points with a height w...

Page 22: ...6 11 and 9 2 Purpose Command Default Remarks X Y Position PRPOS PP 0 0 Number of dots Alignment ALIGN AN 1 Select AN 1 9 Direction DIR 1 Select DIR 1 4 Font FONT FT Swiss 721 BT 12 0 Font Size FONTSI...

Page 23: ...of bar code is specified by a BARTYPE command con taining an abbreviation of the bar code name The abbreviation must be entered exactly as listed below BARTYPE BT bar code name abbreviation bar code n...

Page 24: ...ode SCCADDON UPC B UPCB 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 See also chapter 9 1 Set Bar Code Height The height of...

Page 25: ...cation magnification the enlargement factor of the bar code pat tern Default 2 Reset to default by PRINTFEED PF Bar Codes combined command The BARSET command is primarily intended for complex 2 di men...

Page 26: ...distancebetweenbar codeandinterpretation in dots default 6 dots height mag the magnification with regard to height default 1 width mag the magnification with regard to width default 1 ON enables the...

Page 27: ...ult values may substitute missing pa rameters Input data and printing commands are explained in chap ters 4 9 and 5 2 respectively Purpose Command Default Remarks X Y Position PRPOS PP 0 0 Number of d...

Page 28: ...emory either as plain text or as a variable also see chap ter 4 9 PRIMAGE PM image name image name the full name and storage location of the im age including extension enclosed by double quotation mar...

Page 29: ...TFEED PF Summary To create an image field the following formatting commands must be given in most cases default values may substitute missing para meters Image selection by means of variable input and...

Page 30: ...egard to height width and line weight thickness PRBOX PX height width line thickness height the height of the box in dots perpendicular to the selected direction width the length of the box in dots al...

Page 31: ...eight thickness PRLINE PL length line thickness length the length of the line in dots along the se lected direction line thickness the line weight in dots Default No Summary To create a line field the...

Page 32: ...ct field The variable VAR n is used to indicate variable input where n specifies the number of the field The first variable input data block will be entered into the field containing VAR1 the second b...

Page 33: ...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...

Page 34: ...parts are separated by semicolons Note that plain text must be enclosed by double quotation marks PRTXT PT input data input data Examples PT Price 1 99 PT Price VAR1 per dozen PT Box No CNT15 Packed D...

Page 35: ...ounter and use it as input data by including a reference to the counter in the PRTXT or PRBAR commands in the form of a variable CNT Counter No Counter No the number assigned to the counter in the COU...

Page 36: ...ecified by FORMAT DATE see chapter 6 4 Example PT DATE F TIME Returnsthecurrenttimeaccordingtotheprinter sclockinthestand ard date format HHMMSS where HH is the hour 00 24 MM is the minute 00 59 and S...

Page 37: ...r of days to the current date or optionally to a specified date original date optional it is entered in the standard date format YYMMDD Note that the original date must be enclosed by double quotation...

Page 38: ...n the standard date format HHMMSS Note that the original time must be enclosed by double quotation marks number of secs the number of seconds to be added to or sub tracted from the current time or opt...

Page 39: ...oated roller driven by a stepper motor The software can control the stepper motor with an accuracy of one dot in either direction The movement of the paper is detected by the label stop sensor LSS or...

Page 40: ...space character or white partofanimageisalsoregardedasaprintableobject The amountofpaperfedbyFORMFEEDisdecidedbytheMediaSize Length setup The Detection setup allows you to perform two global adjustmen...

Page 41: ...e along the paper web Printing Commands When a PRINTFEED command is issued the software processes all previously entered text fields bar code fields image fields box fields and line fields into a bit...

Page 42: ...ed layout the layout is processed before each new copy is printed in order to allow coun ter date and time values to be updated When a layout is not used all copies will contain exactly the same infor...

Page 43: ...l after certain errors have occurred Partial clearing is used in batch printing when only part of the label should be modified between the copies In this case the CLL state ment must include a referen...

Page 44: ...mmand was received and disables the use of layouts and vari able data The printer will receive and transmit data on the standard serial communication channel uart1 If you use parallel communica tion t...

Page 45: ...rror1010 Hard ware Error Once either time or date has been set the internal clock will work until next power off or reboot If only time has been set by default the current date will be Jan 01 1980 and...

Page 46: ...MMDD Examples FORMAT DATE YYYY MM DD gives e g 1997 06 01 FORMAT DATE DD MM YY gives e g 01 06 95 FORMAT TIME string H Hourin24 hourcycle onedigitperH right justified h Hour in 12 hour cycle one digit...

Page 47: ...of weekday No of weekday 1 Monday 7 Sunday name of weekday the desired name enclosed by double quota tion marks Default Full English names e g Monday When transmitting variable input data to a predef...

Page 48: ...lue There are various commands for creating a counter and specifying its characteristics Start Value Number of Digits Number of Copies Before Update Incrementation Decrementation Stop Value Restart Va...

Page 49: ...ue at which the counter should start all over again after having exceeded the STOP value Default 1 or A All printers are fitted with a label taken sensor LTS which detects if there is a label left in...

Page 50: ...MAP commands The MAP command is used to modify a character set or to filter out undesired characters on a specified communication channel by mapping them as Null ASCII 0 dec If no character set meets...

Page 51: ...rs 1 Roman 8 default 33 French 34 Spanish 39 Italian 44 English 46 Swedish 47 Norwegian 49 German 81 Japanese Latin romaj 240 Microsoft Hebrew not documented 241 Microsoft Arabic not documented 351 Po...

Page 52: ...u require the MAP command can be used to asign that character to a different ASCII value see chapter 6 10 The NASC setting is not reset by PRINTFEED PF nor by turning the printer off Once a NASC comma...

Page 53: ...umber string e g Error 19 Invalid font value 3 E number e g E19 value 4 Error number e g Error 19 By default the UBI Direct Protocol error handler handles four error conditions Out of paper Head lifte...

Page 54: ...the printhead to be lifted and lowered then the error is cancelled Head lifted The Power LED turns Red The printer sends a message back to the host computer The printer waits for the printhead to be...

Page 55: ...ronics parallel communication chan nel IN channel only break char is the ASCII decimal value of the desired break character default on both channels ASCII 03 dec BREAK device ON OFF device the same pa...

Page 56: ...NABLE DISABLE SETUP SER COM UART1 FLOWCONTROL ENQ ACK ENABLE DISABLE SETUP SER COM UART1 FLOWCONTROL XON XOFF DATA_TO_HOST ENABLE DISABLE SETUP SER COM UART1 FLOWCONTROL XON XOFF DATA_FROM_HOST ENABLE...

Page 57: ...RITE filename filename the full name of the setup file including stor age area enclosed by double quotation marks You can then select the stored setup file using the SETUP com mand SETUP filename file...

Page 58: ...host where it will usually be printed on the screen A complementary command specifies the type of information to be returned The shorthand version ofPRINT is a question mark PRINT The current date and...

Page 59: ...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 be read and returned to the host SY...

Page 60: ...f the ribbon end sensor 0 No ribbon 1 Ribbon The printer s status with regard to various errors and other condi tions can be read and returned to the host using the PRSTAT com mand PRSTAT AND paramete...

Page 61: ...he printer s memory It also returns information on the total memory used FILES RAM ROM CARD1 CARD2 Returns the names of all the files in the printer s RAM memory by default if no storage device is spe...

Page 62: ...ommand to give the copy a new name COPY CARD1 CARD2 original name CARD1 CARD2 new name The filename can be up to 30 characters Since files will be copied to the RAM memory by default it is not necessa...

Page 63: ...the image will be saved in the volatile memory and will be deleted at next power up Upon receiving this command the printer waits for the specified number of bytes to be received with a 25 second tim...

Page 64: ...of columns truncate flag start parameter specifies first parameter in the command default 1 bar code name specifies bar code default INT2OF5 ratio wide bars specifies ratio wide narrow bars default 3...

Page 65: ...e characters in the current character set as specified by the NASC command If a text field contains a character which is not in the current font then a replacement characterwillusuallybeprintedinstead...

Page 66: ...f a user defined NASC table see later in this chapter NASCD table file the file name of a NASCD table Default NASCD empty string disables double byte interpretation of ASCII strings Double byte fonts...

Page 67: ...sed in the human readable parts of barcodes The corresponding commands are BARFONTD BFD font file name font size font slant font file name the file name of the double byte font to be use font size the...

Page 68: ...ult NASC 1 the built in Roman 8 NASC table is used Such a file can be created using some text editors or by a user written piece of software It can be sent to the printer using the FILE LOAD command s...

Page 69: ...string of characters string of char an ASCII string specifying all the characters that are to be scaled from the current single anddouble bytefonts Itisinterpretedaccord ingtothecurrentNASCandNASCDset...

Page 70: ...which takes about 30 seconds Flash amber Continuous amber Flash amber Continuous amber Green 5 Switch off the printer 6 Remove the card 7 Insert the next card if necessary and repeat steps 4 6 8 Switc...

Page 71: ...l provided that the selected font contains the char acters in question Characters between ASCII 127 decimal and ASCII 255 deci mal can only be printed if the selected font contains the charac ters in...

Page 72: ...72 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Roman 8 NASC 1...

Page 73: ...73 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d French NASC 33...

Page 74: ...74 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Spanish NASC 34...

Page 75: ...75 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Italian NASC 39...

Page 76: ...76 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d English UK NASC 44...

Page 77: ...77 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Swedish NASC 46...

Page 78: ...78 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Norwegian NASC 47...

Page 79: ...79 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d German NASC 49...

Page 80: ...80 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Japanese Latin NASC 81...

Page 81: ...81 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Portuguese NASC 351...

Page 82: ...82 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d MS DOS Latin 1 NASC 850...

Page 83: ...83 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d MS DOS Greek 1 NASC 851...

Page 84: ...84 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d MS DOS Latin 2 NASC 852...

Page 85: ...85 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d MS DOS Cyrillic NASC 855...

Page 86: ...86 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d MS DOS Turkish NASC 857...

Page 87: ...87 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Latin 2 NASC 1250...

Page 88: ...88 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Cyrillic NASC 1251...

Page 89: ...89 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Latin 1 NASC 1252...

Page 90: ...90 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Greek NASC 1253...

Page 91: ...91 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Latin 5 NASC 1254...

Page 92: ...92 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d Windows Baltic Rim NASC 1257...

Page 93: ...93 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d PCMAP NASC 1...

Page 94: ...94 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes 1 Character Sets cont d ANSI NASC 2...

Page 95: ...95 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes OCR A BT NASC OCR A NSC 1 Character Sets cont d...

Page 96: ...96 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes OCR B 10 Pitch BT NASC OCR B NSC 1 Character Sets cont d...

Page 97: ...97 UBI EasyCoder 301 Direct Protocol Programmer s Guide Ed 1 Chapter 11 Character Set Font and Bar Codes Zapf Dingbats BT NASC ZAPF NSC 1 Character Sets cont d...

Page 98: ...Fonts Century Schoolbook BT Dutch 801 Roman BT Dutch 801 Bold BT Futura Light BT Letter Gothic 12 Pitch BT Monospace 821 BT Monospace 821 Bold BT OCR A BT OCR B 10 Pitch BT Prestige 12 Pitch Bold BT...

Page 99: ...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...

Page 100: ...e 27 Parameter too small 30 Assign to a read only variable 34 File is not open 37 Cutter device not found 38 User break 41 Parameter out of range 43 Memory overflow 58 Field overflow 67 Error from com...

Page 101: ...structure 1042 Internal error in mcs 1054 Error when trying to write to device 1055 Error when trying to read from device 1057 File exists 1058 Transfer ribbon fitted 1061 Wrong type of media 1101 Ill...

Page 102: ...izeofadouble bytecharactersetinpoints for printing human readable bar code interpretation BARFONTDSLANT BFLD 9 2 Specifies the slant of a double byte character set font in degreesforprintinghumanreada...

Page 103: ...ions FIELDNO 5 3 Getsthecurrentfieldnumberforpartialclearingoftheprint buffer by a CLL command FILE LOAD 8 4 Receivesandstoresbinaryfilesintheprinter sRAMmemory FILES 8 1 Lists the files stored in one...

Page 104: ...ter s memory to the standard OUT channel INPUT ON 6 1 Sets SYSVAR 18 to 0 and enables layouts and use of variable data fields INPUT OFF 6 1 Restores SYSVAR 18 and disables layouts and use of variable...

Page 105: ...nt for a line of text a bar code an image a box or a line PRSTAT 7 7 Returns the printer s current status PRTXT PT 4 9 Provides the input data for a text field i e a line of text REBOOT 6 12 Restarts...

Page 106: ...REAK device ON OFF CLEANFEED length in dots CLL CLL variable name COPY RAM CARD1 CARD2 original filename RAM CARD1 CARD2 new filename COUNT START counter number start value COUNT WIDTH counter number...

Page 107: ...g 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 filename of character set NASCD filename...

Page 108: ...ATE F DATEADD original date number of days F FRE 1 FUNCTEST ROM1 ROM2 RAM CARD1 CARD2 head HEAD type of check PRSTAT PRSTAT AND parameter SYSVAR parameter TIME F TIMEADD original time no of seconds F...

Reviews: