The text of a manual · part 12 of 15
Laser Bar Code Reader BL-500 Series User's Manual: APPENDIX, pages 81 to 90
Pages 81 to 90 of 116, from Laser Bar Code Reader BL-500 Series User's Manual
The original document is the PDF (1.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Keyence BL-501, Keyence BL-550H, Keyence BL-551H and Keyence BL-500
Page 81
A.5 Example Program for Serial Communication
A.5 Example Program for Serial Communication The following is a example program that allows data communication and command communication. Type in a command and press [Enter] to send the data to the BL-500. Only the QUIT command can be sent by pressing [Q]. Set the BL-500 as follows: • Header: [STX] Delimiter: [ETX] • Handshaking protocol: No handshaking or PASS/RTRY handshaking 100 ‘***BL-500 SAMPLE PROGRAM********************************************* 110 CLS 3 120 DAT$=””:RD$=””:CM$=”” 130 OPEN “COM1:” AS #1 140 *BUFFCLR :’***CLEAR BUFFER******************************************** 150 A=LOC(1) 160 IF A<>0 THEN R$=INPUT$(1,#1) :GOTO *BUFFCLR 200 ‘ 210 *MAIN :’***MAIN ROUTINE*********************************************** 220 K$=INKEY$ 230 IF K$<>”” THEN GOSUB *COMMAND 240 A=LOC(1) 250 IF A<>0 THEN GOSUB *RECEIVE 260 GOTO *MAIN 300 ‘ 310 *Receive :’***RECEIVE DATA 320 RD$=INPUT$(1,#1) 330 IF RD$=CHR$(&H02) THEN RD$=”” :’RECEIVE STX 340 IF RD$=CHR$($H03) THEN GOSUB *BARCODE :RETURN :’RECEIVE ETX 350 IF RD$=CHR$($H0D) THEN GOSUB *RESPONSE :RETURN :’RECEIVE CR 360 DAT$=DAT$+RD$ 370 RETURN 400 ‘ 410 *COMMAND :’***SEND COMMAND******************************************** 420 IF K$=CHR$(&H0D) THEN *SEND 430 IF K$=”Q” AND CM$=”” THEN CM$=”QUIT”:GOTO *SEND 440 PRINT K$; 450 CM$=CM$+K$ 460 RETURN 470 *SEND 480 PRINT #1, CM$;CHR$(&H0D); :’SEND COMMAND 490 PRINT:PRINT CM$;”COMMAND IS SENT” 500 CM$=”” 510 RETURN 600 ‘ 610 *RESPONSE :’***DISPLAY RESPONSE DATA TO THE COMMAND******************* 620 PRINT DAT$ ;”IS SENT BACK” 630 DAT$=”” 640 RETURN 700 ‘ 710 *BARCODE :’***DISPLAY BAR CODE DATA*********************************** 720 PRINT DAT$ ;”IS READ” 730 DAT$$=”” 740 RETURN
69
Page 82
A.6 Troubleshooting
A.6 Troubleshooting If a problem occurs during operation, please check the following troubleshooting notes first. If you cannot fix the problem, contact KEYENCE or your nearest dealer.
Bar codes cannot be read. Check whether power is applied to the unit. Confirm that the power supply voltage and capacity is 5 VDC±5% and 320 mA (340 mA for the BL-500H series). Check the wiring of the power supply unit and the trigger input terminal (see page 2).
CAUTION
Connecting the power supply unit with the reverse polarity may damage the BL series. If the BL-500 does not operate, contact KEYENCE. Check whether the laser is emitting • Check whether the laser stop command (LOCK, see page 50) has been sent to the BL series. If so, send the laser stop reset command (UNLOCK). If a laser stop command has been executed, the top LED on the STABILITY indicator will be flashing. Check the bar code setting (type, No. of digits). Check the following parameters using the setup software. • Bar code type, No. of digits. • Setting of the check digit inspection (enabled or disabled) • Setting of the label orientation-specified reading
Note
When using CODE39 or Codabar, include the start/stop characters and check digit in the number of digits. For Code128, see page 72. Check the distance and angle between the BL-500 and bar code. Check the distance and angle while referring to “Mounting angle and mounting distance” on page 6. Check the bar code margins (quiet zones). A bar code requires the right and left margins to be at least 10 times wider than the narrow bar width. If the bar code margins are too narrow, it may not be read. Check the bar code label length. The bar code label length is the lateral length of a bar code including the right and left margins (quiet zones). The readable bar code label length is limited depending on the reading distance. See “Reading Range Characteristics (Typical)” on page 62 to 65. Check the bar code. A bar code with blurred sections, defects or stains may not be read correctly. Bar codes printed with dot matrix or ink jet printers are prone to such problems.
70
Page 83
A.6 Troubleshooting Check whether the transmitter (light source) and the receiver (optical pickup) are clean. If moisture, oil or dust adheres to the transmitter or the receiver, wipe the units using a soft cloth and a mild plastic cleaner. Check the environmental conditions. See “Hints on correct use” on page 4.
Reading rate check mode is not 100%. Check the previous item “Bar codes cannot be read”. Note
The Read rate indicates the number of acceptable decodings (reads) during 10 scans of a bar code. When a bar code has stains or defects, the read rate is reduced. However, even when the read rate is 20%, 2 decodings are possible during 10 scans. Therefore, if the number of decode matches is 2, the bar code can be read. If the trigger input can be set enough long, the read operation is not affected.
Initial settings cannot be sent to the BL-500 series using the setup software. • Check whether the communication parameters such as baud rate and data length conform to the settings of the BL-500. • Check whether the pin assignment of RS-232C cable conforms to those of the BL-500 and the PC. Check that the cable isn’t disconnected. Also check the BL-U1’s connection. • Check whether the BL-500’s or BL-U1’s power switch is on. • Check whether the PC’s RS-232C interface is “enabled”. • If you are using the BL-U1, check that its DIP switches are set to RS-232C.
71
Page 84
A.7 CODE128 Specifications
A.7 CODE128 Specifications Setting No. of Digits • The start/stop character and check digit are not included in the number of digits. • FNC1 to 4 (Function codes), SHIFT, and CODE-A to -C should not be added to the number of digits. • The number of digits setting range varies depending on the start character (CODE-A to -C). CODE-A, B: 1 to 32 CODE-C: 2 to 64 One digit of CODE-A or CODE-B represents two digits of CODE-C. Data Transmission • The start/stop character and check digit cannot be sent. • FNC1 to 4 (Function codes), SHIFT, and CODE-A to -C cannot be sent. • Control codes are sent. Note
Do not use CODE128 with control codes when you build a multidrop link. Communication errors may occur. Registration of Preset Data The number of characters that can be registered as preset data is up to 32 digits for CODE-A or CODE-B, and up to 64 digits for CODE-C, as described above. When ! or ? is registered as preset data, it functions as the Preset “!” “?” Function, as described on page 19. Since CODE128 can represent all ASCII codes as bar code data, ! or ? can also be represented as bar code data. To register ! or ? as preset data, send \! or \? to differentiate it from the Preset “!” “?” function. To register \ as preset data, send \\.
Example:
To register 123 \!?ABC as preset data, send the following command (see page 58). WP68123 \\!\?ABC Control codes (00h to 2Fh of the ASCII code table, such as and <STX>), start/ stop character, check digit, FNC1 to 4 (function codes), SHIFT or CODE-A to-C cannot be registered as preset data. (Data comparison is also impossible.)
72
Page 85
A.8 ASCII Code Table
A.8 ASCII Code Table Upper 4 bits HEX
Lower 4 bits
0 1 2 3 4 5 6 7 8 9 A B C D E F
0
1
2
3
4
5
6
7
Binary
0000
0001
0010
0011
0100
0101
0110
0111
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
SOH STX ETX EOT ENQ ACK BEL BS HT LF HM CL CR SO SI
DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC
(SP) ! “ # $ % & ‘ ( ) * + , . /
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
‘ a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ del
73
Page 86
A.9 Default Settings
A.9 Default Settings In the main setting screen, the default bar code selections for the four bar code fields are as shown below.
Bar Code Default Settings Below are the default settings for each bar code setting screen. CODE 39
ITF
74
Page 87
A.9 Default Settings
20f5
Code 1 2of5
BL-500 Series Setup(Code setup] |
Max code length 32 [1-32] Min code length 1 (1-32)
LO Max code length output
Oo Specify label orientation
Codabar -
Code 1 Codabar
BL-500 Series Setup(Code setup] |
Max code length 32 [3-32] Min code length 3 (3-32) EX] Send start/stop charact
Start/stop digits @ ‘Lower-case Oo Inspect check-digit o Upper-case
LO Max code length output
Oo Specify label orientation
UPC-EAN -
Code 1 UPC/EAN
BL-500 Series Setup(Code setup] |
EX] Read EAN 8 code EX] Read UPC-A [EAN 13] code EX] Read UPC-E
CO Add UPC-E system code 0
© 12 digits
LO Max code length output
Oo Specify label orientation
75
Page 88
A.9 Default Settings
COOP 2opf5 [ BL-500 Series Setup(Code setup] Code 1 Max code length 32 (1-64) CODE128 Min code length 1 (1-64) OO Check double-character start pattern LO Max code length output Oo Specify label orientation CODE 128 [ BL-500 Series Setup(Code setup] | Code 1 Max code length 32 (1-32) COOP 2of5 Min code length 1 (1-32)
LO Max code length output
Oo Specify label orientation
Read Mode/Data Addition Functions default settings
BL-500 Series Setup(Main) Untitled.CFG File Send Info
Code 1 Code 2 Code setup | setup | [Codabar [+] | setup | Code 3 Code 4
[UPC/EAN [4] [setup] [None, [#] [setup]
Read mode @ Singe © Multi1 © Multi2 © Multi 3
Data-send @ Afterread © At trigger input
Decoding . match count 2 times (1-255) Trigger input Additional CJ Decoding match count information LO Code type DO Label ori i, Utility J
76
Page 89
A.9 Default Settings Trigger input default settings
Communication Parameters default settings
Communication strings default settings
77
Page 90
A.9 Default Settings
Utility default settings
™
Stability LED
OK/NG output duration
Compare with:
ASCII
BL-500 Series Setup(Utility]
50
X 10ms (1-255)
78