Home
Monarch 9460 Printer User Manual
Contents
1. 1 1 How to Use This Manual stu tree ote tuu rt tet ate eee tet ge epu E 1 1 Ac Tec 1 1 Using the SOMWANG i ees ecd EE EI IL eM E 2 1 os dap Pob ette su a 2 1 installing THe Software iee eet A ad eh aa oe bee datis d de gatto un 2 1 dedi e ten veo pod ee gorge Seno 2 1 necu MT cT ESPERE 2 2 SEV E gimp IUE 2 4 Pus PO OCS AE 2 4 Building Projects d iei ots oO HI Ren 2 5 Changing the Download Settings ure i x e ennen 2 5 Downloading a ProjeCb ir ee cua See Rabe tob a oes es cue CU PE ard cu uM Salus 2 7 Editing Existing Projects 3532 eene dott Sites eaux ute Lo Eros cL 2 7 dinig apiniip rnm c M 3 1 Displaying the Ready PEOWDU ua eco too t edat cte ote eam dient ernie cea 3 1 No AD PUG ALO eL IP 3 1 Loaded Applicaton vd aee o Re Ae Ee ee 3 1 ACCESSING th EE e 3 1 Loading Applications 2 5 rue nonet tes s x ae LE ra 3 2 Restarting Existing Applications ci uc o poete Eh ee A IER S 3 2 Morning cR oT E 3 2 Progr m Structure slois Em 4 1 FUCHS eco decr get tac ecu coats AE aM cl EA 4 1 Starting a cbse d epe Po pub 4 2 Pile S ARG 4
2. at ctio to ste toten E i babes 5 9 ADGBEADS S ec qe pede EU M mE 5 10 D pp ET REN 5 11 esu Sa i Lue pedi 5 12 AVAIEABLEDRATA oda Se bti doe Deae oer ie ot ooo eS prenons 5 13 BITGEEAR I res 5 14 BU MASK err 5 15 BITSET 22i ce aA te al i oed an 5 16 BITSHI 5 17 BTE OT e vM LL I e EE 5 18 BSEARCEHLS dere te Am E LL ai MH I 5 19 m p M 5 20 OHABTYPE 2er eeu cun Mp ek d 5 22 CHECK ae casei m E 5 23 Aes A aul DEREN 5 25 GEA p e 5 26 GEO SE COMM ccc ct as ce cots bete tao n ec dut Lato euren Enn tun 5 27 Eo ENDS alte doe eod uer terest bab 5 28 CONCA ger PT RE RE 5 29 GO TRIB etis veal i ies ex ecce Such 5 30 BE oe UE UE pU Li EM E 5 31 DEG oaa tut ELM M I MEE 5 32 DEFINE 2 uet ee ai han on Lp A 5 33 anda Pete us i s aed o iod Pe ues 5 35 2 Table of Contents DISABLE pO LIE E I MU LM ME 5 36 canes 5 37 ENABLE oce etie etd va
3. Buffer field2 specifies the buffer holding the value to search on and can be one of the following Buffer field2 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index String Number 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 Number prefixed by a number sign If the query is successful and finds the record the pointer is set to that record 5 68 Command Reference Rule Optional Fields Example See A so Buffer field 1 and buffer field2 must be the same type For example if buffer field1 is numeric buffer field2 must be numeric If the record is not found the pointer is undefined The script must execute the command again to ensure a valid record pointer Invalid and valid labels are discussed in Script Flow at the beginning of this chapter The exception is as follows If the search fails to find the requested field or it detects end of file control passes to invalid label This example searches the CONTROL_ID field for an exact match with the Input Buffer s contents If there is no match control passes to ERROR_ID Otherwise control passes to the PROCESS_ID QUERY CONTROL ID EQ INPUT ERROR ID PROCESS ID READ SEEK Command Reference 5 69 READ Purpose Syntax Pro
4. The BITCLEAR command sets the specified bit by b t position in buffer field to zero Bit position can be 0 to 15 If b t position is out of range and nval d label is defined control passes to that label Buffer field and bit position can be one of the following Asc field and nt field INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Asc field only Number String SCRATCH Optional Fields Example BITCLEAR TEMP1 2 See Also BITMASK BITSET BITSHIFT BITTEST 5 14 Command Reference 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 Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example sets bit number two of TEMP1 to zero BITMASK Purpose Syntax Process RULE Optional Fields Example See Also Allows bit logical operations on buffers BITSET operation buffer field1 buffer field2 invalid label valid label use the above syntax for logical AND OR or logical exclusive OR BITMASK operation buffer field1 invalid label valid label use the above syntax for Invert The BITMASK command allows bit logical operations on Duffer field T AND OR and exclusive OR take the valu
5. Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Rule You can decrement only numeric fields Optional Fields nva id and valid labels are discussed in Script Flow at the beginning of this chapter If you decrement an uninitialized field control passes to nva id label Example This example decrements TEMP SKU and passes control to the next line DEC TEMP SKU See Also ADD INC SUB DEC MULTIPLY DIVIDE 5 32 Command Reference DEFINE Purpose Syntax Process NOTE Optional Fields NOTE Defines the field definitions for the buffers To define a SCRATCH buffer DEFINE field type field length data type To define TEMPORARY or PRINTER buffers DEFINE field type field name field length data type To define an ARRAY buffer 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 The DEFINE command defines temporary lookup printer array and scratch buffer fields Field type can be one of the following Buffer Field Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index SCRATCH Scratch Buffer Field na
6. The COMPARE command compares the two buffer fields based on modifier Modifier can be one of the following Modifier Description GT Greater than operator GE Greater than or equal to operator LT Less than operator LE Less than or equal to operator EQ Equal to operator The buffer field fields can be one of the following Buffer field and 2 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index String ASCII string delimited by double quotes Number A number prefixed by the number sign Buffer field and buffer field2 must be the same type For example if buffer field1 is numeric buffer fie d2 must also be numeric Invalid and valid labels are discussed in Script Flow at the beginning of this chapter If the comparison is true control passes to va id abe or to the next line if there is no valid label If the comparison is false control passes to nva id abe or to the next line if there is no invalid label This example compares TEMP1 and TRUCK ID for equality If they are equal control passes to TRUCK If they are not equal control passes to JUMP 5 COMPARE TEMP1 EQ TRUCK ID JUMP 5 TRUCK IN 5 28 Command Reference CONCAT Purpose Syntax Process Optional Fields Example Appends the contents of
7. rstrip command 5 74 sample script A 1 savescreen command 5 75 saving files 2 4 scope of field names 5 3 script comments 4 4 script control commands 5 5 script flow 5 4 script flow control 4 3 script sample of A 1 scripts starting 4 2 seek command 5 76 software installation 2 1 using 2 1 special characters 4 starting scripts 4 2 storage of data 4 4 structure of programs 4 1 sub command 5 77 switch command 5 78 sysset command 5 80 system requirements 2 1 T temporary storage buffers 4 2 terminology 1 1 token command 5 82 toolbox accessing 3 1 tstrip command 5 83 U upper command 5 84 using the software 2 1 using this manual 1 1 V validate command 5 85 vocabulary 1 1 Ww while command 5 86 Index 3 4 Index SErvice t www paxar com for sales supplies information and telephone numbers for our locations throughout the world IS 1 800 543 6650 In the U S A 1 800 363 7525 In Canada TOLL FREE V
8. Repeating Items Missing Items Field Names The logical field names You must type the upper case text CALL function name Text in italics are place holders CLEAR item Optional items appear in brackets CHECK item MI invalid label valid 18061 1 Text in bold courier font are examples of the command in use ADD WHOLESALE TEMP2 Text with an asterisk is a label signifying a place to jump to in the script ADD CONTROL TEMP1 ERROR2 Horizontal ellipsis dots following an item in a syntax description indicate more of the same item may appear FETCH COMM Vertical ellipsis dots used in examples and syntax descriptions indicate a portion of the code is omitted Ex ADD WHOLESALE TEMP2 ADD TEMP2 TEMP1 used in the command sections are examples For example TEMP1 is used throughout this chapter as an example of a temporary buffer field name Command Reference 5 1 Keywords The following keywords are reserved by the compiler Do not use them as identifiers 1200 DTRDTE NONE 1200 19 2K 2400 4800 9600 ADD APPEND APPVERSION ARGREAD ARRAY ASC AUTOSTART AVAILABLEDATA BACKLIGHT BATTERY BAUDRATE BEEP BEGIN BITCLEAR BITMASK BITSET BITSHIFT BITTEST BSEARCH CALL CASE CHARTYPE CHECK CHR CLEAR CLOSECOMM COMM COMM2 COMPARE CONCAT CONTINUOUS CSTRIP CURRENT CURRENCY DATABITS DATACOLLECT DATACOLLE
9. Number Number prefixed by a number sign Format number and quantity must be numeric Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example prints the Printer Buffer s contents using Format 2 and then passes control to the next line if successful If the operator presses an exception key control passes to Exception PRINT 2 Exception Command Reference 5 67 QUERY Purpose Syntax Process NOTE Searches the lookup file to find a specified record QUERY buffer field comparison buffer fiela2 invalid label valid label The QUERY command searches the lookup file to find a record containing a specific value If multiple records contain the value the command reads the first record fitting the criteria Buffer field specifies the buffer to search and can be one of the following Buffer field1 Logical Field Name LU1 Description Lookup Buffer Field Comparison defines the type of query and can be one of the following Comparison Description EQ Contents of buffer field1 is equal to the contents of buffer fiela2 LT Contents of buffer fie d7 is less than the contents of buffer fiela2 LE Contents of buffer fie d7 is less than or equal to the contents of buffer field2 GT Contents of buffer field is greater than the contents of buffer field2 GE Contents of buffer fie d7 is greater than or equal to the contents of buffer field2
10. r Directories Printer Type Default Project Directory oo C ADKProjectsNTEST E Build Output File Dees Script Dies CMADKProjects TESTATEST CFU E CAADKPiojects TEST scripts Default Format Directory Project Description CNADKProjects TEST formats El 3 n Default Lookup Directory Cancel ADK Projects TEST lookups E 4 Accept the default directories or change the directories 5 Select 9460 from the Printer Type box Press Lox The project file structure is set up You return to the Main screen 2 2 Using the Software 6 Select New from the File Menu to start writing a script Initial comments are automatically added in the Working Area of the screen ADK2 untitled 1 lolx PF File Edit View Project Window Help lej x pela e el ni xi ADK Application File Application Project Test Author Scripts 7 Date Formats y Lookups Lne 1 Colf 1 X NS NM Zz 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 To change the keyword colors the text to upper or lower case or show white space right mouse click in the Working Area of the screen and make the appropriate selection If you select Properties you will see Window Properties x Color Font Language Tabs Keyb
11. 11 11 A L 0 0 034NOW 30 00 034 11 SCRATCH INDEX A accessing the toolbox 3 1 add command 5 8 applications loading 3 2 appversion command 5 9 argread command 5 10 arrays 4 3 asc command 5 11 autostart command 5 12 availabledata command 5 13 B bitclear command 5 14 bitmask command 5 15 bitset command 5 16 bitshift command 5 17 bittest command 5 18 bsearch command 5 19 buffers 4 2 building projects 2 5 call command 5 20 changing download settings 2 5 characters special 5 4 chartype command 5 22 check command 5 23 chr command 5 25 clear command 5 26 closecomm command 5 27 coding of data 4 4 command reference 5 1 commands data manipulation 5 6 file management 5 7 input output 5 7 math 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 datatype command 5 31 dec command 5 32 define command 5 33 delay command 5 35 directives for compiler 5 5 disable command 5 36 displaying the ready prompt 3 1 divide command 5 37 download settings changing 2 5 downloading projects 2 7 E editing existing projects 2 7 enable command 5 38 exit command 5 39 Index 1 fetch command 5 40 field names 5 1 field names scope of 5 3
12. 2 Lookup Table 4 2 Temporary Storage Definition 3 12 MO od neue EE 4 2 Printer Defmitloli oan e RR o xar 4 3 DUC eM RERUMS 4 3 Scope ofFi ld IUCUNDE 4 3 P 4 3 COMMENTS in AsOCHIDE qe NT p 4 4 Data MEA tiM LED E LE 4 4 Pc c cesses 4 4 Table of Contents 1 Command Reference 2 2 2 02 2 CX oxa c2 Oxo d eu zo xo eua Aaa EAA AE N A E UN REP ARARA ARUTA RRA 5 1 oN ico A E 5 1 Field ci lcge c aS 5 1 inge p m PP Uer 5 2 Special Characters oce eue oce ie rre eb I doi E ERR EXER n 5 4 tnt A tA UL Eae ont ELLE LE 5 4 Functional Relationships scguro oeste is re epi ot oo Deos pra opea de 5 5 Math ConmmaMus aud serene Pore edu ME DUM LL M EE 5 5 Script Control Commands uin ore ptt Pci Arp p UE D pete ua UO E Unus 5 5 Compiler Directive P DE 5 5 Data Manipulation Commands ecco iei iouaot des pet dese oe once seiten ees e Sadezac teacecds eso does eso ape e Dodo aides etae on 5 6 Fil Managemient COmlli amd oec a ato et tractari duse otii ee ewe ie 5 7 Input Output Commands oe edt do Ai Ae ade 5 7 Dip ge I 5 8
13. 3 1 B L 0 0 1 SCRATCH CONCAT T 2 15 V 80 25 0 10 1 1 B L 0 0 1 SCRATCH CONCAT L V 67 1 0 180 10 SCRATCH CONCAT B 3 12 F 12 43 1 2 50 1 L 0 SCRATCH PARSE You cannot nest double quotes You must use 034 instead of a double quote In the above example use 034FMT1 034 for FMT1 5 66 Command Reference PRINT Purpose Syntax Process Rule Optional Fields Example Prints the Printer Buffer s contents by a source field in the format specified PRINT CONTINUOUS format number quantity invalid labe valid label The PRINT command images and prints the format specified by format number Format number contains a format number between 0 and 999 Numbers greater than 255 cannot be constants If format number equals 0 the same image prints Use this method to avoid reimaging the data Quantity represents the number of labels to print The printer pauses before printing each label However the printer does not pause when you use CONTINUOUS and quantity is greater than 1 it prints one strip with the number of labels in quantity Quantity can be 1 99 the default is 1 Format number and quantity can be one of the following Format number and Description quantity INPUT Input Buffer Logical Field Name Temporary Buffer TEMP1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index
14. The macro matches arguments The first argument replaces 1 the second argument replaces 962 and so on up to 699 arguments Labels are handled differently in macros The label names inside the macro body should use this form macro label name where macro abe name is a unique name for the macro The label can be up to eight characters This restriction helps avoid duplicate labels if a macro appears within a function more than once As the compiler expands each macro it expands the labels it expands each dollar sign into a unique three digit number 5 58 Command Reference 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 0 1 CHECK ENQSTATUS tEnqStatus COMPARE tEnqStatus EQ AQ PI END MOVE 1 1 PI END END Command Reference 5 59 MID Purpose Syntax Process Extracts a sub field from a string MID buffer field buffer field2 start length invalid label valid label The MID command extracts a sub field from buffer field and copies it into buffer field2 starting with the start position and extracting ength number of characters Buffer field1 buffer field2 start and length can be one the following Buffer field1 2 Start and Length INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 L
15. 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 And if you did not define a valid label control passes to the next line Rule Precede all valid and invalid labels by an asterisk For example ADD CONTROL TEMP1 ERROR2 SUCCESS2 Program Structure 4 3 Comments in a Script You must precede comments by a semicolon The software treats them as a single white space and ignores them pOKCkckckckckckockckockckck ck ck ke ke ke ke ke ke ke ke ke ke ke ke Se ke ke ke ke ke ke ke ke ke ke Sk ke ke kk ko kk kk kk kk kk kc ko ko Description This is the main entry point of the script Gets the Date and then starts processing D pOKCkckckckckokok ckockckckckckck ke ke ke kk ke ke ke ke ke Sk ke e ke ke ke ke ke ke ke ke ke ck ck ke kk ke kk kk kk ck kk kk kk Data Storage Although you can define a buffer field as being numeric or alphanumeric the printer stores both kinds of data as ASCII characters as follows Data Type Description Alphanumeric Sequences of any ASCII characters Numeric Sequences of numeric ASCII characters For example the printer stores 91 as the two byte alphanumeric string
16. defined control passes to that label If the bit specified by b t position is one set and va id abe is defined control passes to that label Buffer field1 and bit position can be one of the following Buffer f eld1 and bit position INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Asc field only Number String SCRATCH Optional Fields 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 Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example checks bit number two of TEMP1 and if it is zero cleared control passes to CLEARED If the bit is one set control passes to the next line Example BITTEST TEMP1 2 CLEARED See Also BITCLEAR BITMASK BITSET BITSHIFT 5 18 Command Reference BSEARCH Purpose Syntax Process Optional Fields NOTE Optional Fields Example Performs a binary search on a sorted lookup table to find a record containing a specific value BSEARCH ookup field value invalid label valid label The BSEARCH command searches ookup field for value The script determines which lookup table to use by the field you specify every field name must be unique over all loo
17. fieldlen command 5 41 file management commands 5 7 files 4 2 files saving 2 4 fixdata command 5 42 flow control of scripts 4 3 flow of scripts 5 4 functional relationships 5 5 functions 4 1 G generate command 5 43 get command 5 44 getting started 2 2 glossary 1 1 H hotkey command 5 45 if command 5 46 inc command 5 48 include command 5 49 input output commands 5 7 insert command 5 50 installation of software 2 1 introduction to projects 2 4 J jump command 5 51 keywords 5 2 2 Index labelcount command 5 52 left command 5 53 linkfile command 5 54 loading applications 3 2 locate command 5 55 lookup buffers 4 2 lower command 5 56 Istrip command 5 57 macro command 5 58 manual using 1 1 math commands 5 5 mid command 5 60 move command 5 61 multiply command 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 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
18. is out of range and invalid label is defined control passes to that label If the operation is successful and va d label is defined control passes to that label Both buffer field and count must be numeric Direction can be one of the following Direction RIGHT Description Shifts bits left Shifts bits right Buffer field and count can be one of the following Buffer field and count INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Asc field only Number String SCRATCH 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 Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example shifts the bits in TEMP1 once to the left which has the effect of doubling the value BITSHIFT LEFT BITCLEAR BITMASK BITSET BITTEST TEMP1 1 Command Reference 5 17 BITTEST Purpose Syntax Process Checks the specified bit to see if the bit is a one or a zero BITTEST buffer field1 bit position invalid label valid label The BITTEST command checks the specified bit by bit position in buffer fiela Bit position can be 0 to 15 If the bit specified by b t pos tion is zero cleared and invalid label is
19. last record File type specifies the type of file and can be one of the following File type Description LOOKUPFILE Lookup Table File Table name selects which lookup table to seek Invalid and valid labels are discussed in Script Flow at the beginning of this chapter The exceptions are as follows If the NEXT modifier advances the current record past the end of the file or the PREVIOUS modifier moves the current record before the beginning of the file control passes to nva id label if defined When the selected file is empty any modifier triggers an end of file condition Then control passes to nva id label if defined This example advances the current record in the lookup table by one record and if an end of file condition occurs control passes to EOF LABEL SEEK NEXT LOOKUPFILE EOF LABEL QUERY READ 5 76 Command Reference SUB Purpose Syntax Process Rule Optional Fields Example See A so Subtracts the contents of one field from the contents of another SUB buffer field1 buffer field2 invalid label valid label The SUB command subtracts the contents of buffer field from the contents of buffer field2 inserting the result into buffer fiela2 The buffer field fields can be one the following Buffer field1 and 2 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Pr
20. of your printer s parallel port configuration Enabled Checked is for bi directional communications With this mode you can send files to your printer and receive printer status information such as error messages Only select this mode if your printer is set for IEEE1284 mode Refer to your printer s manual for more information 7 Click to exit the Download Configuration screen Downloading a Project After the project has been built you are ready to download it to the printer l Verify that the download settings are the same at both the PC and printer See Changing the Download Settings for more information 2 Select Download from the Project Menu Messages appear as the file is downloaded to the printer Editing Existing Projects l Select Open from the Project Menu and locate the project file It as a CFP extension 2 Make any changes to your script format or lookup file s 3 Save your changes 4 Re build the project 5 Download the project to the printer When you close the ADK2 software it saves the current views and which project files are open When you re open the project the software restores the views and the previously opened project files Using the Software 2 7 2 8 Using the Software PRINTER PROCEDURES 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 rel
21. places it in another ARGREAD raw data destination index invalid label valid label The ARGREAD command extracts data from raw data and places it in destination The raw data destination and index fields can be one the following Raw Data Destination and Description Index INPUT Input Buffer Logical Field Name TEMP1 Temporary Buffer Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Raw data field only String ASCII string delimited by double quotes Index field only Number Number prefixed by a number sign Range is 1 99 Invalid and valid labels are discussed in Script Flow at the beginning of this chapter Assuming PARAMLIST contains SSN Name ltem the following example extracts SSN and places it in the PARAM1 variable ARGREAD PARAMLIST 1 5 10 Command Reference ASC Purpose Syntax Process Example See Also Converts numeric data to alphanumeric data ASC int field asc field The ASC command converts numeric data from nt fie d and places the resulting alphanumeric data in asc fie d The nt field and asc field fields can be one the following Int field and Asc field Description INPUT Input Buffer Logical Field Name TEMP1 Temporary Buffer Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name index Array Buffer Field SCRATCH Scratch B
22. than lt Less than or equal Use the BREAK command to break out of a WHILE loop prematurely For example you could use it when an error occurs Also Do Not use WHILE inside a macro 5 86 Command Reference Example See Also 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 tPrinterOK ENDWHILE IF SWITCH Command Reference 5 87 5 88 Command Reference SAMPLE SCRIPT A This chapter provides a sample script for retail printing Depending on the character entered by the user a different format prints 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 Script File Sample Script Author A Kramer Date Sept 6 2001 This sample prints one of three formats depending on the character entered by the user Define SCRATCH 5000 A AUTOSTART Function Start Begin APPVERSION AnyStore V1 0 call SendFmt call main End Function Main Begin Moredata fetch comm switch input case C call Comply case R call Receiving case S call Sale default clear input endswitch jump Moredata End Sample Script A 1 The Comply function contains the batch data for the compliance form
23. the length of the largest corresponding field in the formats For example if the length of Field 1 of Format 1 is 7 the length of Field 1 of Format 2 is 22 the length of Field 1 of Format 3 is 12 Then the first field s length in the printer buffer must be 22 Arrays You can use an array to store data similar to temporary storage An array is a series of elements with the same data type Arrays can be either numeric or alphanumeric You can access an element of an array by providing the array name and an index value This index value can be a numeric literal a numeric buffer field or the input buffer For example Prices 4 points to the Prices array s fourth element In addition to the information for the DEFINE command listed above you must also list the number of elements in the array the maximum index value See Chapter 5 Command Reference for more information Scope of Field Names Keep in mind the following information You can access all variables globally Field names and labels can be up to 255 characters long However the first 12 characters must be unique Script Flow Control You can branch the flow of command control in different ways The order in which the commands appear in the script controls the program s flow At times control is passed to another command through the use of valid labels invalid labels and the JUMP command See Chapter 5 Command Reference for information about JUMP When
24. 0 Disabled 1 Enabled 2 480 Timeout Width 208 1 23 or use this formula 192 width in inches 33 0 Disabled 1 Enabled 0 Disabled 1 Enabled 0 Disabled 1 Enabled This example specifies to use English prompts SYSSET PROMPTS 1 Parameter2 n a Length 89 55 or use this formula 192 length in inches 32 n a The character to use The default is 05H The character to use The default is Command Reference 5 81 TOKEN Sets a token delimiter or extracts a token delimited sub field from a larger field TOKEN DELIMETER character invalid label valid label TOKEN buffer field1 buffer field2 invalid label valid label Purpose Syntax To set a token delimiter To extract a sub field Process The TOKEN command sets c aracter as the token delimiter or extracts a sub field from buffer field7 delimited by character and places it in buffer field2 Subsequent calls to this command using the same fields returns the next sub string You must set the delimiter before extracting sub fields the default is a comma Character buffer field1 and buffer field2 can be one of the following Character buffer field1 and buffer field2 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index SCRATCH String Number Optional Fields Description Input Buffer
25. 0 50 15 15 B L 0 0 SCRATCH CONCAT R 1 034PO NUMBER 034 SCRATCH CONCAT T 26 5 V 1180 11 0 50 12 10 B L 0 0 SCRATCH CONCAT R 1 034FROM 034 SCRATCH CONCAT T 27 3 V 1174 376 0 50 14 12 B L 0 0 SCRATCH CONCAT R 1 034T0O 034 SCRATCH CONCAT T 28 1 V 45 191 0 3 1 1 B L 0 0 SCRATCH CONCAT R 1 0340 034 SCRATCH CONCAT T 29 1 V 45 650 0 3 1 1 B L 0 0 SCRATCH CONCAT B 30 16 V 110 102 3 5 226 8 L 0 SCRATCH CONCAT R 50 4 12 SCRATCH CONCAT F 2 A R E 200 400 034Receive 034 SCRATCH CONCAT B 1 12 F 92 110 4 12 50 8 L 0 SCRATCH CONCAT C 165 27 0 50 9 9 A L 0 0 034LOT 6741 034 1 SCRATCH Sample Script A 3 CONCAT CONCAT CONCAT CONCAT CONCAT CONCAT CONCAT CONcaT CONCAT CONCAT CONCAT CONCAT CONCAT parse return End A 4 Sample Script C 166 238 0 50 9 9 A L 0 0 034QTY 48 034 SCRATCH C 75 107 0 510 1 1 B L 0 0 034744148022201 034 SCRATCH C 52 132 0 50 8 8 A L 0 0 03402 22 01 15 29 034 1 SCRATCH T 2 20 V 29 123 0 50 8 8 A L 0 0 1 SCRATCH F 3 A R E 300 200 034Sale 034 SCRATCH B 1 13 F 99 52 7 2 40 7 L 0 SCRATCH C 279 28 0 510 1 1 B L 0 0 034063 DEPT 25 034 SCRATCH T 2 15 V 243 61 0 50 10 10 A L 0 0 1 SCRATCH T 3 8 V 215 71 0 50 10 10 A L 0 0 1 SCRATCH C 187 78 0 50 10 10 A L 0 0 034RED 034 1 SCRATCH C 162 51 0 50 10 10 A L 0 0 034COTTON RAMIE 034 1 SCRATCH C 75 14 0 50 11 11 A L 0 0 034WAS 39 99 034 1 SCRATCH C 46 16 0 50
26. 56 950 356 6 034 034 SCRATCH CONCAT L S 643 13 643 796 6 034 034 SCRATCH CONCAT T 7 6 V 45 257 0 3 1 1 B L 0 0 SCRATCH CONCAT R 1 034028028 034 SCRATCH CONCAT T 8 5 V 45 468 0 3 1 1 B L 0 0 SCRATCH CONCAT T 9 1 V 45 124 0 3 1 1 B L 0 0 SCRATCH CONCAT T 10 8 V 592 325 0 50 12 10 B L 0 0 SCRATCH CONCAT T 11 10 V 700 417 0 50 20 20 B L 0 0 SCRATCH CONCAT T 12 6 V 781 346 0 50 20 20 B L 0 0 SCRATCH CONCAT T 13 40 V 500 51 0 50 12 10 B L 0 0 SCRATCH CONCAT T 14 20 V 971 376 0 50 14 12 B L 0 0 SCRATCH CONCAT T 15 19 V 998 11 0 50 12 10 B L 0 0 SCRATCH CONCAT R 1 O034MIAMISBURG 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 CONCAT R 1 034SELLING UNIT 034 SCRATCH CONCAT T 23 13 V 700 21 0 50 15 15 B L 0 0 SCRATCH CONCAT R 1 034VENDOR STYLE 034 SCRATCH CONCAT T 24 8 V 876 41 0 50 24 20 B L 0 0 SCRATCH CONCAT R 1 034MYSTORE 034 SCRATCH CONCAT T 25 10 V 782 21
27. 91 Data Coding 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 For example 91 a two byte character string according to printer data storage rules could appear as the ninety first character on the ASCII chart There are two commands you can use in your script when encoding and decoding data according to this method Command Description ASC Takes an ASCII character and returns the number corresponding to it on the ASCII chart CHR Takes a number from 0 255 and returns the corresponding character on the ASCII chart Consider the following code sample DEFINE TEMPORARY QTY1 3 A Alpha Temp field DEFINE TEMPORARY QTY2 3 N Numeric Temp field MOVE QTY1 Now contains ASC QTY1 QTY2 Decodes to 125 INC QTY2 Increments 125 to 126 CHR QTY2 QTY1 Encodes 126 to This sample demonstrates how to decode a number use the number in a computation and encode the result back to a character 4 4 Program Structure COMMAND REFERENCE D 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 Programming Conventions The commands use the following conventions A EYWORDS Place holders optional Example label
28. ALL CHECK DELAY EXIT IF JUMP RETURN SWITCH SYSSET WHILE Calls a section of code as a subroutine Checks the status of system parameters Delays the current script for a specified time Leaves the current script If the printer re enters the script control passes to the script s first line Performs a series of one or more commands based on the existence of a condition Transfers control to a label Exits a subroutine Branches to a set of commands based on the value of a variable Sets system parameters Repeats a series of one or more commands based on the existence of a condition Compiler Directives DEFINE INCLUDE LINKFILE MACRO Defines the field definitions for the buffers Inserts the source statements in the file into the current script Links formats to the script so they can download to the printer Defines or invokes a program for a repeating process Command Reference 5 5 Data Manipulation Commands ARGREAD ASC BITCLEAR BITMASK BITSET BITSHIFT BITTEST CHARTYPE CHR CLEAR COMPARE CONCAT CSTRIP DATATYPE FIELDLEN GENERATE INSERT LEFT LOWER LSTRIP MID MOVE PAD PARSE RIGHT RSTRIP TOKEN TSTRIP UPPER VALIDATE Extracts an argument from a comma delimited string Converts ASCII data from a numeric format to an alphanumeric format Sets the specified bit to zero Allows bit logical operations on buffers Sets the specified bit to one Allows bits within a
29. CHECK Purpose Syntax Process Checks the status of a specified system parameter CHECK tem buffer field invalid label valid label The CHECK command checks the status of tem tem can be one of the following Item BATTERY COMM PRINT Buffer field is required if item is COMM or PRINT Description Battery Voltage Communications Port Print It is a field where the status of the parameter is returned Following are the possible status values Item Value Description COMM 0 OK 1 User Aborted 400 Invalid Packet Received 406 Response Time out 410 Parity Error 411 Communications Error framing overrun 413 Input Buffer Full XON not acknowledged PRINT 0 Good 1 User Aborted 750 Hot Printed 751 Jam 762 Battery Voltage Too Low to Print 770 Motor not Ready 771 Format not Found Command Reference 5 23 Buffer field can be one of the following Buffer field INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Optional Fields nva id and valid labels are discussed in Script Flow at the beginning of this chapter Example This example checks the battery level If the level is low control of the application branches to the LOWBATTERY label CHECK BATTERY LOWBATTERY 5 24 Command Reference CHR Purp
30. CTFILE DATATYPE DATE DATELEN DEC DEFINE DELAY DELIMITER DISABLE DISPLAY DIVIDE DOWNLOAD DTRDTE ECHOBELL ELSE ELSEIF ENABLE END ENDIF ENDSWITCH ENDWHILE ENTER EVEN EXECUTE EXIT F1 F2 F3 F4 F5 F6 FAILSAFE FETCH FIELDLEN FIXDATA FORMAT FUNCTION GENERATE GET HEADER HOTKEY IF IMAGEBUFFER IMAGEFIELD INC INCLUDE INPUT INPUTTEMPLATE INSERT JUMP KEYBOARD LABELCOUNT 5 2 Command Reference LEFT LINKFILE LINKFMT LOCATE LOOKUP LOOKUPDEF LOOKUPFILE LOOKUPSIZE LOWER LSTRIP MACRO MARK MID MOVE MULTIPLE MULTIPLY NONE NUMBERPRINTED ODD ONDEMAND OPENCOMM PACKRECORDS PAD PARITY PARSE PRINT PRINTER PROMPTS QUERY RAM RAVAIL RCLOSE READ RECORDDELETE RESPONSE RESTORESCREEN RETURN REVVID RIGHT ROPEN RREAD RSTRIP RTSCTS RWRITE SAVESCREEN SCANLEN SCANNER SCRATCH SEEK SETDATE SHUTDOWN SKIP SPACE START STATUSPOLLING STOPBITS STRIPS SUB SUSPEND SWITCH SYSSET SYMBOL TEMPORARY TOKEN TRIGGER TRIGGERENABLE TSTRIP UPLOAD UPLOADDEF UPPER VALIDATE WHILE WRITE XONXOFF NOTE Not all of these keywords apply to the 9460 printer however they are still reserved by the compiler Command Reference 5 3 Special Characters The following special characters are reserved for the printer Do not use them in your script 1 left brace underscore pipe or split vertical bar right brace tilde backslash grave accent However you can use these c
31. DATE Purpose Syntax Process Optional Fields Example See A so Validates a check digit based on check digit scheme VALIDATE source type invalid label valid abel The VALIDATE command validates the check digit in source based on the check digit scheme specified by type Source and Type can be one of the following Source and Type INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Number Source only String Logical Field Name Field1 Index Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Number prefixed by a number sign An ASCII string delimited with double quotes Array Buffer Field Type must be prefixed with a sign and can have one of the following values ID 1 2 3 4 5 6 7 8 Scheme Reserved Sum of Digits Sum of Products Reserved Custom Check Digit 1 Custom Check Digit 2 Custom Check Digit 3 Custom Check Digit 4 Custom Check Digit 5 Custom Check Digit 6 Custom Check Digit 7 Custom Check Digit 8 Custom Check Digit 9 Custom Check Digit 10 UPCA Check Digit UPCE Check Digit ID 17 18 19 20 21 22 23 24 Scheme 8 Check Digit EAN13 Check Digit LAC Check Digit Code 39 Check Digit MSI Check Digit Postnet UPC Price CD EAN Price CD Invalid and valid labels are discussed in
32. ETURN reene E E ideas 5 72 RIGHT ae 5 73 D QE M M Se CM E OD 5 74 SAVESGBBEN bou ue CODEC E acs 5 75 DEE Rated ese MP 5 76 UB cee C C I 5 77 Table of Contents 3 SYSSETI ned ttu M Cui D SELL D E 5 80 TORE N ec TEE 5 82 THR Pt re ne electo nsn tates fadi 5 83 UPPER E bom ete 5 84 VAEIDNTES a dtt a SLM 5 85 WHILE 5 86 AD MEI DL IM IMs i A 1 4 Table of Contents OVERVIEW The Application Development Kit ADK2 is a product for Microsoft Windows 95 98 Me NT 2000 It allows you to create an application program to run on the printer You write the script with the ADK2 command language You can program the printer to print labels or tags print data streams written for other printers 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 or Quick Reference for printer specific information Refer to the Packet Reference Manual fo
33. INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Buffer field1 only String Number Buffer field2 must be numeric 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 Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example places the length of WHOLESALE into TEMP2 Control passes to the next line FIELDLEN WHOLESALE TEMP2 Command Reference 5 41 FIXDATA Purpose Syntax FIXDATA buffer field1 Process Defines fixed data for an input buffer The FIXDATA command defines fixed data for the input buffer Use this command with the CHARTYPE command which provides a template Buffer field contains a string inserted into the input buffer Buffer field can be one of the following Buffer Field1 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index String Number Rules 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 Spaces in a string represent fixed spaces An underscore is a place holder for varia
34. If 5b t position is out of range and nva id abel is Purpose Sets the specified bit to one Syntax Process defined control passes to that label RULE Both 5buffer field 1 and b t position must be numeric Buffer field and bit position can be one of the following Buffer field and bit position INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Asc field only Number String SCRATCH Optional Fields Example BITSET TEMP1 2 See Also BITCLEAR BITMASK BITSHIFT BITTEST 5 16 Command Reference 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 Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example sets bit number two of TEMP1 to one BITSHIFT Purpose Syntax Process RULE Optional Fields Example See Also Allows bits within a value to be arithmetically shifted left or right BITSHIFT direction buffer field 1 count invalid label valid label The BITSHIFT command allows bits within a value to be arithmetically shifted left or right Shifts count bits in buffer field in the direction specified by direction Count can be 1 to 16 If buffer field contains an invalid value or the count field
35. Mon arch 9460 ADK Printer TAB 10 CURTAINS 4 poze Ww TA pe TOP o CURTAINS 4 poZEN wh oP curt pins 4 poze vin Y DENNISON TC94 60ADK PM R ev AC 1 08 200 3 Pax ar Ameri ricas N Inc a subsidiary of Ave ison Co rp All ri ights re served Each product and program carries a respective written warranty the only warranty on which the customer can rely Paxar reserves the right to make changes in the product and the programs and their availability at any time and without notice Although Paxar has made every effort to provide complete and accurate information in this manual Paxar shall not be liable for any omissions or inaccuracies Any update will be incorporated in a later edition of this manual 2003 Paxar Americas Inc a subsidiary of Avery Dennison Corp All rights reserved No part of this publication may be reproduced transmitted stored in a retrieval system or translated into any language in any form by any means without the written permission of Paxar Americas Inc Trademarks Monarch Sierra Sport and 9433 are trademarks of Paxar Americas Inc Paxar is a trademark of Paxar Corporation Avery DennisonG is a trademark of Avery Dennison Corporation Microsoft Windows and NT are trademarks of Microsoft Corporation Avery Dennison Printer Systems Division 170 Monarch Lane Miamisburg OH 45342 TABLE OF CONTENTS
36. Script Flow earlier in this chapter 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 LOWER Command Reference 5 85 WHILE Purpose Syntax Process NOTE Repeats a sequence of commands as long as a condition is true WHILE buffer field1 comparison buffer field2 ENDWHILE The WHILE command repeats a sequence of commands as long as a condition is true If the condition is true the script executes the commands listed between WHILE and ENDWHILE When script reaches ENDWHILE it checks the condition again If the condition still exists it executes the commands again If the condition is false the script branches to the line after ENDWHILE Buffer field and buffer field2 are the compared items in the condition They can be one of the following Buffer field Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Number Number prefixed by a number sign String ASCII string delimited by double quotes Must be one character long Comparison is the operator used to compare buffer field1 and buffer field2 t can be one of the following Comparison Description Equals Equals lt gt Not equal Iz Not equal gt Greater than gt Greater than or equal lt Less
37. Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Scratch Buffer Field An ASCII string delimited by double quotes A number prefixed by a number sign Invalid and valid labels are discussed in Script Flow at the beginning of this Example chapter The exception is as follows 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 GETTOKEN TOKEN TASOURCE TATOKEN DONE MOVE TATOKEN DISPLAY JUMP GETTOKEN DONE 5 82 Command Reference TSTRIP Purpose Syntax Process Optional Fields Example See A so Strips characters from a field based on a template TSTRIP buffer field1 buffer field2 invalid label valid label The TSTRIP command strips data from buffer field as specified by buffer field2 Buffer field2 contains a template that has a series of numbers and underscore characters The printer matches the buffer fie d7 with the template resulting in new data as follows If the characters in the same position match they are stripped Ifthe template has an underscore character the printer does not strip that character Ifthe character is the same position do not match they are are not stripped Buffer field and buffer field2 can be one of the following Buffer field an
38. ameter1 Parameter2 PROMPTS 1 English n a The language to use for 2 3 Downloaded the printer s prompts Foreign 4 Alternate BAUDRATE 19 2K 9600 4800 n a The rate for data 2400 1200 transfers Do Not precede with FLOWCONTROL NONE DTR RTSCTS n a The flow control for XONOFF Do Not data transfers enclose in quotes PARITY ODD EVEN MARK n a The parity for data SPACE None Do Not transfers enclose in quotes STATUSPOLLING 0 Disabled n a Perform status polling 1 Enabled during data transfers STOPBIT 10r2 n a The number of stop bits for data transfers DATABITS 70r8 n a The number if data bits for data transfers ONDEMAND 0 Disabled n a Print labels only when 1 Enabled requested BACKLIGHT 0 Disabled n a Enables or disables this 1 Enabled parameter If enabled 2 480 Timeout sets the number of seconds without activity before the backlight turns off automatically 5 80 Command Reference Example 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 IMMEDCMD Enables or disables the processing of immediate commands and specifies the character Parameter1
39. at Function Comply Begin MOVE B 1 N 1 8 03466598 034 SCRATCH CONCAT 9 0340 034 SCRATCH CONCAT 10 403436 034 SCRATCH CONCAT 11 0342508 09505 034 SCRATCH CONCAT 12 034950330 034 SCRATCH CONCAT 13 034FISHING ROD 034 SCRATCH CONCAT 14 0340H 45001 034 SCRATCH CONCAT 16 034LIMA 034 SCRATCH CONCAT 17 034123 US 35 034 SCRATCH CONCAT 18 034MYSTORE 034 SCRATCH CONCAT 29 40348 034 SCRATCH CONCAT 30 0340000028028665988 034 SCRATCH parse clear INPUT return End The Receiving function contains the batch data for the receiving format Function Receiving Begin move B 2 N 1 1 034674148022201 034 SCRATCH CONCAT 2 034BULK TOMATO PASTE 034 SCRATCH parse clear INPUT return End The Sale function contains the batch data for the sale format Function Sale Begin move B 3 N 1 1 0340632253993005 034 SCRATCH CONCAT 2 034SWEATER 034 SCRATCH CONCAT 3 034SMALL 034 SCRATCH parse clear INPUT return End A 2 Sample Script The SendFmt function moves the three formats into the scratch buffer The batch data is sent when the user sends a C R or S character Function SendFmt Begin move F 1 A R G 1218 0812 034Comply 034 SCRATCH CONCAT L S 89 59 89 749 16 034 034 SCRATCH CONCAT L S 341 59 341 749 16 034 034 SCRATCH CONCAT L S 440 13 440 796 6 034 034 SCRATCH CONCAT L S 947 13 947 796 7 034 034 SCRATCH CONCAT L S 1205 3
40. ble data Example This example creates a template for a telephone number The CHARTYPE command could define the variable characters as numeric FIXDATA z CHARTYPE TSTRIP See Also 5 42 Command Reference GENERATE Purpose Syntax Process Rule Optional Fields Example Generates a check digit GENERATE buffer field type invalid label valid label The GENERATE command generates a check digit for the value in buffer field Type specifies the check digit scheme to use Buffer field and type can be one of the following Buffer field and Type INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Buffer field only Logical Field Name Field1 Index Type Only Number Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number from 1 24 prefixed by a number sign When it is a buffer field type must be numeric Following are the meanings of each value type can have 1 Reserved 13 Custom Check Digit 9 2 Sum of Digits 14 Custom Check Digit 10 3 Sum of Products 15 UPCA Check Digit 4 Reserved 16 UPCE Check Digit 5 Custom Check Digit 1 17 EAN8 Check Digit 6 Custom Check Digit 2 18 EAN13 Check Digit 7 Custom Check Digit 3 19 LAC Check Digit 8 Custom Check Digit 4 20 Code 39 Check Digit 9 C
41. cess Rule Optional Fields Example See A so Copies the current record from the lookup file into the appropriate working buffer READ record table name invalid label valid label The READ command copies the current record into the appropriate working buffer specified by record After the script copies the current record into the buffer the pointer advances to the next record in the file 7ab e name selects which lookup table to read Record can be one of the following Record LOOKUP Description Copies the Lookup Table record into the Lookup Buffer A successful read increments the file pointer to the next record Invalid and valid labels are discussed in Script Flow at the beginning of this chapter The exception is as follows If there is no record to read or the current record is pointing to a different record type and nva id label is defined control passes to that label This example shows how the software copies the current lookup table record into the lookup table buffer Control passes to the next line READ LOOKUP BSEARCH QUERY SEEK 5 70 Command Reference RESTORESCREEN Purpose Syntax Process Example See A so Re displays a previously saved screen RESTORESCREEN 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 st
42. condNum MOVE TsecondNum Tsum END See Also RETURN Command Reference 5 21 CHARTYPE Purpose Syntax Process NOTE Example See Also Allows you to limit the character type for an input buffer CHARTYPE type buffer fiela1 The CHARTYPE command restricts the character type applied to an input buffer using type and buffer field 1 This command does not affect the FETCH command Type describes the contents of buffer fie d7 It can be one of the following Description Set of allowable characters for input field T Template mask for input buffer Buffer field contains either a set of allowable characters for the input field or a template mask It can be one of the following Buffer field1 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Number A number prefixed by the number sign String ASCII string delimited by double quotes Valid characters for a template mask are Type Description i Any valid character Numeric Alpha character Skip input for fixed data This example restricts a template input field to accept one alphanumeric character four numeric characters fixed data followed by two more numeric characters For example 9999 99 CHARTYPE T GQ di FIXDATA 5 22 Command Reference
43. d Buffer field2 Description INPUT Input Buffer Logical Field Name TEMP1 Temporary Buffer Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Buffer field2 only String An ASCII string delimited with double quotes Invalid and valid labels are discussed in Script Flow at the beginning of this chapter TSTRIP SHIP NO 1 66 In this example assume 123456 is in the SHIP NO field It matches up to the template as follows Original Data 123456 Template 1 66 New Data 2345 Position Match Description 1 1 matches 1 so the number is stripped 2 Underscore keeps the 2 3 Underscore keeps the 3 4 Underscore keeps the 4 5 5 does not match 6 so the number is kept 6 6 matches 6 so the number is stripped CSTRIP RSTRIP LSTRIP Command Reference 5 83 UPPER Purpose Syntax Process Example See A so Converts the specified field to upper case characters UPPER source The UPPER command converts source to upper case characters Source can be one of the following Source INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field This example converts any lower case characters in TEMP SKU to upper case UPPER TEMP SKU LOWER 5 84 Command Reference VALI
44. e FETCH command if both minimum and maximum equal zero Type specifies the input s character type as Description Numeric only A Alphanumeric Type overrides what you set up with the DATATYPE and CHARTYPE commands Alphanumeric is the default for type only when you do not set up a type with DATATYPE or CHARTYPE Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example retrieves data from the communications port GET COMM 40 4255 FETCH 5 44 Command Reference HOTKEY Purpose Defines hot keys Syntax HOTKEY key function name Process The HOTKEY command defines Key specifying that the application should call function name when the operator presses it Key can be one of the following Key Description F1 Function Key 1 F2 Function Key 2 F3 Function Key 3 Example This example specifies that when the operator presses F3 the application calls the QUERY LOOKUP function HOTKEY F3 QUERY LOOKUP See Also DISABLE ENABLE Command Reference 5 45 IF Purpose Syntax Process NOTE Performs a series of one or more commands if a certain condition exists IF buffer field comparison buffer field2 ELSEIF buffer field2 comparison buffer field4 ELSE ENDIF The IF command directs script flow by determining if a condition or series of conditions exist A condition is specified by comparing buffer fields If the comparison is true the condition exi
45. e buffer fie d fields can be one of the following Buffer field 1 and 2 Description INPUT Input Buffer Logical Field Name TEMP1 Temporary Buffer Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Field1 Index Array Buffer Field Buffer fieldt only Number prefixed by the number sign Both fields must be numeric The DEFINE command defines the index Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example adds the contents of WHOLESALE to TEMP2 Control passes to the next line ADD WHOLESALE TEMP2 This example assigns TEMP1 the sum of CONTROL and TEMP1 If TEMP1 overflows control passes to the invalid label ERROR2 If TEMP1 does not overflow control passes to the next line ADD CONTROL TEMP1 ERROR2 DEC INC SUB MULTIPLY DIVIDE 5 8 Command Reference APPVERSION Purpose Sets the version string of the ADK application Syntax APPVERSION string string Process The APPVERSION command has string1 appear on the screen s first line and string2 on the screen s second line String and string2 can be up to 16 characters long Example This example displays AP11 on the screen s first line and VER 1 0 on the second line APPVERSION AP11 VER 1 0 Command Reference 5 9 ARGREAD Purpose Syntax Process Optional Fields Example Extracts field data from one field and
46. e in buffer fie d2 and logically combine it with the contents of buffer field7 The result is stored in buffer field7 The INVERT operation inverts all bits in buffer field7 lf buffer field1 or buffer field2 and invalid label are defined control passes to that label If the operation is successful and va d label is defined control passes to that label Both buffer field1 and buffer fie d2 must be numeric Operation can be one of the following Operation Description AND Logical And OR Logical Or XOR Logical Exclusive Or INVERT Invert all bits Buffer field 1 and buffer field2 can be one of the following Buffer field and Buffer Description field2 INPUT Input Buffer Logical Field Name TEMP1 Temporary Buffer Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Field1 Array Buffer Field Index Asc field only Number A number prefixed by the number sign String ASCII string delimited by double quotes SCRATCH Scratch buffer Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example strips the high 8 bits from TEMP1 BITMASK AND TEMP1 255 BITCLEAR BITSET BITSHIFT BITTEST Command Reference 5 15 BITSET BITSET buffer field1 bit position invalid label valid label The BITSET command sets the specified bit by b t position in buffer field to one Bit position can be 0 to 15
47. e printer status information such as error messages Only select this mode if your printer supports IEEE 1284 and it is enabled your computer supports ECP mode and ECP mode is enabled on your computer s parallel port This is typically selected in your computer s BIOS setup which is normally accessed whenever you turn on your computer This screen appears differently for Microsoft Windows NT and Windows 2000 users Windows NT Use the Direct Memory Access DMA channel assigned to your LPT port The DMA normally defaults to 3 This can be changed in your computer s BIOS setup For Windows 2000 Use the Direct Memory Access DMA channel assigned to your LPT port The DMA normally defaults to 3 Enable the LPT port s Interrupts using Device Manager 5 Make a choice and click when finished 2 6 Using the Software If you select TCPIP TCP IP Settings Printer s TCP IP Settings Printer s IP Address Printer s Port Uh Bi Directional 5 4 Enter your printer s TCP IP Address See your System Administrator for more information 5 Enter your printer s TCP IP Port typically 9100 See your System Administrator for more information 6 Determine appropriate bi directional setting Disabled Unchecked is for uni directional communications With this mode you can send files to your printer but you will not receive printer status information Disable Uncheck this selection if you are unsure
48. ectory for use in the current project 1 Highlight the Formats directory 2 Right mouse click and select Add Files to Folder 3 Locate and select the format to add Click Open NOTE You must use the LINKFILE command in the script to include the format Example Define SCRATCH 5000 A LINKFILE c ADKProjects MyStore Formats shipping fmt Function Start Begin 2 4 Using the Software Lookups Add lookup tables to the Lookups directory for use in the current project 1 Highlight the Lookups directory 2 Right mouse click and select Add Files to Folder 3 Locate and select the lookup table to add Click Open NOTE If you do not use the LOOKUPDEF command in the script when the script is downloaded you are prompted for the lookup file Example Define SCRATCH 5000 A LOOKUPDEF c ADKProjects MyStore Lookups prices txt Function Start Begin Building Projects When a script has been marked as the Main script you are ready to build 1 Select Build from the Project Menu 2 The Builder Output portion of the screen shows different types of messages Build Successful Build Aborted Syntax Error etc A successfully built project file is saved with a CFU extension NOTE You can select Properties from the Project Menu to change file extension 3 Specify the download settings 4 Download the built file to the printer Changing the Download Settings Before downloading a project to the printer make sure the download settings a
49. eld Array Buffer Field Number prefixed by a number sign ASCII string delimited by double quotes Must be one character long If max length is a buffer field it must be numeric This example inserts asterisks to the left of the data in PRICEFIELD PAD L PRICEFIELD LPRICE This example inserts blanks to the right of the data PAD R LDESC 2 Command Reference 5 65 PARSE Purpose Syntax Process NOTE Optional Fields Example NOTE Processes an MPCL data stream in the scratch buffer PARSE label valid label 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 You must place an MPCL data stream in the scratch buffer before calling this command Avoid using the PARSE command to send individual characters use the CONCAT command to append data into the scratch buffer Then send all the data at once using the PARSE command Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example moves an MPCL data stream to the scratch buffer then processes the data stream MOVE F 1 A N E 200 200 FMT1 SCRATCH CONCAT C 146 50 0 10 2 1 B L 0 0 PAT S PARTS 1 SCRATCH CONCAT T 1 10 V 100 50 0 1013
50. en LOCATE 1 2 Command Reference 5 55 LOWER Purpose Syntax Process Example See A so Converts characters in a field from upper case to lower case LOWER source The LOWER command converts characters in source to lower case characters Source can be one of the following Source Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index This example converts any upper case characters in TEMP SKU to lower case characters LOWER TEMP SKU UPPER 5 56 Command Reference LSTRIP Purpose Syntax Process Optional Fields Example See A so Strips characters from a field and copies the remaining characters to another field LSTRIP ie d buffer1 field buffer2 field buffer3 invalid label valid label The LSTRIP command strips the left most characters from fie d buffer and copies the remaining characters to e d buffer2 Field buffer3 is the number of characters to strip Field buffer1 field buffer2 and field buffer3 can be one of the following Field buffer1 Field Buffer2 and Field Buffer3 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Field buffer and Field buffer2 only String Field buffer3 only Number Description Input Buffer Temporar
51. fer field1 only String Buffer field1 start and length only Number SCRATCH 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 Command Reference 5 61 Destination can be one of the following Destination INPUT DISPLAY SCRATCH Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Buffer field1 start and length only Number Buffer field1 only String Description Input Buffer The Printer s Screen Scratch Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by a number sign ASCII string delimited by double quotes You can move a numeric field into an alphanumeric field However you cannot move an alphanumeric field into a numeric field Optional Fields chapter Example 1 MOVE INPUT CONTROL ID 5 62 Command Reference Invalid and valid labels are discussed in Script Flow at the beginning of this This example copies the data from the Input Buffer to CONTROL ID MULTIPLY Purpose Multiplies the contents of one field by the contents of another Syntax MULTIPLY buffer field buffer field2 invalid label valid label Process The MULTIPLY command multiplies buffer field1 by buffer f
52. haracters in a string with quotation marks Use the tilde character along with the corresponding ASCII code in strings to represent non printable characters For example 013 represents a carriage return The tilde sequence also works for using a double quote in a quoted string in a command parameter For example to move a double quote to the scratch buffer enter MOVE 034 SCRATCH Script Flow Script flow branches out to other functions and labels depending on whether a command was successful or if it failed When a label is defined If a command was successful and a valid label is defined control passes to that label l fa command fails and an invalid label is defined control passes to that label When a label is NOT defined If a command was successful control passes to the next line Ifa command fails control passes to the next line 5 4 Command Reference Functional Relationships Some commands logically work together or are related in function The commands are discussed in the following functional groups Math Commands ADD DEC DIVIDE INC MULTIPLY SUB Adds the numeric values of two fields Decrements numeric fields Divides the contents of one field by the contents of another Increments numeric fields Multiplies the contents of one field by the contents of another field Subtracts the contents of one field from the contents of another field Script Control Commands C
53. ield2 inserting the product into buffer field2 The maximum value for the buffer field1 buffer field2 and the result is 429 496 795 The buffer field fields can be one the following Buffer field and 2 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Buffer field1 only Number Number prefixed by a number sign Rule The buffer fie d fields must be numeric Optional Fields nva id and valid labels are discussed in Script Flow at the beginning of this chapter Example This example multiplies PRICE by TEMP1 inserting the product into TEMP1 If overflows control passes to ERROR2 If TEMP1 does not overflow control passes to the next line MULTIPLY PRICE TEMP1 ERROR2 See Also DIVIDE INC SUB ADD DEC Command Reference 5 63 OPENCOMM Purpose Opens either the primary or secondary communications port The port stays open until it is closed with CLOSECOMM Syntax OPENCOMM commport timeout Process The OPENCOMM command opens the communications port referenced by commport 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 A timeout
54. inter Buffer Field Logical Field Name Array Buffer Field Field1 Index Buffer field1 only Number Number prefixed by a number sign Only numeric fields are allowed Invalid and valid labels are discussed in Script Flow at the beginning of this chapter The exception is as follows If buffer field2 becomes negative and nva id label is defined control passes to that label This example subtracts the contents of CONTROL ID from TEMP1 Then control passes to the next line SUB CONTROL ID TEMP1 ADD DEC INC MULTIPLY DIVIDE Command Reference 5 77 SWITCH Purpose variable SWITCH buffer field7 CASE buffer field Syntax CASE buffer field DEFAULT ENDSWITCH Process Directs script flow by branching to a set of commands based on the value of a The SWITCH command directs script flow by branching to a set of commands based on the value of a variable The command compares buffer f ield1 to the buffer field listed with each case command If the fields are equal the script executes the commands following the CASE command Execution stops when the script reaches the next CASE DEFAULT or ENDSWITCH If no buffer field fields match buffer fie d7 the script executes the set of commands after DEFAULT NOTE There is no BREAK command to terminate CASE blocks so this command does not support CASE fall through Also Do Not use SWITCH inside a macro The buffer field fields can be one of the fo
55. kup Buffer Field Logical Field Name Field1 Index Array Buffer Field Logical Field Name NUMBERPRINTED Printer Buffer Field Number of labels printed INPUTTEMPLATE Input Template Chartype and DataType settings SCRATCH Scratch Buffer COMM Communications port This example clears the Printer Buffer and passes control to the next line CLEAR PRINTER This example clears temporary buffer field TEMP1 and passes control to the next line CLEAR TEMP1 5 26 Command Reference CLOSECOMM Purpose Syntax Process Example See Also Closes either the primary or secondary communications port CLOSECOMM commport The CLOSECOMM command closes communications port referenced by commport It can contain 1 for the primary port or 2 for the secondary port Commport is the communications port to close It can be one of the following Commport INPUT Logical Field Name PR1 Logical Field Name TEMP1 Logical Field Name LU1 Number Description Input Buffer Printer Buffer Field Temporary Buffer Field Lookup Buffer Field A number prefixed by a pound 2 sign This example closes the primary communications port CLOSECOMM 1 OPENCOMM Command Reference 5 27 COMPARE Purpose Syntax Process Rule Optional Fields Rules Example Compares the contents of two fields COMPARE obuffer field modifier buffer field2 invalid label valid label
56. kup tables If the search is successful the pointer points to the record and control passes to valid label if defined If the search is unsuccessful the pointer is undefined and control passes to nva id label if defined Otherwise control passes to the next line You must sort the lookup table before downloading it to the printer Lookup field is the search field s logical name in the lookup table Value is the value you are searching the field for and can be one of the following Value INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Number String Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field A number prefixed by the number sign A one character ASCII string delimited by double quotes Lookup fie d and value must have the same data type Invalid and valid labels are discussed in Script Flow at the beginning this chapter This example searches CONTROL for the input buffer s contents If no match is found control transfers to the ERROR D label BSEARCH CONTROL ID INPUT ERROR ID Command Reference 5 19 CALL The CALL command executes an out of line function After execution control returns to the command following the CALL command The CALL function allows parameters to passed to the called function The called function function name
57. llowing Buffer field INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Number String 5 78 Command Reference 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 Example This example compares the Input Buffer s contents to lt lt gt gt 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 SWITCH INPUT CASE CALL CALL CASE CALL CALL CASE z CALL DEFAULT BEEP ENDSWITCH See A so IF WHILE SCROLLUP DISPLAYMENU SCROLLDOWN DISPLAYMENU SELECTMENUITEM Command Reference 5 79 SYSSET Purpose Sets the printer s default parameters Syntax SYSSET function parameter1 parameter2 Process The SYSSET command sets the function parameter with the parameter value and if applicable the parameter2 value If parameter and parameter2 are both buffer fields they must be numeric If they are a constant precede it with a number sign 4 except where noted The function parameter and parameter2 fields can be one of the following Function Description Par
58. lue of TASTATE If it contains OHIO the first MOVE command copies TASTATE to PASTATE Otherwise the second MOVE command copies the string Out of State to PASTATE IF TASTATE OHIO MOVE TASTATE PASTATE ELSE MOVE Out of State PASTATE ENDIF COMPARE SWITCH WHILE Command Reference 5 47 INC Purpose Syntax Process Rule Optional Fields Example See Also Increments numeric fields by one INC buffer field invalid label valid label The INC command increments buffer field Buffer field can be one of the following Buffer Field1 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Buffer field must be numeric A translation error occurs if you increment an alphanumeric field Invalid and valid labels are discussed in Script Flow at the beginning of this chapter If you increment an uninitialized field the software sets buffer field to 1 and control passes to nvalid label f the field overflows control also passes to nva id label This example increments COUNTO1 INC COUNTO1 ADD DEC SUB MULTIPLY DIVIDE 5 48 Command Reference INCLUDE Purpose Syntax Process Rule Example 1 Example 2 Inserts another source file into the script INCLUDE pathname The INCLUDE command sig
59. me is the field s logical name and is under the same restrictions as any other identifier Field length is the buffer field s size in bytes Enter a value from 1 to 2800 If you re defining a scratch buffer the maximum is 65535 Although individual lookup table fields can be up to 2800 bytes long lookup table records cannot exceed 128K If a DEFINE TEMPORARY statement is placed inside the BEGIN END pair of a function that variable can only be referenced within that function and not by any other function Logical name is used to define multiple lookup tables Each name must be unique over all lookup tables used by the script and in parentheses The default name is lookup Number of elements is required when the e d type is set to ARRAY Data type is the kind of data the buffer field holds Enter A for alphanumeric or N for numeric The default is A If field type is PRINTER data type must be A Command Reference 5 33 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 The Tsum variable is defined as a global Temporary variable and is accessible from any fu
60. must have a DEFINE LOCAL for local storage for each parameter that is passed to it The parameters will be placed from left to right with the leftmost parameter Lookup Buffer Field Printer Buffer Field ASCII string delimited Number prefixed by a Purpose Calls a section of code as a subroutine Syntax CALL function name parami param2 paramX Process placed in the first DEFINE LOCAL variable Rules You may nest up to 25 CALL commands The param fields can be one of the following Param Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Array Buffer Field Field1 Index String by double quotes Number number sign Scratch Scratch buffer Example 7 This example calls the subroutine COMPUTE_TAX CALL COMPUTE TAX 5 20 Command Reference 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 The TSum variable is defined as a global Temporary variable and is accessible from any functions in the script DEFINE TEMPORARY TSum 10 N FUNCTION START BEGIN CALL ADDNUM 5 6 END FUNCTION ADDNUM BEGIN DEFINE LOCAL TfirstNum 10 N DEFINE LOCAL TsecondNum 10 N ADD TfirstNum Tse
61. n Optional Fields nva id and valid labels are discussed in Script Flow at the beginning of this chapter Example This example strips the five right most characters from the SHIP NO field and copies the remaining characters to the SKU field RSTRIP SHIP NO SKU 5 See A so LSTRIP CSTRIP TSTRIP 5 74 Command Reference SAVESCREEN Purpose Saves the contents of the current screen Syntax SAVESCREEN Process The SAVESCREEN command moves the contents of the current screen to the internal screen buffer The RESTORESCREEN command re displays the saved screen 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 SAVESCREEN See Also RESTORESCREEN Command Reference 5 75 SEEK Purpose Syntax Process Optional Fields Example 1 See A so Positions the record pointer within the lookup table SEEK modifier file type table name invalid label valid labe The SEEK command positions the record pointer within the lookup table according to modifier Modifier specifies the current record s placement and can be one of the following Modifier Description NEXT Advance to next record PREVIOUS Move to previous record START Reset to beginning of file END Advance to
62. n panes EUR Er em oe ds 5 38 y per 5 39 FETCH Peer stir eti atc ota abso de t Bex Pr 5 40 BIBL DEEN LE 5 41 FIXDATA erp ski oat qe ec Dacia n ase Die toD rod 5 42 GENERATE e M 5 43 LT LH ea Tere ee nae 5 44 DRO TINE ce 5 45 v 5 46 mc H RH 5 48 UN pede eo beet ead 5 49 lj iee M M 5 50 data rem ore ead be dub 5 51 LABEEGOHBNT cae ca 5 52 Bj re e TM 5 53 El iu Bz E 5 54 POG pesti nee ete teet pneri pss ydo 5 55 POW ED e EE ERN 5 56 Eg UP TUM 5 57 MACRO och quo ete ues Ar lute Sa eds ella satus a eura 5 58 me 5 60 SE uu Eu 5 61 MULTIPLY cp 5 63 OPENCOMM P 5 64 su ER 5 65 li cM E S 5 66 dr peior reine otia e e i Du a Lo qr uy tay 5 67 QUERY ecc 5 68 iix Dp ER 5 70 HESTORESGREEN irpo eO E bp Pep ED be t dpa ee seat 5 71 R
63. nals the compiler to insert the source statements located in the file pathname into the current script Nested INCLUDE statements are not allowed But multiple INCLUDE statements in one file are allowed This example inserts the source file TRUCKIN ULT into the current script INCLUDE TRUCKIN ULT This example inserts the source file SPECIAL ULT into the current script INCLUDE C PROGS SAMPLE SPECIAL ULT Command Reference 5 49 INSERT The INSERT command inserts data from buffer field1 into bufferfield2 at a specified Temporary Buffer Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by a number sign ASCII string delimited by double quotes Purpose Inserts data from one buffer into another Syntax INSERT overwrite flag buffer field1 buffer field2 position invalid label valid label Process position Overwrite flag can be one of the following Overwrite flag Description Insert data into field pushing existing data over O Overwrite existing data in field The buffer field fields can be one of the following Buffer Field and Description position INPUT Input Buffer Logical Field Name TEMP 1 Field Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Buffer field 1 and position only Number Buffer field1 only String Rule Position must be numeric Optional Fields If there is not enough room in buffer fie d2 control passe
64. nctions in the script DEFINE TEMPORARY Tsum 10 N FUNCTION START BEGIN CALL ADDNUM 5 6 END FUNCTION ADDNUM BEGIN DEFINE LOCAL TfirstNum 10 N DEFINE LOCAL TsecondNum 10 N ADD TfirstNum TsecoundNum MOVE TsecondNum Tsum END 5 34 Command Reference DELAY Purpose Syntax Process Rule Example 1 Example 2 Delays the current script for a specified time DELAY nterva The DELAY command suspends the printer s current script for the number of tenths of seconds specified by nterva The interval range is 1 255 Interval can be one of the following Interval Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Number Number prefixed by a number sign The nterva must be numeric This example suspends the current script for two seconds DELAY 20 This example suspends the current script for the number of tenths of seconds in TIMEOUT DELAY TIMEOUT Command Reference 5 35 DISABLE Purpose Syntax Process Example See Also Turns off the specified hot keys DISABLE otkey7 hotkeyA hotkey3 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 can be one of the follo
65. nd valid labels are discussed in Script Flow at the beginning of this chapter This example divides the contents of WHOLESALE by the contents of TEMP2 The quotient is inserted into TEMP2 Control passes to the next line DIVIDE WHOLESALE TEMP2 This example divides the contents of CONTROL by the contents of TEMP1 inserting the quotient into TEMP1 If an overflow condition occurs control passes to ERROR2 DIVIDE CONTROL TEMPI1 ERROR2 This example divides the contents of PRICE by 100 This operation is a method of converting cents to dollars If an overflow condition occurs control passes to ERROR2 DIVIDE PRICE 100 ERROR2 MULTIPLY Command Reference 5 37 ENABLE Purpose Syntax Process Example See Also Turns on the specified hot keys DISABLE otkey7 hotkeyA hotkey3 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 can be one of the following Hotkey1 Hotkey2 and Hotkey3 F1 F2 F3 ALL Description Function Key 1 Function Key 2 Function Key 3 All function keys This example disables the F1 F2 and F3 hot keys ENABLE F1 F2 F3 DISABLE HOTKEY 5 38 Command Reference EXIT Purpose Syntax Process Example Leaves the current script EXIT The EXIT command returns control back to normal printer operation unless you specif
66. nded system requirements Recommended Computer Personal computer with Microsoft Windows 95 98 Me NT 2000 Processor Pentium 150 Mhz Memory 32 Meg Disk space 5 10 Meg Communications Port Serial Printer Monarch Sierra Sport 2 Installing the Software l From the Start menu run the file SETUP EXE 2 Respond to the prompts as necessary Connecting the Printer Connect your printer to the PC using either a DBO9 to 9 pin part 12029314 or DB9 to 25 pin part 12029315 serial communications cable For more information about connecting the cable refer to your Operator s Handbook or Quick Heference Using the Software 2 1 Getting Started 1 Start the ADK2 software You will see ADK2 File View Project Help oela Hae Slo 5 e Bi xl Project Tree Working Area E Builder Output ie The screen has three major sections the Project Tree Working Area and Builder Output You can use the View menu to change which areas appear on your screen The Project Tree lists all the files in the open project See About Projects for more information The Working Area is the text editor for the files in the project The Builder Output lists any errors or messages that appear when you build the project 2 Start a new Project Select New from the Project Menu 3 Enter a name for the Project Press You will see the Project Properties screen Project Properties
67. ntaining a specific value Searches a lookup file to find a record containing a specific value Copies the current record from the lookup file into the appropriate working buffer Positions the current record within the lookup file Input Output Commands AUTOSTART Executes the script immediately after download is complete AVAILABLEDATA CLOSECOMM DISABLE ENABLE FETCH FIXDATA GET HOTKEY LABELCOUNT LOCATE OPENCOMM PRINT RESTORESCREEN SAVESCREEN Checks the communications port for available data Closes the communications port Turns off a particular hot key Turns on a particular hot key Retrieves one character from the communications port and places it in the input buffer Defines fixed data for an input buffer Retrieves data from the communications port Defines a particular hot key Tracks the number of labels printed Moves the cursor to a particular position on the printer s Screen Opens the communications port Prints the printer buffer s contents in the format specified Re displays the saved contents of the screen Saves the screen s current contents Command Reference 5 7 ADD Purpose Syntax Process Rules Optional Fields Example 1 Example 2 See Also Adds the numeric values of two fields ADD buffer field1 buffer field2 invalid label valid labe The ADD command sums buffer field and buffer field2 and places the result into buffer fiela2 Th
68. oad an application perform maintenance or set parameters Displaying the Ready Prompt Before doing anything you must display the Ready prompt on the printer Ready I x How you do this depends on whether the printer has an application loaded No Application When there is no application in the printer the Ready prompt appears automatically when you turn on the printer Loaded Application To display the Ready prompt with a loaded application 1 Turn on the printer In a moment the battery charge indicator appears E Amm F 2 Press the key with the batter charge indicator on the screen The following menu appears Start Appl Online 4 Y 3 Choose Online The Ready prompt appears NOTE Online is different from Online Diagnostics in the tool box Accessing the Toolbox You may need to run diagnostic tests perform maintenance or set parameters on the printers To do this access the toolbox as follows 1 From the Ready prompt press the left button under the icon Ready I x 2 The battery charge indicator appears E D F gt x Printer Procedures 3 1 3 Press the right button under the gq icon The following menu appears Tool Box Language Exit 4 v 4 Choose Tool Box Note When you exit the tool box the Ready prompt appears 5 Use the tool box to perform the tasks you need to do See the S
69. oard Misc ee Item Eolor E Comments Horz Divider Lines Background Vert Divider Lines Highlighted Line 3 Line Numbers AaBbCcDdEe 7 Make any changes you want to the text color and tab sizes enable line numbering etc Click when finished 8 Finish writing your script Using the Software 2 3 Saving a File 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 About Projects The Project Tree lists all the files in the open project The project tree contains the following directories scripts formats and lookups Scripts Formats Multiple scripts can be included in the Scripts directory for use in the current project 1 Highlight the Scripts directory 2 Right mouse click and select Add Files to Folder 3 Locate and select the script to add Click Open NOTE One script must be marked as the Main script before building Highlight the script Right mouse click and select Mark as Main You must use the INCLUDE command in the script to include the other scripts Example Define SCRATCH 5000 A INCLUDE c ADKProjects MyStore Scripts price cfs Function Start Begin Add format files to the Formats dir
70. of 0 means the port waits indefinitely for data Commport and timeout must be numeric and can be one of the following Commport and Timeout INPUT Logical Field Name PR1 Logical Field Name Description Input Buffer Printer Buffer Field Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Number A number prefixed by a pound 4 sign Example This example opens the primary communications port and times out after 120 seconds OPENCOMM 1 120 See Also CLOSECOMM 5 64 Command Reference PAD Purpose Syntax Process Rule Example 1 Example 2 Pads data in a field PAD direction pad field pad character max length The PAD command pads data in pad fie d in the direction specified by direction with pad character Max length indicates the field s length For example if the data is seven characters and the length is ten three characters are added to the field Direction can be one of the following Direction Description L Pad left R Pad right Pad field pad character and max length can be one of the following Pad field Pad character and Max length INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Pad field only Logical Field Name Field1 Index Pad character and max length only Number Pad character only String Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Fi
71. ogical Field Name Field1 Index Buffer field1 only String Buffer field1 start and length only Number Rules Optional Fields 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 Length and Start must be numeric Invalid and valid labels are discussed in Script Flow at the beginning of this chapter The exception is as follows If buffer fiela2 overflows start is greater than ength or invalid labelis defined control passes to that label This example extracts a five character substring starting at position 5 of LOCATION Example 1 and copies it into TEMP1 MID LOCATION TEMP1 5 5 Example 2 This example extracts a substring of LengthNum characters starting at position StartNum of LOCATION and copies it into TEMP1 MID LOCATION TEMP1 StartNum LengthNum See Also LEFT LSTRIP RIGHT RSTRIP 5 60 Command Reference MOVE Purpose Syntax Process Copies data between fields MOVE source destination invalid label valid label The MOVE command copies data between fields The contents of source replaces the contents of destination with no effect on source Source can be one of the following Source INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Buf
72. one field to another CONCAT source destination invalid label valid label The CONCAT command copies source s contents to the end of destinations contents Source is the data to append can be one of the following Source and Destination INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Source only String Number Destination only SCRATCH Source s contents do not change Destination is the resulting data These variables 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 Scratch Buffer Field You can concatenate numeric fields and alphanumeric fields in any combination Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example appends the SKU to the end of BC FIELD CONCAT SKU BC FIELD Command Reference 5 29 CSTRIP Purpose Strips data from a field Syntax CSTRIP ffeld buffer field buffer2 invalid label valid label Process The CSTRIP command strips data specified in fie d buffer2 from field buffer1 These variables can be one of the following Field buffer and Field buffer2 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Field buffer2 only Desc
73. ored it in the internal screen buffer This example restores contents of the original screen containing 1234567890 to the screen overwriting the screen s current contents CLEAR DISPLAY MOVE 1234567890 DISPLAY SAVESCREEN CLEAR DISPLAY MOVE 0987654321 DISPLAY RESTORESCREEN SAVESCREEN Command Reference 5 71 RETURN Purpose Syntax Process NOTE Example See A so Breaks out of a subroutine RETURN The RETURN command breaks out of a subroutine It transfers control back to the command following the CALL activating the subroutine Using END in a subroutine also implies a RETURN Therefore the RETURN command is not required as the last command of a subroutine This example breaks out of a subroutine COMPARE FSIZE EQ 12 GOODDATA RETURN CALL 5 72 Command Reference RIGHT Purpose Syntax Process Rule Optional Fields Example 1 Example 2 See A so Extracts the right most characters from a string RIGHT buffer field1 buffer field2 length invalid label valid label The RIGHT command extracts the right most characters from buffer field1 specified by ength and copies them into buffer field2 The buffer field fields can be one of the following Buffer field1 2 and length INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Buffer field1 only String Buffer field1 and length only Number Leng
74. ose Syntax Process Example See Also Converts alphanumeric data to numeric data CHR asc field int field The CHR command converts asc fie d containing alphanumeric data to a numeric format placing the result in nt fie d Asc field and Int field contain the data to translate and the translated data respectively They can be one of the following Asc field and Int field INPUT SCRATCH Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Asc field only String Description Input Buffer Scratch Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field ASCII string delimited by double quotes This example takes alphanumeric data from the TAASCII field converts it into numeric data and stores the result in the TAINT field CHR TAASCII TAINT ASC Command Reference 5 25 CLEAR Purpose Syntax Process NOTE Example 1 Example 2 Deletes data from data items CLEAR tem The CLEAR command deletes data from tem Control always passes to the next line You must define a buffer before you can clear it tem is the data item to clear It can be one of the following Item Description PRINTER Printer Buffer INPUT Input Buffer DISPLAY Printer s Screen TEMPORARY Temporary Buffer Record Logical Field Name TEMP1 Logical Field Name LU1 Temporary Buffer Field Loo
75. our program Script execution control starts with the first command in START and stops when the last command in START is performed FUNCTION START BEGIN program body END Files and Buffers 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 Scratch buffer Lookup table buffer Temporary storage buffer Printer buffer Array buffer A buffer may contain up to 255 separate fields each field being 1 to 999 bytes long Use the DEFINE command to specify the field definitions Field type field name field length and data type are the fields used to define the buffer See Chapter 5 Command Reference for more information Lookup Table Definition The lookup buffer is the working area for data downloaded to the printer The lookup table definition tells the printer how the lookup records are received from the PC The printer allocates buffer space for the record when it receives the definition The number of records stored depends on the size of each record and the script s size Temporary Storage Definition The temporary storage buffer is used as a temporary storage for arithmetic operations and temporary variables 4 2 Program Structure Printer Definition The printer buffer is used to store data to print Rule The field lengths in the printer buffer must equal
76. packets to the script For files or packets created using a text editor LINKFILE e name The LINKFILE command links formats to the script You can include any number of files in the download datastream The LINKFILE command downloads formats files or packets created using a text editor These commands add a line to the CFU file s header which tells the transfer program to download the file specified by format namelfile name f you do not specify a path the transfer program looks for a format in the PLATFORM FORMATS directory Link files before FUNCTION START This example downloads CHCKDGIT PKT created in MPCL with a text editor to the printer LINKFILE CHCKDGIT PKT 5 54 Command Reference LOCATE Purpose Syntax Process Example Moves the cursor to a specified position on the printer s screen LOCATE row position col position The LOCATE command moves the cursor to the row position col position position on the printer s screen The range for row position is 1 3 For co position the ranges are 1 15 for rows 1 and 2 and 1 20 for row 3 Row position and col position can be one of the following Source Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Number A number prefixed by the number sign 4 This example moves the cursor to the first row and second column of the scre
77. r data stream information How to Use this Manual This manual contains the following information Chapter 1 Introduces ADK2 Overview Chapter 2 Tells you how to use the software for entering editing compiling and Using the Software printing your script Chapter 3 Explains tasks done on the printer separate from the application Printer Procedures Chapter 4 Tells you how to write the script s source code Program Structure Chapter 5 Describes the commands you use to write your script Command Reference Appendix A Lists a sample script Sample Script A Review of Terms Throughout this manual you will see references to the different terms that you must be aware of before programming an ADK version 9460 printer A file is a collection of related data stored together in one unit There are three types of files scripts formats and lookup tables A scriptis a type of file It is the source code for a program that runs on the printer A project is a collection of related files The files can be a scripts formats or lookup tables A project must have at least one script but formats and lookup tables are optional An application is a project that has been built into a form executable by the printer Overview 1 1 1 2 Overview USING THE SOFTWARE This chapter explains how to start a new project build a project into an application download an application System Requirements Here are the recomme
78. ription Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field ASCII string delimited String by double quotes Optional Fields Invalid and valid labels are discussed in Script Flow at the beginning of this chapter Example This example removes all dashes from the SHIP NO field CSTRIP SHIP NO See Also RSTRIP LSTRIP TSTRIP 5 30 Command Reference DATATYPE Purpose Restricts the type of data the GET statement can retrieve Syntax DATATYPE data type Process The DATATYPE command restricts the GET statement to only read data of type data type Data type can contain one of the following values Data type Description NUMERIC Numeric Only 0 9 ALPHA Alpha only A Z a z SYMBOLS Symbols only ALPHANUMERIC Alphanumeric 0 9 A Z a z NUMSYM Numeric and Symbols ALPHASYM Alpha and Symbols ALPHANUMSYM Alphanumeric and Symbols ALL All characters accepted 00 FFh Example This example removes all dashes from the SHIP NO field DATATYPE ALPHANUMERIC Command Reference 5 31 DEC Purpose Decrements numeric fields by one Syntax DEC buffer field invalid label valid label Process The DEC command decrements buffer f eld A translation error occurs if the script decrements an alphanumeric field Buffer field is one of the following Buffer Field INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index
79. s the printer has printed LABELCOUNT NUMOFLABELS 5 52 Command Reference LEFT Purpose Syntax Process Rule Optional Fields Example 1 Example 2 See A so Extracts the left most character from a string LEFT obuffer field buffer fiela2 length invalid label valid label The LEFT command extracts the left most characters from buffer fie d7 and copies them into buffer field2 Length specifies the number of characters The buffer fie d fields can be one of the following Buffer field1 2 and Length INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Buffer field 1 and length only Number Buffer field1 only String Length must be numeric Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Number prefixed by a number sign ASCII string delimited by double quotes Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example extracts the five left most characters from SHIP NO and copies them to SKU LEFT SHIP_NO SKU 5 This example extracts the NUMCHARS left most characters from SHIP NO and copies them to SKU LEFT SHIP NO SKU NUMCHARS LSTRIP MID RIGHT RSTRIP Command Reference 5 53 LINKFILE Purpose Syntax Process Rule Example 1 Links formats files or
80. s to invalid label Invalid and valid labels are discussed in Script Flow at the beginning of this This example inserts This text will be inserted into ASZPRICE at position INSERT I This text will be inserted ASZPRICE POSNUM chapter Example POSNUM See Also VALIDATE 5 50 Command Reference JUMP Purpose Syntax Process Rule Example See Also JUMP transfers control to another location JUMP abe The JUMP command unconditionally transfers control to the specified label If the script is re entered control passes to the script s first line You cannot jump out of a function This example transfers control to the label REQUEST SKU JUMP REQUEST SKU CALL Command Reference 5 51 LABELCOUNT Purpose Sets a field to the current number of labels printed Syntax LABELCOUNT buffer field1 invalid label valid label Process The LABELCOUNT command sets buffer field1 to the current number of labels printed Buffer field1 field can be one of the following Buffer field1 INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Logical Field Name Field1 Index Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field Array Buffer Field Optional Fields nva id and valid labels are discussed in Script Flow at the beginning of this chapter Example This example sets NUMOFLABELS to the number of label
81. sts the script executes the commands on the lines following the condition If the comparison is not true the condition does not exist control passes to the line after the ENDIF next ELSEIF first line after the ELSE You may nest IFs but every IF must have a corresponding ENDIF Do not use IF inside a macro The buffer fields can be one of the following Buffer fields Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index String ASCII string delimited by double quotes Number Number prefixed by a number sign 5 46 Command Reference Optional Fields Example See Also Comparison can be one of the following Comparison Description Equals Equals lt gt Not equal Iz Not equal gt Greater than gt Greater than or equal lt Less than lt Less than or equal 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 The second condition is NAME equals SMITH Use ELSE to provide a final set of commands to execute if no conditions exist This example checks the va
82. t the PC match those at the printer To change the PC s download settings 1 Select Download Settings from the Project Menu Download Configuration Pott cout Settings Cancel 2 Select the communications port COM1 LPT1 2 or TCP IP 3 Click Settings Using the Software 2 5 If you select COM1 COM4 Serial Port Settings COM1 m Communications Parameters Baud 3600 Parity None b Data Bits e Stop Bits fi Cancel Flow Control None 4 Make changes as needed to the Baud Parity Data Bits Stop Bits and Flow Control Click twice NOTE Changing these parameters only affects your PC not the connected printer Refer to your printer s documentation for more information about changing the printer s communications parameters If you select LPT LPT2 Parallel Port Settings LPT1 Parallel Port Mode Compatible Mode Uni directional Communications One Way C EEE 1284 ECP Mode Bi directional Communications Two Way Cancel 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 IEEE1284 mode is for bi directional communications With this mode you can send files to your printer and receiv
83. th must be numeric Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field ASCII string delimited by double quotes Must be one character long Number prefixed by a number sign Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example extracts the five right most characters from SHIP NO and copies them to SKU RIGHT SHIP_NO SKU 5 This example extracts the NUMCHARS right most characters from SHIP NO and copies them to SKU RIGHT SHIP NO SKU NUMCHARS LEFT LSTRIP MID RSTRIP Command Reference 5 73 RSTRIP Purpose Strips characters from a field and copies the remaining characters to another field Syntax RSTRIP buffer field1 buffer field2 length invalid label valid label Process The RSTRIP command strips the right most characters from buffer field7 and copies the remaining characters to buffer field2 Length is the number of characters to strip Buffer field1 buffer field2 and length can be one of the following Buffer field1 Buffer fiela2 and Length INPUT Logical Field Name TEMP1 Logical Field Name LU1 Logical Field Name PR1 Field buffer and Field buffer2 only String Length only Number Description Input Buffer Temporary Buffer Field Lookup Buffer Field Printer Buffer Field ASCII string delimited by double quotes Number prefixed by a number sig
84. uffer Int field only Number Number prefixed by a number sign The following example converts numeric data from the TAINT field converts it into alphanumeric data and stores the result in TAASCII ASC TAINT TAASCII CHR Command Reference 5 11 AUTOSTART Purpose Starts the application immediately after it is downloaded to the printer Syntax 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 AUTOSTART 5 12 Command Reference AVAILABLEDATA Purpose Syntax Process Optional Fields Example Checks for data at a device AVAILABLEDATA device invalid label valid labe The AVAILABLE command checks for data at a device The device field can be one the following Device KEYBOARD COMM Description Keypad Communications Port Invalid and valid labels are discussed in Script Flow at the beginning of this chapter In the following example control passes to code at label CHARLN if the application detects data on the communications port AVAILABLEDATA COMM CHARLN Command Reference 5 13 BITCLEAR Purpose Syntax Process Sets the specified bit to zero BITCLEAR pbuffer field bit position invalid label valid label
85. ustom Check Digit 5 21 MSI Check Digit 10 Custom Check Digit 6 22 Postnet Check Digit 11 Custom Check Digit 7 23 UPC Price Check Digit 12 Custom Check Digit 8 24 EAN Price Check Digit Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example generates a check digit in the input buffer by using the Sum of Digits check digit scheme GENERATE INPUT 2 Command Reference 5 43 GET Purpose Syntax Process NOTE Optional Fields Examplef See Also Retrieves data from up to two input devices GET src src2Z minimum maximum type invalid label valid label The GET command retrieves data from 5 67 and optionally src2 and places it in the input buffer Src and src2 can be one of the following 9 67 and Src2 COMM KEYBOARD Description Communications port Keypad Minimum and maximum represent the field length If minimum is 4 and maximum is 6 a valid entry for that field is 4 to 6 characters The valid range for minimum and maximum is 0 512 characters These fields can be one of the following Minimum and Maximum Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Number Number prefixed by a number sign Use th
86. value to be arithmetically shifted left or right Checks the specified bit to see if the bit is a one or a zero Allows you to limit the character type for an input buffer Converts ASCII data from an alphanumeric format to a numeric format Clears buffers or files Compares the contents of two fields Appends the contents of one field to another Extracts specific characters for a string Restricts the type of data for the GET command Places the length of one field into another Creates a check digit Inserts data from one buffer into another Extracts the left most characters from a string Converts characters in a field to lower case Strips specified left most characters from one field and copies the remaining characters to another Extracts a sub field from a string Copies contents of one field to another field Adds characters to a field to fill it out Processes an MPCL data stream Extracts the right most characters from a string Strips specified right most characters from one field and copies the remaining characters to another Extracts character delimited sub fields from a string Strips characters from a field based upon a template Converts characters in a field to upper case Validates a check digit 5 6 Command Reference File Management Commands APPVERSION BSEARCH QUERY READ SEEK Sets the script name and version number Performs a binary search on a sorted lookup table for a record co
87. wing Hotkey1 Hotkey2 and Hotkey3 F1 F2 F3 ALL Description Function Key 1 Function Key 2 Function Key 3 All function keys This example disables the F1 F2 and F3 hot keys DISABLE F1 F2 F3 ENABLE HOTKEY 5 36 Command Reference DIVIDE Purpose Syntax Process Rules Optional Fields Example 1 Example 2 Example 3 See Also Divides the contents of one field by the contents of another DIVIDE buffer field1 buffer field2 invalid label valid label The DIVIDE command divides buffer field by buffer fie d2 and inserts the quotient into buffer field2 This command performs integer division and truncates the remainder Buffer field1 contains the dividend while buffer field2 is the divisor These variables can be one of the following Buffer Field and 2 Description INPUT Input Buffer Logical Field Name Temporary Buffer TEMP 1 Field Logical Field Name LU1 Lookup Buffer Field Logical Field Name PR1 Printer Buffer Field Logical Field Name Array Buffer Field Field1 Index Number Number prefixed by a number sign You cannot use two numeric literal fields For example f Ouffer fie d7 contains a numeric literal buffer field2 must contain a field If buffer field2 contains a numeric literal buffer fie d7 must contain a field When you use a numeric literal the script places the result in the field that is not a numeric literal Invalid a
88. y AUTOSTART To restart the script enable the script through the printer s control panel This example shows the script s termination EXIT Command Reference 5 39 FETCH Purpose Syntax Process NOTE Optional Fields Example See Also Retrieves one character from up to two sources and places it in the Input Buffer FETCH srci srcZ invalid label valid label The FETCH command retrieves one character from src and optionally src2 It places these characters in the Input Buffer The DATATYPE and CHARTYPE commands do not affect this command Src and src2 can be one of the following 9 67 and Src2 COMM KEYBOARD Keypad Description Communications port Characters retrieved from the keyboard will be either 1 2 or 3 depending on which hot key was pressed Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example retrieves one character from the communications port and passes control to the next line FETCH COMM GET 5 40 Command Reference FIELDLEN Purpose Syntax Process Rule Optional Fields Example 1 Places the length of a field into another field FIELDLEN buffer field1 buffer field2 invalid label valid abel The FIELDLEN command calculates the length of buffer field and places it in buffer fiela2 The buffer field fields can be one of the following Buffer Field and 2
89. y Buffer Field Lookup Buffer Field Printer Buffer Field ASCII string delimited by double quotes Number prefixed by a number sign Invalid and valid labels are discussed in Script Flow at the beginning of this chapter This example strips the five left most characters from the SHIP NO field and copies the remaining characters to the SKU field LSTRIP SHIP NO SKU 5 TSTRIP RSTRIP CSTRIP Command Reference 5 57 MACRO Purpose Syntax Process NOTE Rule Defines or invokes a single command the software expands to multiple commands during script translation To define the macro MACRO macro name BEGIN macro body END To invoke the macro macro name arg1 arg2 arg99 The MACRO command defines or invokes a macro A macro is a single command the software expands to multiple commands during script translation Each time a macro command appears the software inserts the commands it generates into the script Do Not use IF SWITCH or WHILE inside a macro Defining the Macro The macro name is an identifier naming the macro The macro body contains the commands defining what the macro does The keywords BEGIN and END define macro bodys boundary and limit the scope of control transfer to within the boundary Keep macros in a separate macro file you include in the source script using the INCLUDE command You must define macros before invoking them Invoking the Macro
90. ystem Administrator s Guide for more information Loading Applications After you use the tool box you must restart the existing application or load a new one Restarting Existing Applications To restart the application after using the tool box 1 From the Ready prompt press the right key under the x icon The following menu appears Start Appl Online 4 2 Choose Start Appl Loading New Applications To load a new application see Chapter 2 Using the Software 3 2 Printer Procedures PROGRAM STRUCTURE 4 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 CALL GetRegPrice CALL GetNewPrice CALL PrintTags END FUNCTION InitApp BEGIN CLEAR Printer CLEAR RegPrice END Functions A function is an independent group of statements usually performing a specific task You execute a function with the CALL command See Appendix A Sample Script for a sample script Rule Each function must have a BEGIN and an END FUNCTION function name BEGIN function body END Program Structure 4 1 Starting a Script Every script has the primary function START The START function is the starting point of y
Download Pdf Manuals
Related Search
Related Contents
JVC HM-DH30000 - Steve`s Home Theater Huffy D 50053 User's Manual General International 75-030 M1 Use and Care Manual zum - Fotoespresso Toro Hand-held Radio Interface Data Sheet Oregon Scientific PS-L06 Stereo System User Manual MANUALE D`ISTRUZIONI TAGLIASIEPI HCR-1500 manuelinstallation4c.. Fileman 22.2 Advanced User Manual GUZZILLA FCカッター MFP-A オートマ旋回タイプ/60A-200A Copyright © All rights reserved.
Failed to retrieve file