Intermec PB51 Fingerprint Developer's Guide (old) - Page 149
Error Handling Example
View all Intermec PB51 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 149 highlights
Chapter 8 - Error Handling Multiple errors are indicated by the sum of the values. For example, if the printhead is lifted (1), and the printer is out of media (128) and ribbon (8), then PRSTAT returns 137. To speed up execution when several conditions are to be checked, assign the PRSTAT value to a numeric variable, for example: 10 A% = PRSTAT 20 IF A% (AND 1) GOTO 1000 30 IF A% (AND 2) GOTO 2000 ... For more information, see PRSTAT in the Fingerprint Command Reference Manual. Error Handling Example In this example one error condition (Error 1019, "Invalid Font") is managed. The same principles can be used for more errors. Test the example by either adding a valid font name or lifting the printhead before running the program. 10 20 30 40 50 60 70 80 90 100 1000 1010 1020 2000 2010 2020 2030 2040 3000 3010 3020 3030 RUN OPEN "console:" FOR OUTPUT AS 1 ON ERROR GOTO 1000 PRPOS 50,100 PRTXT "HELLO" PRINTFEED A%=TICKS+400 B%=TICKS IF B%