Checking Field Length; Verifying Check Digits - HP 82718A Expansion Pod Reference Manual

For use with the hp-75
Hide thumbs Also See for HP 82718A Expansion Pod:
Table of Contents

Advertisement

en
ld
)n
:rs
:;k
,w
or
ee
n,
as
)y
~n
or
ilt
ar
ry
:1.
le
a
5 DELA'r' ::::
1(1
DISP "!:::can 1.:':Ibel"
2(1
A$=CODE::::9$
::a]
IF A$=
II II
THEt·~
HJ
Software Usage and Examples
A subtlety of the
D I SF' command is its behavior with the current DELA'r' rate.
When a D I SF'
statement is executed, the program waits for the DELA''''' time before continuing execution. This wait
causes difficulty in scanning labels. The user begins scanning when the !:::c.:':In 1 abe 1 prompt appears,
scans two or three times during the 3 s wait, and gets no audible feedback. Perhaps in the middle of the
fourth scan, CODE::::9$ begins to execute, sees only the last half of the label, and issues a low tone to
indicate a bad scan. Then the cycle repeats until the user hits it just right.
The user has experienced a tremendous frustration at the perceived poor performance of the software,
when in fact poor program design has caused all the problems. The time from when the prompt appears
to when it is valid to scan should be as short as possible to prevent the program from being out of sync
with the user. Setting DELA'r'
0
ensures this:
5
DELA'r'
0
1(1
DISP "!:::can label
II
2~]
A$=CODE::::9$
:::(1 IF A$=""
THEt·~
10
Checking Field Length
You can check the field length of decoded bar code labels by using the BASIC function
LHL
This
provides an additional verification of the scan; you only need to know the actual length of the label.
Here is an example of using
LEt·~
for field length checking.
100 DELAY 0
~
L=9 ! Define desired length
11
~:1
D I !::p
II
!:::can 1.:':Ibe 1"
! F't-Or'lpt
120 A$=CODE39$
! Execute decoder
130 IF LEN(A$)=L THEN 180 ! Field length = L
140 DI!:::P "Len'dth en-CIt-"
I~
~'~AIT
.5
! B.:':Id len'dth
15(1
D I !:::F'
II
!:::c.:':In .:':Iga i nil! F.:escan pt-OPlpt
160 BEE P 1
O~]
0, •
1 ! Au d i b 1 e
Pt-
or'l p t
170 GOTO
12~]
1:::0 D I :;:;p
II
Good t-ead
II
! Len';dt h ' · ... et- i f i ed
Verifying Check Digits
Use CD
I G I T
ot·~
when you want the decoders to automatically verify the check digit while scanning.
However, not all labels can be scanned successfully. When an unreadable bar code label is encountered, it
may be necessary for the user to enter the label from the keyboard. In that case, the functions CD',,.'::::9
and CD\,'ll allow the program to verify that the label was entered correctly from the keyboard. These
functions perform the check digit verification that is normally done by CODE::::9$ and CODE 11
$
with
CDIGIT
ot·L
.
CD',/:::9
and CD',/ 11 accept a single string parameter, and return a 1 if the check digit verified or a 0 if
the verification failed (Boolean functions). Here is an example of using CD',/:=:9 to verify Code 39 labels:
57

Advertisement

Table of Contents
loading

Table of Contents