Intermec PC43d Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43, PM4 - Page 118

Checking Printhead Status With FUNCTEST or FUNCTEST

Page 118 highlights

Chapter 7 - Controlling the Printer BARADJUST enables the firmware to track all faulty dots, and relocates the bar code so the spaces between the bars are lined up with the faulty dots. This way, you can print bar code labels immediately without loss of quality, although the printhead should still be replaced. Note: The BARADJUST statement cannot be used for ladder bar codes, stacked bar codes such as Code 16K, bar codes with horizontal lines such as DUN-14, EAN/UPC bar codes, or two-dimensional bar codes such as PDF417. The next example lists a program 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 20 30 40 50 60 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 2000 2010 2020 9000 9010 9020 9030 9040 9050 9060 OPEN "console:" FOR OUTPUT AS 10 IF HEAD(-1)0 THEN GOTO 9000 BEEP:D1$="Printhead Error!":D2$="":GOSUB 2000 GOSUB 1000 BARADJUST 20,20 GOTO 9000 FUNCTEST "HEAD",TMP$ A$=":" : TMP%=INSTR(TMP$,A$)+1 RETURN SET FAULTY DOT -1 QMEAN%=HEAD(-7) QMIN%=QMEAN%*85\100 QMAX%=QMEAN%*115\100 FOR I%=0 TO WHEAD%-1 QHEAD%=HEAD(I%) IF QHEAD%>QMAX% OR QHEAD%

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163

Chapter 7 — Controlling the Printer
106
Fingerprint Developer’s Guide
BARADJUST enables the firmware to track all faulty dots, and relocates the bar code
so the spaces between the bars are lined up with the faulty dots. This way, you can
print bar code labels immediately without loss of quality, although the printhead
should still be replaced.
The next example lists a program 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
Checking Printhead Status With FUNCTEST or FUNCTEST$
The FUNCTEST statement checks the number of dots in the printhead and whether
or not the printhead is lifted, and places the result in a string variable.
The next example shows how to use FUNCTEST on a PF4i:
10
FUNCTEST “HEAD”, A$
20
PRINT “HEADTEST:”, A$
RUN
The printer returns (for example):
HEADTEST: HEAD OK,SIZE:832 DOTS
Ok
Note:
The BARADJUST statement cannot be used for ladder bar codes, stacked bar
codes such as Code 16K, bar codes with horizontal lines such as DUN-14, EAN/UPC
bar codes, or two-dimensional bar codes such as PDF417.