Intermec PX4i Fingerprint Developer's Guide (old) - Page 41
Executing the Program, Writing, Executing, and Listing a Short Program
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 41 highlights
Chapter 2 - Understanding Fingerprint Syntax • Subroutines for key-initiated actions: ON KEY. • Subroutines for display messages: PRINT#. • Error handling subroutines: ERR, ERL, PRSTAT. • Label layout subroutines: PRPOS, DIR, ALIGN, FONT, BARSET, PRTXT, PRBAR, PRIMAGE, PRBOX, PRLINE, and so on. Executing the Program To start the execution of the program currently residing in the printer working memory, issue a RUN statement. Note: Do not issue a RUN statement on a numbered line, or on a line without a number in Programming Mode, or a "RUN statement in program" error occurs. By default, program execution starts at the line with the lowest number and continues in ascending line number order, with the exception of possible loops and branches. Optionally, you can start execution at a specified line (for example, RUN 40 starts at line 40). Use an EXECUTE statement to execute a program that is not currently loaded, or to execute Fingerprint programs from within another Fingerprint program. When you are connected to the printer through a serial connection, the first error that stops the execution causes an error message to be returned to the host screen. In case of program errors, the number of the line where the error occurred is reported by default (for example ,"Field out of label in line 110"). After the error has been corrected, the execution must be restarted by means of a new RUN statement, unless an error-handling routine is included in the program. Writing, Executing, and Listing a Short Program Follow the next procedure to write a short Fingerprint program, execute the program, and list it. To write, execute, and list a short program 1 Connect the printer to a host PC and start a communications program on the host PC. For help, see "Sending Fingerprint Commands to the Printer" on page 3. 2 In HyperTerminal, type NEW and press Enter. The printer returns "Ok". 3 Type IMMEDIATE OFF and press Enter. The printer returns "Ok". 4 Type the following text and press Enter at the end of each line: REM This is a demonstration program PRINT "This is the main program" GOSUB sub1 END sub1: PRINT "This is a subroutine":'Line label RETURN IMMEDIATE ON Intermec Fingerprint Developer's Guide 25