RS-232 Demonstration Program
If an
This program is for demonstration purposes only. It is only intended to prove that cabling is correct, the com port is working, and the scanner is working. If the bar code data displays on the screen while using this program, it only demonstrates that the hardware interface and scanner are working. At this point, investigate whether the application software and the scanner configuration match.
If the application does not support
10 | CLS |
20 | ON ERROR GOTO 100 |
30OPEN “COM1:9600,S,7,1,CSO,DSO,CD0,LF” AS#1
35PRINT “SCAN A FEW BAR CODES”
40LINE INPUT #1, BARCODE$
50PRINT BARCODE$
60K$ = INKEY$: IF K$ = CHR$(27) THEN GOTO 32766
70GOTO 40
100PRINT “ERROR NO.”;ERR ;“PRESS ANY KEY TO TERMINATE.”
110KK$ = INKEY$: IF K$ = “”THEN GOTO 110
32766 CLOSE: SYSTEM
32767 END
29