Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 10 of 15

Laser Bar Code Reader BL-500 Series User's Manual: Chapter 4 Serial Communication (RS-232C/RS-422A), pages 63 to 70

Pages 63 to 70 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 63

4.3 Command Communication Note

[LF] can be added at the end of the command being sent. In this case, however, [LF] is not added to the response data. When [ESC] is added before the command being sent, characters in the BL-500’s command receiving buffer are cleared. If the BL-500’s command receiving buffer contains erroneous characters due to a data transmission error during communication, add [ESC] to the command being sent.

Note

For command communication, set the time duration between transmission of each character (byte) to up to 30 seconds. If this duration exceeds 30 seconds, the BL-500 cancels the received characters.

51

Page 64

4.3 Command Communication 4.3.4 Response Error Code When an incorrect command is sent to set parameters, the BL-500 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 UPC/EAN 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 72.) Two !s exist in preset data. (See page 19.) The BL-500 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 Function

Response

Saves settings in the EEPROM. Initializes settings.

SAVE

OK

See page 49.

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 49. -

52

Description

Error Code

Command being sent

-

Page 65

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

Response 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

Function

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

Response

Description

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

Codabar Sending start/stop character.

Change 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

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

53

Page 66

4.3 Command Communication Function

Command being sent

Response

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

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

Response

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

54

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

Page 67

4.3 Command Communication Setting Reading Mode/Data Addition Functions Function

Command being sent

Response

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

Change Confirm Setting code type in additional Change information Confirm

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

00, 02 05, 07 14 n= 0: No addition 1: Add

55

Page 68

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

Description

Command being sent

Response

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.

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

56

Error Code

S=53h

Page 69

4.3 Command Communication Setting Communication Parameters Function Setting baud rate command being sent Change Confirm

Setting data bit length

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 Setting RS-485 multi drop link Change Confirm Setting ID No. for RS-485 Change multi drop link. Confirm

WP35n RP35

Response 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

Error Code

00, 02 05, 08 14

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 WP34n RP34 WP44nn RP44

OK 08n OK 22n OK 34n OK 44nn n= 0: PASS/RTRY handshaking 1: ACK/NAK handshaking n= 0: Disable 1: Enable n= 0:1 bit 1: 2 bits

00, 02 05, 07 14 n= 0: No protocol 1: Set protocol n= 0: Disable 1: Enable n= 0: Disable 1: Enable 00, 02 05, 09 14 nn=01 to 31

Special Commands for Reading Reversed Bar Codes Function Reading reversed bar codes (white bars on a black base)

CAUTION command being sent Change Confirm

WP0Rn RP0R

Response OK 0Rn

Description n=

0: Reverse OFF (Default) 1: Reverse ON

Because the white area of a reversed bar code is smaller than a regular bar code, reflection on a reversed bar code is weaker. This often makes it difficult to read reversed bar codes. Therefore, the BL may not perform at the levels described in the specifications. Run a series of read tests to ensure that the BL correctly reads the targeted reversed bar codes.

57

Page 70

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 Change when multi label reading mode Confirm 2 or 3 is used.

WP54hhh... RP54

OK 54hhh...

Setting read error code

WP55hhh... RP55

OK 55hhh...

Change Confirm

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 (Stability LED, OK/NG output duration, Preset data for compare) Function command being sent

Indication of Stability LED

Description

WP09n RP09

OK 09n n=0: Disable 1: Enable

Setting OK/NG output duration Change Confirm

WP40nnn RP40

OK 40nnn nnn= 001 to 255 (by 10 ms step)

Registration of preset data for Change compare Confirm

WP68aaa... RP68

OK 68aaa...

aaa...= Preset data (Up to 32 characters) * For CODE128, see page 72. * To delete the preset data, send WP68.

Note

Change Confirm

Response

To register the preset data, send the following command. Example: Register “ABC123” as preset data. WP68ABC123CR

58

Error Code 00, 02 05, 07 14 00, 02 05, 09 14 00, 02 05, 12 13, 14 17, 18