Monarch 9460 Programmer's Manual

Monarch 9460 Programmer's Manual

Adk printer
Hide thumbs Also See for 9460:

Advertisement

Quick Links

â
Monarch
ä
9460
ADK
Printer
TC9460ADKPM Rev. AC 1/08
©2003 Paxar Americas, Inc. a subsidiary of Avery Dennison Corp. All rights reserved.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 9460 and is the answer not in the manual?

Questions and answers

Summary of Contents for Monarch 9460

  • Page 1 â Monarch ä 9460 Printer TC9460ADKPM Rev. AC 1/08 ©2003 Paxar Americas, Inc. a subsidiary of Avery Dennison Corp. All rights reserved.
  • Page 2 Paxar Americas, Inc. Trademarks Monarch®, Sierra Sport, and 9433 are trademarks of Paxar Americas, Inc. Paxar® is a trademark of Paxar Corporation. Avery Dennison® is a trademark of Avery Dennison Corporation.
  • Page 3: Table Of Contents

    How to Use this Manual ...1-1 A Review of Terms ...1-1 Using the Software ...2-1 System Requirements ...2-1 Installing the Software ...2-1 Connecting the Printer ...2-1 Getting Started ...2-2 Saving a File ...2-4 About Projects ...2-4 Building Projects ...2-5 Changing the Download Settings ...2-5 Downloading a Project ...2-7...
  • Page 4 Command Reference ...5-1 Programming Conventions ...5-1 Field Names ...5-1 Keywords ...5-2 Special Characters ...5-4 Script Flow ...5-4 Functional Relationships ...5-5 Math Commands ...5-5 Script Control Commands ...5-5 Compiler Directives ...5-5 Data Manipulation Commands ...5-6 File Management Commands...5-7 Input/Output Commands ...5-7 ADD ...5-8 APPVERSION ...5-9 ARGREAD ...
  • Page 5 DISABLE ... 5-36 DIVIDE ... 5-37 ENABLE ... 5-38 EXIT ... 5-39 FETCH ... 5-40 FIELDLEN ... 5-41 FIXDATA ... 5-42 GENERATE ... 5-43 GET... 5-44 HOTKEY ... 5-45 IF ... 5-46 INC ... 5-48 INCLUDE ... 5-49 INSERT ... 5-50 JUMP...
  • Page 6 SWITCH ... 5-78 SYSSET ... 5-80 TOKEN ... 5-82 TSTRIP ... 5-83 UPPER ... 5-84 VALIDATE ... 5-85 WHILE ... 5-86 Sample Script ... A-1 4 Table of Contents...
  • Page 7: Overview

    You can define lookup tables for the script running on the printer. It also allows you to define records such as temporary storage buffers. This manual is written for the Monarch Sierra Sport 2 9460 printer. Refer to the printer’s Operator’s Handbook...
  • Page 8 1-2 Overview...
  • Page 9: Using The Software

    C o n n e c t i n g t h e P r i n t e r Connect your printer to the PC using either a DB9 to 9 pin (part 12029314) or DB9 to 25-pin (part 12029315) serial communications cable.
  • Page 10: Getting Started

    Enter a name for the Project. Press f. You will see the Project Properties screen. Accept the default directories or change the directories. Select 9460 from the Printer Type box. Press f. The project file structure is set up. You return to the Main screen.
  • Page 11 Select New from the File Menu to start writing a script. Initial comments are automatically added in the Working Area of the screen. As you type your script, the ADK2 keywords appear in blue and the script text also appears in different colors, depending on what the text item is.
  • Page 12: Saving A File

    S a v i n g a F i l e Select Save from the File menu. The default sub-directory is \Scripts in the selected project directory. The file is saved with .CFS extension (configuration source). The first time you save the file, it will prompt you if you want to add this file as a script in the currently open project.
  • Page 13: Building Projects

    C h a n g i n g t h e D o w n l o a d S e t t i n g s Before downloading a project to the printer, make sure the download settings at the PC match those at the printer.
  • Page 14 Compatible mode is for uni-directional communications. With this mode, you can send files to your printer, but you will not receive printer status information. Select this mode if you are unsure of your printer’s parallel port configuration or your PC’s parallel port configuration.
  • Page 15: Downloading A Project

    D o w n l o a d i n g a P r o j e c t After the project has been built, you are ready to download it to the printer. Verify that the download settings are the same at both the PC and printer. See “Changing the Download Settings,” for more information.
  • Page 16 2-8 Using the Software...
  • Page 17: Printer Procedures

    P R I N T E R P R O C E D U R E S Applications should be written so that they run continuously when the machine is on. However, there may be instances where you need to “go behind the scenes” to troubleshoot the printer, reload an application, perform maintenance or set parameters.
  • Page 18: Loading Applications

    From the Ready prompt, press the right A key (under the X icon). The following menu appears. Choose Start Appl. Loading New Applications To load a new application, see Chapter 2, “Using the Software.” 3-2 Printer Procedures Tool Box Language Exit Start Appl.
  • Page 19: Program Structure

    This chapter discusses program flow control, buffer definitions, and other useful information for writing your script. Below is a sample of what a script may look like. DEFINE TEMPORARY, RegPrice, 6, A DEFINE TEMPORARY, NewPrice, 6, A DEFINE PRINTER, PrtRegPrice, 7, A DEFINE PRINTER, PrtNewPrice, 7, A FUNCTION Start BEGIN CALL InitApp...
  • Page 20: Starting A Script

    F i l e s a n d B u f f e r s The Lookup table is a collection of records. Data is stored in the printer as an ASCII flat file. You can tell the printer how to store defined buffers in memory. You can define the following buffers: ♦...
  • Page 21: Printer Definition

    When a command fails, control passes to an invalid label, if you defined one. For example, the invalid label may show a message on the printer display. If the script does not identify an invalid label, control passes to the next line following the executing command. Similarly, when execution is successful, control passes to a valid label, if you defined one.
  • Page 22: Comments In A Script

    D a t a C o d i n g To streamline the amount of data you store or pass to and from the printer, you can encode the data. For example, you could encode a number as high as 255 by storing the corresponding character from the ASCII chart.
  • Page 23: Command Reference

    C O M M A N D R E F E R E N C E This chapter lists, in alphabetical order, the commands you use to write your script. Each command is discussed in detail to include the correct syntax. P r o g r a m m i n g C o n v e n t i o n s The commands use the following conventions.
  • Page 24: Keywords

    K e y w o r d s The following keywords are reserved by the compiler. Do not use them as identifiers. 1200 1200 4800 APPEND ARRAY AVAILABLEDATA BAUDRATE BITCLEAR BITSHIFT CALL CHECK CLOSECOMM COMPARE CSTRIP DATABITS DATATYPE DELIMITER DIVIDE ECHOBELL ENABLE ENDSWITCH...
  • Page 25 ROPEN RTSCTS SCANLEN SEEK SKIP STATUSPOLLING SYSSET TOKEN TSTRIP UPPER WRITE NOTE: Not all of these keywords apply to the 9460 printer; however, they are still reserved by the compiler. LINKFILE LOOKUP LOOKUPSIZE MACRO MOVE NONE ONDEMAND PRINT QUERY RCLOSE...
  • Page 26: Special Characters

    S p e c i a l C h a r a c t e r s The following special characters are reserved for the printer. Do not use them in your script. left brace underscore pipe or split vertical bar...
  • Page 27: Functional Relationships

    Defines the field definitions for the buffers. INCLUDE Inserts the source statements in the file into the current script. LINKFILE Links formats to the script so they can download to the printer. MACRO Defines or invokes a program for a repeating process. Command Reference 5-5...
  • Page 28: Data Manipulation Commands

    D a t a M a n i p u l a t i o n C o m m a n d s ARGREAD Extracts an argument from a comma-delimited string. Converts ASCII data from a numeric format to an alphanumeric format.
  • Page 29: File Management Commands

    HOTKEY Defines a particular hot key. LABELCOUNT Tracks the number of labels printed. LOCATE Moves the cursor to a particular position on the printer’s Screen. OPENCOMM Opens the communications port. PRINT Prints the printer buffer's contents in the format specified.
  • Page 30: Add

    "Script Flow" at the beginning of this ] [ , valid label buffer-field2 and places the result into Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by the number sign (#)
  • Page 31: Appversion

    A P P V E R S I O N Purpose Sets the version string of the ADK application. Syntax APPVERSION “ Process The APPVERSION command has string2 on the screen’s second line. String1 Example This example displays AP11 on the screen’s first line and VER 1.0 on the second line.
  • Page 32: Argread

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field only: ASCII string delimited by double quotes. only: Number prefixed by a number sign (#). Range is 1-99. valid labels are discussed in "Script Flow"...
  • Page 33: Asc

    See Also asc-field asc-field fields can be one the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Scratch Buffer only: Number prefixed by a number sign (#). int-field and places the resulting...
  • Page 34: Autostart

    AUTOSTART Process The AUTOSTART command starts the application immediately after it is downloaded to the printer. Place it anywhere in the application code, but use it only once. Example This example specifies that the application should start immediately after download to the printer.
  • Page 35: Availabledata

    A V A I L A B L E D A T A Purpose Checks for data at a device. Syntax AVAILABLEDATA Process The AVAILABLE command checks for data at a device Device KEYBOARD COMM Invalid Optional Fields chapter. Example In the following example, control passes to code at label *CHARLN if the application detects data on the communications port.
  • Page 36: Bitclear

    Int-field Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes Scratch buffer valid labels are discussed in “Script Flow"...
  • Page 37: Bitmask

    Buffer- Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes Scratch buffer valid labels are discussed in “Script Flow"...
  • Page 38: Bitset

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes Scratch buffer valid labels are discussed in “Script Flow"...
  • Page 39: Bitshift

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes Scratch buffer valid labels are discussed in “Script Flow"...
  • Page 40: Bittest

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes Scratch buffer valid labels are discussed in “Script Flow"...
  • Page 41: Bsearch

    If the search is successful, the pointer points to the record and control passes to valid label control passes to line. NOTE: You must sort the lookup table before downloading it to the printer. Lookup-field Value is the value you are searching the field for and can be one of the following: Value...
  • Page 42 …,paramX fields can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes. Number prefixed by a number sign (#). Scratch buffer...
  • Page 43: Call

    Example 2 This example shows the use of local variables. The function ADDNUM has two local variables defined that receive the parameters passed from the call. The first parameter (#5) is placed in the TfirstNum field and the second parameter (#6) is placed in the TsecondNum field.
  • Page 44: Chartype

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign (#) ASCII string delimited by double quotes...
  • Page 45: Check

    C H E C K Purpose Checks the status of a specified system parameter. Syntax CHECK item Process The CHECK command checks the status of Item can be one of the following: Item BATTERY COMM PRINT Buffer-field the parameter is returned. Following are the possible status values: Item COMM PRINT...
  • Page 46 *LOWBATTERY label. CHECK BATTERY, *LOWBATTERY 5-24 Command Reference can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field valid labels are discussed in "Script Flow" at the beginning of this...
  • Page 47: Chr

    (containing alphanumeric data) to a numeric int-field contain the data to translate and the translated data, Description Input Buffer Scratch Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes Command Reference 5-25...
  • Page 48: Clear

    Logical Field Name (PR1) NUMBERPRINTED INPUTTEMPLATE SCRATCH COMM Example 1 This example clears the Printer Buffer and passes control to the next line. CLEAR PRINTER Example 2 This example clears temporary buffer field TEMP1 and passes control to the next line. CLEAR TEMP1...
  • Page 49: Closecomm

    CLOSECOMM #1 See Also OPENCOMM commport is the communications port to close. It can be one of the following: Description Input Buffer Printer Buffer Field Temporary Buffer Field Lookup Buffer Field A number prefixed by a pound (#) sign. commport...
  • Page 50: Compare

    Equal to operator fields can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes A number prefixed by the number sign (#) buffer-field2 must be the same type.
  • Page 51: Concat

    's contents do not change. . Destination Destination Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: ASCII string delimited by double quotes A number prefixed by the number sign (#) only: Scratch Buffer Field...
  • Page 52: Cstrip

    See Also RSTRIP LSTRIP TSTRIP 5-30 Command Reference field-buffer2 [ , [ invalid label field-buffer2 Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field ASCII string delimited by double quotes. ] [ , valid label field-buffer1 from...
  • Page 53: Datatype

    D A T A T Y P E Purpose Restricts the type of data the GET statement can retrieve. Syntax DATATYPE Process The DATATYPE command restricts the GET statement to only read data of type data-type Data-type NUMERIC ALPHA SYMBOLS ALPHANUMERIC NUMSYM ALPHASYM...
  • Page 54: Dec

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field valid labels are discussed in “Script Flow" at the beginning of this invalid label . A translation error occurs if the script...
  • Page 55: Define

    DEFINE field-type , field-name , field-length , number-of-elements [ , data-type ] To define a LOOKUP buffer... DEFINE field-type , [ logical-name ] field-name , field-length [ , data-type ] Process The DEFINE command defines temporary, lookup, printer, array, and scratch buffer fields. Field-type Buffer Field...
  • Page 56 Example 1 This example defines the temporary buffer field CURR_QTY as a numeric field with a length of 4 bytes. DEFINE TEMPORARY,CURR_QTY,4,N Example 2 This example shows the use of local variables. The function ADDNUM has two local variables defined that receive the parameters passed from the call. The fist parameter (#5) is placed in the TfirstNum field and the second parameter (#6) is placed in the TsecondNum field.
  • Page 57: Delay

    Purpose Delays the current script for a specified time. Syntax DELAY # interval Process The DELAY command suspends the printer's current script for the number of tenths of seconds specified by Interval can be one of the following: Interval INPUT...
  • Page 58: Disable F1, F2, F3

    D I S A B L E Purpose Turns off the specified hot keys. Syntax DISABLE hotkey1 Process The DISABLE command turns off the specified hot keys. You must turn on the hot keys (with the ENABLE command) before using this command. Hotkey1, hotkey2, and hotkey3 Hotkey1, Hotkey2, and Hotkey3...
  • Page 59: Divide

    . This command performs integer division and truncates the buffer-field2 contains the dividend while Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by a number sign (#) contains a numeric literal, contains a numeric literal, , valid label buffer-field2 and inserts the quotient is the divisor.
  • Page 60: Enable F1, F2, F3

    E N A B L E Purpose Turns on the specified hot keys. Syntax DISABLE hotkey1 Process The DISABLE command turns on the specified hot keys. You must turn on the hot keys (with the ENABLE command) before using this command (the default is off). Hotkey1, hotkey2, and hotkey3 Hotkey1, Hotkey2, and Hotkey3...
  • Page 61: Exit

    Leaves the current script. Syntax EXIT Process The EXIT command returns control back to normal printer operation unless you specify AUTOSTART. To restart the script, enable the script through the printer’s control panel. Example This example shows the script's termination.
  • Page 62: Fetch

    F E T C H Purpose Retrieves one character from up to two sources and places it in the Input Buffer. Syntax FETCH src1 Process The FETCH command retrieves one character from places these characters in the Input Buffer. NOTE: The DATATYPE and CHARTYPE commands do not affect this command.
  • Page 63: Fieldlen

    [ , [ fields can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: ASCII string delimited by double quotes. Number prefixed by a number sign (#) must be numeric.
  • Page 64: Fixdata

    5-42 Command Reference can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes Number prefixed by a number sign (#) Buffer-field1 contains a...
  • Page 65: Generate

    [ , [ invalid label type can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field only: Array Buffer Field Number Number (from 1-24) prefixed by a number sign (#). type must be numeric.
  • Page 66: Get

    Keypad maximum represent the field length. If Maximum Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by a number sign (#) minimum Description Numeric only Alphanumeric type (only when you do not set up a valid labels are discussed in “Script Flow"...
  • Page 67: Hotkey

    H O T K E Y Purpose Defines hot keys. Syntax HOTKEY Process The HOTKEY command defines function-name can be one of the following: Example This example specifies that, when the operator presses F3, the application calls the QUERY_LOOKUP function. HOTKEY F3, QUERY_LOOKUP See Also DISABLE...
  • Page 68 (Field1) [Index] String Number 5-46 Command Reference can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes Number prefixed by a number sign (#)
  • Page 69 Comparison Comparison <> > >= < <= Optional Fields ELSEIF provides another set of commands to execute if another condition exists. For example, IF NAME == "JOHNSON" INC JCOUNT ELSEIF NAME == "SMITH" INC SCOUNT ENDIF counts the number of records where NAME is Johnson or Smith. The first condition is (NAME equals Johnson).
  • Page 70: Inc

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field must be numeric. A translation error occurs if you increment an valid labels are discussed in “Script Flow" at the beginning of this . If the field overflows, control also passes to...
  • Page 71: Include

    I N C L U D E Purpose Inserts another source file into the script. Syntax INCLUDE Process The INCLUDE command signals the compiler to insert the source statements located in the file Rule: Nested INCLUDE statements are not allowed. But, multiple INCLUDE statements in one file are allowed.
  • Page 72: Insert

    Overwrite existing data in field fields can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field position Number prefixed by a number sign (#) only: ASCII string delimited by double quotes...
  • Page 73: Jump

    J U M P Purpose JUMP transfers control to another location. Syntax JUMP label Process The JUMP command unconditionally transfers control to the specified label. If the script is re-entered, control passes to the script's first line. Rule: You cannot jump out of a function. Example This example transfers control to the label *REQUEST_SKU.
  • Page 74: Labelcount

    Logical Field Name (PR1) Logical Field Name (Field1) [Index] Invalid Optional Fields chapter. Example This example sets NUMOFLABELS to the number of labels the printer has printed. LABELCOUNT NUMOFLABELS 5-52 Command Reference buffer-field1 invalid label buffer-field1 field can be one of the following:...
  • Page 75: Left

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field length Number prefixed by a number sign (#) only: ASCII string delimited by double quotes valid labels are discussed in "Script Flow"...
  • Page 76: Linkfile

    \PLATFORM\FORMATS directory. Rule: Link files before FUNCTION START. Example 1 This example downloads CHCKDGIT.PKT (created in MPCL with a text editor) to the printer. LINKFILE CHCKDGIT.PKT 5-54 Command Reference format-name\file-name . If you do not...
  • Page 77: Locate

    L O C A T E Purpose Moves the cursor to a specified position on the printer’s screen. Syntax LOCATE row-position, col-position Process The LOCATE command moves the cursor to the ( on the printer’s screen. The range for ranges are 1-15 (for rows 1 and 2) and 1-20 (for row 3).
  • Page 78: Lower

    Example This example converts any upper case characters in TEMP_SKU to lower-case characters. LOWER TEMP_SKU See Also UPPER 5-56 Command Reference source to lower-case characters. Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field...
  • Page 79: Lstrip

    , and Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Field- only: ASCII string delimited by double quotes. only: Number prefixed by a number sign (#) valid labels are discussed in "Script Flow" at the beginning of this...
  • Page 80: Macro

    M A C R O Purpose Defines or invokes a single command the software expands to multiple commands during script translation. Syntax To define the macro ... macro-name MACRO BEGIN macro-body To invoke the macro ... macro-name Process The MACRO command defines or invokes a macro. A macro is a single command the software expands to multiple commands during script translation.
  • Page 81 Example This example defines a macro (PTRIDLE) to check the status of the printer. DEFINE TEMPORARY, tEnqStatus, 3 DEFINE TEMPORARY, tPrinterOK, 1, N MACRO PTRIDLE BEGIN MOVE CHECK COMPARE tEnqStatus, EQ, "A@", *PI_END_$ MOVE *PI_END_$ #0, %1 ENQSTATUS, tEnqStatus #1, %1...
  • Page 82: Mid

    , and length Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: ASCII string delimited by double quotes Number prefixed by a number sign (#) Start must be numeric. valid labels are discussed in "Script Flow"...
  • Page 83: Move

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: ASCII string delimited by double quotes Number prefixed by a number sign (#) Scratch Buffer , valid label...
  • Page 84 This example copies the data from the Input Buffer to CONTROL_ID. MOVE INPUT,CONTROL_ID 5-62 Command Reference can be one of the following: Description Input Buffer The Printer’s Screen Scratch Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field...
  • Page 85: Multiply

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: Number prefixed by a number sign (#) fields must be numeric. valid labels are discussed in "Script Flow" at the beginning of this...
  • Page 86: Opencomm

    (1 for the primary port or 2 for the secondary port). Timeout defines the length of time (0-255, in seconds) that the printer waits for data during a GET or FETCH. If a timeout occurs, control passes to the GET or FETCH invalid label.
  • Page 87: Pad

    Pad left Pad right max-length , and Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field only: Array Buffer Field max- Number prefixed by a number sign (#) only: ASCII string delimited by double quotes. Must be one character long is a buffer field, it must be numeric.
  • Page 88 Syntax PARSE [ [ Process The PARSE command invokes the printer's MPCL parser to analyze and process the scratch buffer's contents. In general, the PARSE command will out perform (speed to label out) the PRINT command. If you have the option of using either command (PARSE or PRINT), PARSE is the better option.
  • Page 89 P R I N T Purpose Prints the Printer Buffer's contents, by a source field, in the format specified. Syntax PRINT [ CONTINUOUS ] # invalid label Process The PRINT command images and prints the format specified by Format-number than 255 cannot be constants. If Use this method to avoid reimaging the data.
  • Page 90 Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes Must be one character long...
  • Page 91 Rule: Buffer-field1 is numeric, If the record is not found, the pointer is undefined. The script must execute the command again to ensure a valid record pointer. Optional Fields Invalid chapter. The exception is as follows: If the search fails to find the requested field or it detects end of file, control passes invalid label Example This example searches the CONTROL_ID field for an exact match with the Input...
  • Page 92 R E A D Purpose Copies the current record from the lookup file into the appropriate working buffer. Syntax READ record Process The READ command copies the current record into the appropriate working buffer, specified by pointer advances to the next table to read.
  • Page 93 R E S T O R E S C R E E N Purpose Re-displays a previously-saved screen. Syntax RESTORESCREEN Process The RESTORESCREEN command restores the contents of a previously saved screen to the screen, overwriting the current screen’s contents. The SAVESCREEN command saved the original screen and stored it in the internal screen buffer.
  • Page 94 R E T U R N Purpose Breaks out of a subroutine. Syntax RETURN Process The RETURN command breaks out of a subroutine. It transfers control back to the command following the CALL activating the subroutine. NOTE: Using END in a subroutine also implies a RETURN. Therefore, the RETURN command is not required as the last command of a subroutine.
  • Page 95 , and copies them into fields can be one of the following: Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field only: ASCII string delimited by double quotes. Must be one character long length Number prefixed by a...
  • Page 96 , and length can be one of the following: Buffer-field2 Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Field- only: ASCII string delimited by double quotes. only: Number prefixed by a number sign (#) valid labels are discussed in "Script Flow"...
  • Page 97 NOTE: The internal screen buffer is cleared (and therefore the screen is lost) when the READY prompt appears, you calibrate the printer, or the application ends. Example This example displays “1234567890” on the screen and saves it. CLEAR DISPLAY MOVE “1234567890”, DISPLAY...
  • Page 98 S E E K Purpose Positions the record pointer within the lookup table. Syntax SEEK modifier Process The SEEK command positions the record pointer within the lookup table, according modifier Modifier specifies the current record's placement and can be one of the following: Modifier NEXT PREVIOUS...
  • Page 99 Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field only: Number prefixed by a number sign (#) valid labels are discussed in "Script Flow" at the beginning of this...
  • Page 100: Switch

    Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Number prefixed by a number sign (#) ASCII string delimited by double quotes. Must be one character long buffer-field1...
  • Page 101 Example This example compares the Input Buffer's contents to <<, >>, and =. For example, if the input contains >>, the script executes the commands following CASE ">>" until the next CASE or DEFAULT command. Control then passes to ENDSWITCH. If the input buffer does not match any values, the script executes the commands following DEFAULT, until it reaches ENDSWITCH.
  • Page 102: Sysset

    S Y S S E T Purpose Sets the printer’s default parameters. Syntax SYSSET function Process The SYSSET command sets the if applicable, the fields, they must be numeric. If they are a constant, precede it with a number sign (#) except where noted.
  • Page 103 Function/Description SHUTDOWN Enables or disables this parameter. If enabled, sets the number of seconds without activity before the printer turns off automatically. LABEL The label’s dimensions in dots. REVVID Enables or disables reverse video on the screen. STATUSPOLLCCHAR Enables or disables status polling and specifies the character.
  • Page 104: Token

    The exception is as follows: Example This example sets the token delimiter to *. Then, it extracts the strings PAXAR and CORPORATION from TASOURCE and moves them to the printer’s screen one at a time. MOVE “PAXAR*CORPORATION”, TASOURCE TOKEN DELIMITER, “*”...
  • Page 105: Tstrip

    ♦ If the characters in the same position match, they are stripped. ♦ If the template has an underscore character, the printer does not strip that character. ♦ If the character is the same position do not match, they are are not stripped.
  • Page 106: Upper

    (Field1) [Index] Example This example converts any lower-case characters in TEMP_SKU to upper-case. UPPER TEMP_SKU See Also LOWER 5-84 Command Reference source to upper-case characters. Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field...
  • Page 107: Validate

    Digit 3 Custom Check Digit 4 Invalid Optional Fields Example In this example, the printer validates the check digit in the Input Buffer by using the Sum of Digits check digit scheme. VALIDATE INPUT #2 See Also LOWER source, type...
  • Page 108: While

    They can Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Number prefixed by a number sign (#) ASCII string delimited by double quotes. Must be one character long...
  • Page 109 Example This example calls the macro PTRIDLE that checks for the printer status. The WHILE loops executes until the printer is ready to accept more data. MOVE #0, tPrinterOK WHILE tPrinterOK == #0 PTRIDLE ENDWHILE See Also SWITCH tPrinterOK Command Reference 5-87...
  • Page 110 5-88 Command Reference...
  • Page 111: S A M P L E S C R I P T

    One is a compliance format, another is a receiving format, and the other is a sale format. Use this script as a guide when you program the printer. See Chapter 4, “Program Structure” for additional programming tips.
  • Page 112: Parse

    ;The Comply function contains the batch data for the compliance format. Function Comply Begin MOVE "{B,1,N,1 |8,~03466598~034|", SCRATCH CONCAT "9,~0340~034|", SCRATCH CONCAT "10,~03436~034|", SCRATCH CONCAT "11,~0342508-09505~034|", SCRATCH CONCAT "12,~034950330~034|", SCRATCH CONCAT "13,~034FISHING ROD~034|", SCRATCH CONCAT "14,~034OH 45001~034|", SCRATCH CONCAT "16,~034LIMA~034|", SCRATCH CONCAT "17,~034123 US 35~034|", SCRATCH CONCAT "18,~034MYSTORE~034|", SCRATCH CONCAT "29,~0348~034|", SCRATCH...
  • Page 113 CONCAT "R,1,~034MIAMISBURG OH 45342~034|", SCRATCH CONCAT "T,16,20,V,1022,376,0,50,14,12,B,L,0,0 |", SCRATCH CONCAT "T,17,20,V,1073,376,0,50,14,12,B,L,0,0 |", SCRATCH CONCAT "T,18,20,V,1124,376,0,50,14,12,B,L,0,0 |", SCRATCH CONCAT "T,19,16,V,1038,11,0,50,12,10,B,L,0,0 |", SCRATCH CONCAT "R,1,~034170 MONARCH LANE~034|", SCRATCH CONCAT "T,20,18,V,1079,11,0,50,12,10,B,L,0,0|", SCRATCH CONCAT "R,1,~034WORLD HEADQUARTERS~034|", SCRATCH CONCAT "T,21,17,V,1120,11,0,50,12,10,B,L,0,0 |", SCRATCH CONCAT "R,1,~034PAXAR CORPORATION~034|", SCRATCH CONCAT "T,22,13,V,592,51,0,50,12,10,B,L,0,0 |", SCRATCH...
  • Page 114 CONCAT "C,166,238,0,50,9,9,A,L,0,0,~034QTY 48~034|", SCRATCH CONCAT "C,75,107,0,510,1,1,B,L,0,0,~034744148022201~034|", SCRATCH CONCAT "C,52,132,0,50,8,8,A,L,0,0,~03402/22/01 CONCAT "T,2,20,V,29,123,0,50,8,8,A,L,0,0,1|}", SCRATCH CONCAT "{F,3,A,R,E,300,200,~034Sale~034|", SCRATCH CONCAT "B,1,13,F,99,52,7,2,40,7,L,0|", SCRATCH CONCAT "C,279,28,0,510,1,1,B,L,0,0,~034063 CONcaT "T,2,15,V,243,61,0,50,10,10,A,L,0,0,1|", SCRATCH CONCAT "T,3,8,V,215,71,0,50,10,10,A,L,0,0,1|", SCRATCH CONCAT "C,187,78,0,50,10,10,A,L,0,0,~034RED~034,1|", SCRATCH CONCAT "C,162,51,0,50,10,10,A,L,0,0,~034COTTON-RAMIE~034,1|", SCRATCH CONCAT "C,75,14,0,50,11,11,A,L,0,0,~034WAS CONCAT "C,46,16,0,50,11,11,A,L,0,0,~034NOW parse return A-4 Sample Script 15:29~034,1|", SCRATCH DEPT#25~034|", SCRATCH $39.99~034,1|", SCRATCH...
  • Page 115 5-5 script control, 5-5 comments in a script, 4-4 compare command, 5-28 compiler directives, 5-5 concat command, 5-29 connecting the printer, 2-1 conventions for programming, 5-1 cstrip command, 5-30 data coding, 4-4 data manipulation commands, 5-6 data storage, 4-4...
  • Page 116 5-63 names for fields, 5-1 opencomm command, 5-64 overview, 1-1 pad command, 5-65 parse command, 5-66 print command, 5-67 printer buffers, 4-3 printer procedures, 3-1 printer, connecting, 2-1 procedures for the printer, 3-1 program structure, 4-1 programming conventions, 5-1...
  • Page 117 projects building, 2-5 downloading, 2-7 editing existing, 2-7 introduction, 2-4 query command, 5-68 read command, 5-70 ready prompt, displaying, 3-1 reference for commands, 5-1 relationships, functional, 5 requirements, system, 2-1 restorescreen command, 5-71 return command, 5-72 right command, 5-73 rstrip command, 5-74 sample script, A-1 savescreen command, 5-75 saving files, 2-4...
  • Page 118 4 Index...

Table of Contents