Honeywell MK9520-37A38 User Manual - Page 34

RS232 Demonstration Program, program tells the PC to ignore RTS-CTS, Data Set Ready DSR and Data - barcode scanner

Page 34 highlights

RS232 DEMONSTRATION PROGRAM If an RS232 scanner is not communicating with an IBM compatible PC, key in the following BASIC program to test that the communication port and scanner are working. 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, the hardware interface and scanner are working. The next step would be to investigate whether the application software and the scanner configuration match. If the application does not support RS232 scanners, a software wedge program is available that will take RS232 data and place it into a keyboard buffer. This program tells the PC to ignore RTS-CTS, Data Set Ready (DSR) and Data Carrier Detect (DCD) signals. If the demonstration program works but the customer's application software does not, jumper RTS to CTS and Data Terminal Reading (DTR) to DCD and DSR on the back of your PC. 10 20 30 35 40 50 60 70 100 110 32766 32767 CLS ON ERROR GOTO 100 OPEN "COM1:9600,S,7,1,CSO,DSO,CD0,LF" AS#1 PRINT "SCAN A FEW BAR CODES" LINE INPUT #1, BARCODE$ PRINT BARCODE$ K$ = INKEY$: IF K$ = CHR$(27) THEN GOTO 32766 GOTO 40 PRINT "ERROR NO."; ERR ;"PRESS ANY KEY TO TERMINATE." KK$ = INKEY$: IF K$ = ""THEN GOTO 110 CLOSE: SYSTEM END 30

  • 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

30
RS232
D
EMONSTRATION
P
ROGRAM
If an RS232 scanner is not communicating with an IBM compatible PC, key in the
following BASIC program to test that the communication port and scanner are
working.
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, the hardware
interface and scanner are working.
The next step would be to investigate
whether the application software and the scanner configuration match.
If the application does not support RS232 scanners, a software wedge program
is available that will take RS232 data and place it into a keyboard buffer.
This
program tells the PC to ignore RTS-CTS, Data Set Ready (DSR) and Data
Carrier Detect (DCD) signals.
If the demonstration program works but the
customer's application software does not, jumper RTS to CTS and Data Terminal
Reading (DTR) to DCD and DSR on the back of your PC.
10
CLS
20
ON ERROR GOTO 100
30
OPEN “COM1:9600,S,7,1,CSO,DSO,CD0,LF” AS#1
35
PRINT “SCAN A FEW BAR CODES”
40
LINE INPUT #1, BARCODE$
50
PRINT BARCODE$
60
K$ = INKEY$: IF K$ = CHR$(27) THEN GOTO 32766
70
GOTO 40
100
PRINT “ERROR NO.”; ERR ;“PRESS ANY KEY TO TERMINATE.”
110
KK$ = INKEY$: IF K$ = “”THEN GOTO 110
32766
CLOSE: SYSTEM
32767
END