Intermec PB31 Fingerprint Developer's Guide (old) - Page 117

Handling Errors With ERRHAND.PRG, Renumbering Lines When Merging Files, Merging Programs

Page 117 highlights

Chapter 6 - Designing Bar Code Labels 15 (Optional) To save your program, enter the following text and then press Enter: SAVE "LABEL1" Your program is saved in the printer memory with the filename "LABEL1.PRG". Handling Errors With ERRHAND.PRG The program you just created is unlikely to have caused any errors. However, when writing more complex programs you may find use for an error handler. For this purpose, Intermec includes ERRHAND.PRG in the firmware. Note: To use ERRHAND.PRG you must merge it with your program. For information, see "Merging Programs" in this section. ERRHAND.PRG contains subroutines that displays the type of error on the printer display (for example, "Out of paper" or "Head lifted"), prints the error number on your screen, and assigns subroutines to some of the keys on the keyboard. There is also a subroutine that performs a PRINTFEED with error-checking. The ERRHAND.PRG occupies lines 10, 20, and 100000-1900000. Renumbering Lines When Merging Files If ERRHAND.PRG is merged with the program you just wrote, lines 10 and 20 in your program will be replaced with lines 10 and 20 from ERRHAND.PRG. Therefore you have to renumber your program, so that your program begins with an unoccupied number, for example 50, before ERRHAND.PRG is merged: RENUM 50,1,10 Ok LIST 50 60 70 80 90 100 110 120 130 140 150 160 170 180 Ok BARFONT ON BARFONT "Swiss 721 BT",6 PRPOS 10,10 PRBOX 400,340,15 PRPOS 30,30 PRIMAGE "GLOBE.1" PRPOS 75,270 BARTYPE "CODE39" PRBAR "ABC" PRPOS 75,220 FONT "Swiss 721 BT",6 PRTXT "My FIRST label" PRINTFEED END Merging Programs Now your label-printing program LABEL1.PRG will not interfere with ERRHAND.PRG and you can merge the two programs into a single program. In fact, you will create a copy of ERRHAND.PRG which is merged into LABEL1.PRG. Thus the original ERRHAND.PRG can be merged into more programs later: Intermec Fingerprint Developer's Guide 101

  • 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
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187

Chapter 6 — Designing Bar Code Labels
Intermec Fingerprint Developer’s Guide
101
15
(Optional) To save your program, enter the following text and then press
Enter
:
SAVE “LABEL1”
Your program is saved in the printer memory with the filename “LABEL1.PRG”.
Handling Errors With ERRHAND.PRG
The program you just created is unlikely to have caused any errors. However, when
writing more complex programs you may find use for an error handler. For this
purpose, Intermec includes ERRHAND.PRG in the firmware.
ERRHAND.PRG contains subroutines that displays the type of error on the printer
display (for example, “Out of paper” or “Head lifted”), prints the error number on
your screen, and assigns subroutines to some of the keys on the keyboard. There is
also a subroutine that performs a PRINTFEED with error-checking. The
ERRHAND.PRG occupies lines 10, 20, and 100000-1900000.
Renumbering Lines When Merging Files
If ERRHAND.PRG is merged with the program you just wrote, lines 10 and 20 in
your program will be replaced with lines 10 and 20 from ERRHAND.PRG. Therefore
you have to renumber your program, so that your program begins with an
unoccupied number, for example 50, before ERRHAND.PRG is merged:
RENUM 50,1,10
Ok
LIST
50
BARFONT ON
60
BARFONT “Swiss 721 BT”,6
70
PRPOS 10,10
80
PRBOX 400,340,15
90
PRPOS 30,30
100
PRIMAGE “GLOBE.1”
110
PRPOS 75,270
120
BARTYPE “CODE39”
130
PRBAR “ABC”
140
PRPOS 75,220
150
FONT “Swiss 721 BT”,6
160
PRTXT “My FIRST label”
170
PRINTFEED
180
END
Ok
Merging Programs
Now your label-printing program LABEL1.PRG will not interfere with
ERRHAND.PRG and you can merge the two programs into a single program. In
fact, you will create a copy of ERRHAND.PRG which is merged into LABEL1.PRG.
Thus the original ERRHAND.PRG can be merged into more programs later:
Note:
To use ERRHAND.PRG you must merge it with your program. For
information, see “Merging Programs” in this section.