Intermec PX4i Fingerprint Developer's Guide (old) - Page 148

Commands for Error-Handling Routines, Branching to Subroutines With ON ERROR GOTO...

Page 148 highlights

Chapter 8 - Error Handling Commands for Error-Handling Routines This section describes Fingerprint commands you use to create error-handling routines. Branching to Subroutines With ON ERROR GOTO... Use ON ERROR GOTO... to branch execution to a subroutine if any kind of error occurs when a program is run. The error can be identified and managed, and program execution can be resumed at an appropriate program line. For more information, see "Instructions for Conditional Branching" on page 18. Checking Error Codes With ERR and ERL ERR returns the reference number of an error that has occurred. For more information, see the Error Codes in the Fingerprint Command Reference Manual. ERL returns the number of the line on which an error has occurred. Resuming Execution After Errors This statement resumes execution after the error has been handled in a subroutine. Execution can be resumed at the statement where the error occurred, at the statement immediately following the one where the error occurred, or at any other specified line. For more information, see "Instructions for Conditional Branching" on page 18. Returning Print Job and Printhead Status With PRSTAT In addition to returning insertion point and field information, PRSTAT can return print job and printhead status, including multiple error conditions. Calling PRSTAT without parameters returns a numeric value. If 0 returns, the printer is OK. Any other value indicates a print job or printhead error condition, or some combination of error conditions as shown in the next table. PRSTAT Error Values Value 0 1 2 4 8 16 32 128 Description Printer is OK Printhead lifted Label not removed (valid if Label Taken Sensor is installed, and returns 0 if printer has no LTS) Label Stop Sensor does not detect a label Printer out of thermal transfer ribbon, or the printer is set for direct thermal printing, a ribbon is installed Printhead voltage too high Printer is feeding Printer out of media 132 Intermec Fingerprint Developer's Guide

  • 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 8 — Error Handling
132
Intermec Fingerprint Developer’s Guide
Commands for Error-Handling Routines
This section describes Fingerprint commands you use to create error-handling
routines.
Branching to Subroutines With ON ERROR GOTO...
Use ON ERROR GOTO... to branch execution to a subroutine if any kind of error
occurs when a program is run. The error can be identified and managed, and
program execution can be resumed at an appropriate program line. For more
information, see
“Instructions for Conditional Branching” on page 18.
Checking Error Codes With ERR and ERL
ERR returns the reference number of an error that has occurred. For more
information, see the Error Codes in the
Fingerprint Command Reference Manual.
ERL returns the number of the line on which an error has occurred.
Resuming Execution After Errors
This statement resumes execution after the error has been handled in a subroutine.
Execution can be resumed at the statement where the error occurred, at the
statement immediately following the one where the error occurred, or at any other
specified line. For more information, see
“Instructions for Conditional
Branching” on page 18.
Returning Print Job and Printhead Status With PRSTAT
In addition to returning insertion point and field information, PRSTAT can return
print job and printhead status, including multiple error conditions.
Calling PRSTAT without parameters returns a numeric value. If 0 returns, the
printer is OK. Any other value indicates a print job or printhead error condition, or
some combination of error conditions as shown in the next table.
PRSTAT Error Values
Value
Description
0
Printer is OK
1
Printhead lifted
2
Label not removed (valid if Label Taken Sensor is installed, and returns 0 if printer
has no LTS)
4
Label Stop Sensor does not detect a label
8
Printer out of thermal transfer ribbon, or the printer is set for direct thermal
printing, a ribbon is installed
16
Printhead voltage too high
32
Printer is feeding
128
Printer out of media