The text of a manual · part 9 of 14
BL-180 Series User's Manual, CCD Bar Code Reader: Chapter 4 Serial Communication (RS-232C/RS-422A), pages 61 to 68
Pages 61 to 68 of 109, from BL-180 Series User's Manual, CCD Bar Code Reader
The original document is the PDF (568 KB). 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-180 and Keyence BL-185
Page 61
4.3 Command Communication 4.3.4 Response Error Code When an incorrect command is sent to set parameters, the BL-180 sends back data indicating the cause of the error (error code). For the commands corresponding to the error codes, see the error code column given in the table on the following pages. Error code
Cause of error
00 01 02 03
Undefined command. Command format is incorrect. Nothing corresponds to the number in the command. “m” value (codes 1 to 4) is other than 0 to 3. “Bar code type setting command” was not sent first. Sending “No. of readable digits setting command” is invalid for JAN code. The number in the command is too long. “hhh...” data is too short. “n” value is not 0 or 1. “n” value is exceeding the setting range. “nnn” or “nn” value is exceeding the setting range. “hhh...” is not specified in HEX (hexadecimal) code. “hhh...=FF” cannot be set. “hhh...” or “aaa...” contains more than the specified number of characters. Characters of “aaa...” are invalid. Data in the EEPROM may be damaged. Perform initial setup. Error in the area storing initial settings. Settings are automatically initialized. \ is not followed by !, ? or \ in preset data. (See page 70.) Two !s exist in preset data. (See page 20.) The BL-180 may malfunction. Contact KEYENCE.
04 05 06 07 08 09 10 11 12 13 14 15 17 18 99
4.3.5 Description of Parameter Setting Commands Saving/Initializing Settings/Quitting Setting Mode Command being sent
Respons e
Saves settings in the EEPROM. Initializes settings.
SAVE
OK
See page 51.
DFLT
OK
Quits the setting mode.
SEND
OK
Returns to the default-settings, and saves the set- 00,05 tings in the EEP-ROM. 14,15 See page 51. -
Function
Description
Error Code -
53
Page 62
4.3 Command Communication Setting Bar Code Type and Number of Readable Digits for Codes 1 to 4 The following describes the parameter setting commands for Codes 1 to 4. Be sure to send “Bar code type setting command” first before setting other parameters. Note
When “Bar code type setting command” is newly sent, all other parameters for the specified code will return to the default settings. In this case, set all other parameters again. Setting change commands and setting confirmation commands are described on the following pages.
Function Setting bar code type for codes 1 to 4.
Setting Max. No. of readable digits command being sent Change Confirm
CODEm=n CODEm
Respons e OK mn
Setting Min. No. of readable digits
Change Confirm Change Confirm
MAXm=nn MAXm MINm=nn MINm
OK mnn OK mnn
CODE39 Sending start/stop character.
Change Confirm
WCm00n RCm00
OK 00n
CODE39 Inspection of check digit (Modulus 43)
Change Confirm
WCm01n RCm01
OK 01n
Description m= 0 to 3:Codes 1 to 4 n= 0:CODE 39 1:ITF 2:Industrial2-of-5 3: Codabar 4: UPC/EAN 5: CODE128 6: COOP2-of-5 7: None m= 0 to 3: Codes 1 to 4 nn= 01 to 32 * For CODE39, Codabar: 03 to 32 * For ITF: 02 to 32 * For CODE128: 01 to 64 Note: With EAN code, this command causes error. m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
Command being sent
Respons e
CODE39 Sending check digit.
Change Confirm
WCm02n RCm02
OK 02n m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
ITF Inspection of check digit (Modulus 10)
Change Confirm
WCm10n WCm10
OK 10n m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
ITF Sending check digit.
Change Confirm
WCm11n RCm11
OK 11n
Change Codabar Sending start/stop character. Confirm
WCm30n RCm30
OK 30n
Codabar Start/Stop character type
Change Confirm
WCm31n RCm31
OK 31n
Codabar Inspection of check digit
Change Confirm
WCm32n RCm32
OK 32n
Codabar Sending check digit
Change Confirm
WCm33n RCm33
OK 33n m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Lower case 1: Upper case m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
Function
54
Description
Error Code
00, 01 03, 05 08, 14
00, 01 03, 04 05, 09 14
00, 02 03, 04 05, 07 14
Error Code
00, 02 03, 04 05, 07 14
Page 63
4.3 Command Communication Command being sent
Respons e
Codabar Setting check digit type
Change Confirm
WCm34n RCm34
OK 34n
UPC(A-E)/EAN
Change Confirm
WCm40n RCm40
OK 40n
Change Confirm
WCm41n RCm41
OK 41n
Function
Reading UPC-E UPC(A-E)/EAN
Reading EAN 8 digits
Function UPC(A-E)/EAN
Reading JAN 13 digits UPC(A-E)/EAN
No. of UPC-A output digits UPC(A-E)/EAN
Adding “0” to UPC-E system code
Command being sent
Respons e
Change Confirm
WCm42n WCm42
OK 42n
Change Confirm
WCm43n RCm43
OK 43n
Change Confirm
WCm44n RCm44
OK 44n
CODE128 Checking double character start pattern (See p. 34.) Setting max. code length output function
Change Confirm
WCm51n RCm51
OK 51n
Change Confirm
WCm83n RCm83
OK 83n
Setting direction for max. code length output
Change Confirm
WCm84n RCm84
OK 84n
Setting effective digits for max. code length output
Change Confirm Change Confirm
WCm85nn RCm85 WCm86nn RCm86
OK 85nn OK 86nn
Setting label orientation speci- Change fied reading Confirm
WCm81n RCm81
OK 81n
Setting orientation for orienta- Change tion- specified reading Confirm
WCm82n RCm82
OK 82n
Setting starting digit for max. code length output
Description m= 0 to 3: Codes 1 to 4 n= 0: Mudulus16 1: Modulus 11 2: Modulus 10/Wait 2 3: Modulus 10/Wait 3 4: 7 Check DR 5: Modulus 11-A 6: Modulus 10/Wait 2-A m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
Description
Error Code
00, 02 03, 04 05, 08 14
00, 02 03, 04 05, 07 14
Error Code m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0:Output in 13 digits 1:Output in 12 digits m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable
00, 02 03, 04 05, 07 14 m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Forward 1: Reverse m= 0 to 3: Codes 1 to 4 nn= 01 to 32: Effective digits m= 0 to 3: Codes 1 to 4 nn= 01 to 32: Starting digit m= 0 to 3: Codes 1 to 4 n= 0: Disable 1: Enable m= 0 to 3: Codes 1 to 4 n= 0: Forward 1: Reverse
00, 02 03, 04 05, 09 14
00, 02 03, 04 05, 07 14
55
Page 64
4.3 Command Communication Setting Reading Mode/Data Addition Functions Command being sent
Respons e
Setting reading mode
Change Confirm
WP12n RP12
OK 12n
Setting data send timing
Change Confirm
WP13n RP13
Setting repeat-read time in Change multi label reading mode 1 or Confirm 2 Setting decoding match count Change Confirm Setting decoding match count Change in additional information Confirm Setting scans in additional Change information Confirm Setting label orientation in additional information
Function
Change Confirm Setting code type in additional Change information Confirm
56
Description
Error Code n= 0: Single label 1: Multi label 1 2: Multi label 2 3: Multi label 3
00, 02 05, 08 14
OK 13n
N= 0: Sends data after reading 1: Sends after timing input turns off
00, 02 05, 07 14
WP41nnn RP41
OK 41nnn nnn=001 to 225 (by 100 ms step)
WP43nnn RP43 WP10n RP10 WP11n RP11
OK 43nnn OK 10n OK 11n
WP14n RP14 WP17n RP17
OK 14n OK 17n nnn=001 to 225
00, 02 05, 09 14 n= 0: No addition 1: Add n= 0: No addition 1: Add Note: Effective only when No. of decodings are added. n= 0: No addition 1: Add n= 0: No addition 1: Add
00, 02 05, 07 14
Page 65
4.3 Command Communication Setting Trigger Input (Starting Test Mode) Function Setting signal type Setting one-shot input time Setting time constant of trigger input Setting state of trigger input Starting test mode when trigger input turns on. (To specify the test mode, use the command below.) Specifying the test mode to be started when trigger input turns on. Starting test mode when power is turned on. Setting characters of trigger on command Setting characters of trigger off command
Note
Command being sent
Respons e
Description
Change Confirm Change Confirm Change Confirm Change Confirm Change Confirm
WP05n RP05 WP42nnn RP42 WP04n RP04 WP03n RP03 WP06n RP06
OK 05n OK 42nnn OK 04n OK 03n OK 06n
Change Confirm
TRGTn TRGT
OK TRGTn
N= 1: Reading rate check mode 2: Tact check mode
Change Confirm
TESTn TEST
OK TESTn n= 0: Reset 1: Reading rate check mode 2: Tact check mode
Change Confirm Change Confirm
WP56hhh... RP56 WP57hhh... RP57
OK 56hhh... OK 57hhh...
hhh...=Trigger on command (Up to 8 characters) * Specify characters in HEX (hexadecimal) code.
Error Code n= 0: Level 1: One-shot nnn=001 to 225 (by 100 ms step) n= 0: 2 ms 1: 10 ms n= 0: Normal-open 1: Normal-close
00, 02 05, 07 14 n= 0: Disable 1: Enable hhh...=Trigger off command (Up to 8 characters) * Specify characters in HEX (hexadecimal) code.
00, 02 05, 08 14
00, 02 05, 11 14
To set characters of the trigger on/Off command, send the following command. Example 1: Change the trigger on command to S. S
WP5653CR
S=53h
57
Page 66
4.3 Command Communication Setting Communication Parameters Function Setting baud rate
Setting data bit length command being sent Change Confirm
Change Confirm Setting parity check Change * To set the parity type, use the Confirm command below. Setting parity type Change Confirm Setting Stop bit Change Confirm Setting handshaking protocol 1 Change * To specify the protocol, use Confirm the command below. Setting handshaking protocol 2 Change Confirm Setting RTS/CTS handshaking Change Confirm
58
WP35n RP35
Respons e OK 035n
Description N= 0: 9600 bps 1: 4800 bps 2: 2400 bps 3: 1200 bps 4: 600 bps 5: 38400 bps 6: 31250 bps 7: 19200 bps
WP30n RP30 WP31n RP31
OK 30n OK 31n n= 0: 7 bits 1: 8 bits
WP32n RP32 WP33n RP33 WP07n RP07
OK 32n OK 33n OK 07n n= 0: Even 1: Odd
WP08n RP08 WP22n RP22
OK 08n OK 22n n= 0: PASS/RTRY handshaking 1: ACK/NAK handshaking
Error Code
00, 02 05, 08 14 n= 0: Disable 1: Enable n= 0:1 bit 1: 2 bits n= 0: No protocol 1: Set protocol n= 0: Disable 1: Enable
00, 02 05, 07 14
Page 67
4.3 Command Communication Setting Communication strings Function command being sent
Setting header
Change Confirm
WP51hhh... RP51
OK 51hhh...
Setting delimiter
Change Confirm
WP52hhh... RP52
OK 52hhh...
Setting partition mark when Change additional information is used. Confirm
WP50hh RP50
OK 50hh
Setting intermediate delimiter when multi label reading mode 2 or 3 is used.
Change Confirm
WP54hhh... RP54
OK 54hhh...
Setting read error code
Change Confirm
WP55hhh... RP55
OK 55hhh...
Note
Description
Error Code hhh...= Header (Up to 5 characters) * Specify characters in HEX (hexadecimal) code. * To set no header, hhh...=FF. hhh...= Delimiter (Up to 5 characters) * Specify characters in HEX (hexadecimal) code. * To set no delimiter, hhh...=FF. hh= Partition mark(1 character) * Specify the mark in HEX (hexadecimal) code. * To set no mark, hh=FF. hhh...=Intermediate delimiter (Up to 5 characters) * Specify characters in HEX (hexadecimal) code. * To set no intermediate delimiter, hhh...=FF. hhh...= Read error code (Up to 8 characters) * Specify characters in HEX (hexadecimal) code. * To set no read error code, hhh...=FF.
00, 02 05, 06 10, 12 14
Response
To set communication strings, send the following command. Example 1: Set the communication data format to SOH 01 Bar Code Data ACR . SOH 0
0
A CR
WP51013031CR
WP52410DCR
SOH=01h, 0=30h, 1=31h, A=41h, CR=0Dh
Example 2: Set the read error code to “BR”. B
R
WP554252CR
B=42h, R=52h
Example 3: Set no read error code. WP55FFCR
Utility Setting (Buzzer, OK/NG output duration, Preset data for compare) Function command being sent
Response
Change Confirm
WP15n RP15
OK 15n
Setting OK/NG output duration Change Confirm
WP40nnn RP40
OK 40nnn
Registration of preset data for Change compare Confirm
WP68aaa... RP68
OK 68aaa...
Setting buzzer
Note
Description n= 0: on 1: on when OK output turns on. 2: on when NG output turns on. 3: off nnn= 001 to 255 (by 10 ms step) aaa...= Preset data (Up to 32 characters) * For CODE128, see page 70. * To delete the preset data, send WP68.
Error Code 00, 02 05, 07 14 00, 02 05, 09 14 00, 02 05, 12 13, 14 17, 18
To register the preset data, send the following command. Example: Register “ABC123” as preset data. WP68ABC123CR
59
Page 68
4.3 Command Communication
60