Programming instructions

157
Intermec Fingerprint 6.13 – Programmer's Guide
15. PRINTER FUNCTION CONTROL, cont'd.
8. Printhead, cont'd.
This example shows how a program can be made that checks the
printhead for faulty dots and warns the operator when a faulty dot
is encountered. Pending printhead replacement, the bar code is
repositioned to ensure continued readability. Such a program takes
a few seconds to execute (there may be more than a thousand dots
to check), so it is advisable either to restrict the dot check to the part
of the printhead that corresponds to the location of the bar code, or
to perform the test at startup only.
10 OPEN "console:" FOR OUTPUT AS 10
20 IF HEAD(-1)<>0 THEN GOTO 9000
30 BEEP:D1$="Printhead Error!":D2$="":GOSUB 2000
40 GOSUB 1000
50 BARADJUST 20,20
60 GOTO 9000
1000 FUNCTEST "HEAD",TMP$
1010 A$=":" : TMP%=INSTR(TMP$,A$)+1
1020 RETURN
1030 SET FAULTY DOT -1
1040 QMEAN%=HEAD(-7)
1050 QMIN%=QMEAN%*85\100
1060 QMAX%=QMEAN%*115\100
1070 FOR I%=0 TO WHEAD%-1
1080 QHEAD%=HEAD(I%)
1090 IF QHEAD%>QMAX% OR QHEAD%<QMIN% THEN SET FAULTY
DOT I%
1100 NEXT
2000 PRINT #10 : PRINT #10, LEFT$(D1$,16)
2010 PRINT #10, LEFT$(D2$,16);
2020 RETURN
9000 PRPOS 200,20
9010 BARTYPE "CODE39"
9020 BARRATIO 2,1 : BARMAG 2
9030 BARHEIGHT 150
9040 PRBAR "1234567890"
9050 PRINTFEED
9060 END