Intermec PX4i Fingerprint Developer's Guide (old) - Page 36
Using an ON COMSET...GOSUB Instruction, Using an ON KEY...GOSUB Instruction
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 36 highlights
Chapter 2 - Understanding Fingerprint Syntax Using an ON COMSET...GOSUB Instruction When one of several specified conditions interrupts the background communication on a certain communication channel, the program branches to a subroutine, such as reading the buffer. The interrupt conditions (end character, attention string, or maximum number of characters) are specified by a COMSET statement as in this example: 1 10 20 30 40 50 60 1000 2000 2010 2020 2030 REM Exit program with #STOP& COMSET1,"#","&","ZYX","=",50 ON COMSET 1 GOSUB 2000 COMSET 1 ON IF A$ "STOP" THEN GOTO 40 COMSET 1 OFF END END A$= COMBUF$(1) PRINT A$ COMSET 1 ON RETURN Using an ON KEY...GOSUB Instruction To use the printer keypad, each key can be enabled individually using a KEY ON statement and assigned to a subroutine using an ON KEY GOSUB statement. The subroutine should contain the instructions you want performed when the key is pressed. In the statements KEY () ON, KEY () OFF, and ON KEY () GOSUB..., the keys are specified by id. numbers enclosed by parentheses. For more information, see "Using the Printer Keypad" on page 111. Note that ON KEY...GOSUB excludes data input from the printer keypad. This example shows how the two unshifted keys F1 (id. No. 10) and F2 (id. No. 11) are used to change the printer contrast. 10 20 30 40 50 60 70 80 90 100 110 120 1000 1010 1020 2000 2010 2030 RUN PRPOS 100,500 PRLINE 100,100 FONT "Swiss 721 BT" PRPOS 100,300 MAG 4,4 PRTXT "SAMPLE" ON KEY (10) GOSUB 1000 ON KEY (11) GOSUB 2000 KEY (10) ON : KEY (11) ON GOTO 70 PRINTFEED END SETUP "MEDIA,CONTRAST,-10%" PRPOS 100,100 : PRTXT "Weak Print" RETURN 110 SETUP "MEDIA,CONTRAST,10%" PRPOS 100,100 : PRTXT "Dark Print" RETURN 110 20 Intermec Fingerprint Developer's Guide