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 14 of 19

Laser Bar Code Reader BL-700 Series User's Manual: Chapter 1 Laser Safety Precautions, pages 104 to 113

Pages 104 to 113 of 161, from Laser Bar Code Reader BL-700 Series User's Manual

The original document is the PDF (1.4 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-700, Keyence BL-701 and Keyence BL-781

Page 104

Chapter 5

Serial Communication

Readout history check Outputs the readout OK and NG counts during trigger input ON.

Command: NUM Response: aaaaa/bbbbb/ccccc aaaaa = 00000 to 65535: Readout OK count bbbbb = 00000 to 65535: Readout NG count ccccc = 00000 to 65535: Trigger input ON count Description: These counts are reset to zero by turning the power OFF or sending the RESET command.

5

91

Page 105

Chapter 5

Serial Communication

5.3.2 Details on Parameter Setting Commands The following describes how to change the BL-700’s settings through command communication. You can use the setup software to change the BL-700’s settings instead of these commands.

Communication Details 1. Send the direct control command SSET to the BL-700. The BL-700 will shift to setting mode. After successfully executing the command, the BL-700 sends back an OK. 2. After the BL-700 shifts to setting mode, send the command (setting change command) corresponding to the item to be changed to the BL-700. After successfully executing the command, the BL-700 sends back an OK. If an error occurs with this command, the BL-700 sends back ERRnn. (nn sttands for error code numbers.) 3. To confirm the current settings, send a setting confirmation command. After successfully executing the command, the BL-700 sends back an OK. If an error occurs with this command, the BL-700 sends back ERRnn. 4. To save the current settings in the EEP-ROM, send SAVE to the BL-700. Once you save the settings in the EEP-ROM, the BL-700 will start with these settings when the BL-700 is turned on next. After successfully executing the command, the BL-700 sends back an OK. If an error occurs with this command, the BL-700 sends back ERRnn.

5

5. To quit the setting mode and perform the normal bar code reading, send SEND to the BL-700. After successfully executing the command, the BL-700 sends back an OK. If an error occurs with this command, the BL-700 sends back ERRnn.

Communication format When the command format is [Command][CR], the response format is [Response][CR]. When the command format is [STX][Command][ETX], the response format is [STX][Response][ETX].

Tips

• • •

Command

Response

Command CR

Response CR

STX Command ETX

STX Response ETX

<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-700’s command receiving buffer are cleared. If the BL-700’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-700 cancels the received characters.

92

Page 106

Chapter 5

Serial Communication

Response Error Code When an incorrect command is sent to set parameters, the BL-700 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

Undefined command.

01

Command format is incorrect.

02

Nothing corresponds to the number in the command.

03

“m” value (codes 1 to 4) is other than 0 to 3.

04

“Bar code type setting command” was not sent first. ➮ See P.94.

Sending “No. of readable digits setting command” is invalid for UPC/EAN code. 05

The number in the command is too long.

06

“hhh...” data is too short.

07

“n” value is not 0 or 1.

08

“n” value is exceeding the setting range.

09

“nnn” or “nn” value is exceeding the setting range.

10

“hhh...” is not specified in HEX (hexadecimal) code.

11

“hhh...=FF” cannot be set.

12

“hhh...” or “aaa...” contains more than the specified number of characters.

13

Characters of “aaa...” are invalid.

14

Data in the EEPROM may be damaged. Perform initial setup.

15

Error in the area storing initial settings. Settings are automatically initialized.

17

5

\ is not followed by !, ? or \ in preset data. ➮ See P.137 to 138.

18

Two !s exist in preset data. ➮ See P.100.

99

The BL-700 may malfunction. Contact KEYENCE.

93

Page 107

Chapter 5

Serial Communication

Description of Parameter Setting Commands ■ Saving/Initializing Settings/Quitting Setting Mode Function

Command being sent

Response

Description

Error code

Saves settings in the EEP-ROM.

SAVE

OK

See page 92.

–

Initializes settings.

DFLT

OK

Returns to the default-settings, and saves the settings in the EEP-ROM.

00, 05, 14, 15

Quits the setting mode.

SEND

OK

See page 92.

–

■ 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. *

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.

5

Function

Command being sent

Setting bar code type for codes 1 to 4.

Change

CODEm=n

Confirm

CODEm

Response

Description

Error code

OK m=0 to 3:Codes 1 to 4

00, 01, mn n=0: CODE 39 1: ITF

03, 05, 08, 14

2: Industrial2of5 3: Codabar 4: UPC/EAN 5: CODE128 6: COOP2of5 7: None 8: CODE93 Setting Max. No. of Change readable digits Confirm

MAXm=nn

OK m=0 to 3: Codes 1 to 4 00, 01,

MAXm mnn nn=01 to 32

03, 04,

* For CODE39,

05, 09,

Codabar: 03 to 32

14

* For ITF: 02 to 32 * For CODE128: 01 to 64

94

Setting Min. No. of readable digits

Change

MINm=nn

OK

Confirm

MINm mnn

CODE39 Sending start/stop character.

Change

WCm00n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm00

00n n=0: Disable

03, 04,

1: Enable

05, 07,

CODE39 Inspection of check digit (Modulus 43)

Change

WCm01n

OK m=0 to 3: Codes 1 to 4 14

Confirm

RCm01

01n n=0: Disable

Note: With EAN code, this command causes error.

1: Enable

Page 108

Chapter 5 Function

Command being sent

CODE39 Sending check digit.

Change

WCm02n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm02

02n n=0: Disable

03, 04,

1: Enable

05, 07,

WCm10n

OK m=0 to 3: Codes 1 to 4 14

WCm10

10n n=0: Disable

ITF Change Inspection of check digit (Modulus 10/ Confirm Wait 3)

Response

Serial Communication

Description

Error code

1: Enable

ITF Sending check digit.

Change

WCm11n

OK m=0 to 3: Codes 1 to 4

Confirm

RCm11

11n n=0: Disable

Codabar Sending start/stop character.

Change

WCm30n

OK m=0 to 3: Codes 1 to 4

Confirm

RCm30

30n n=0: Disable

Codabar Start/Stop character type

Change

WCm31n

OK m=0 to 3: Codes 1 to 4

Confirm

RCm31

31n n=0: Lower case

WCm32n

OK m=0 to 3: Codes 1 to 4

RCm32

32n n=0: Disable

1: Enable

1: Enable

1: Upper case

Change Codabar Inspection of check Confirm digit Change Codabar Sending check digit Confirm

1: Enable WCm33n

OK m=0 to 3: Codes 1 to 4

RCm33

33n n=0: Disable 1: Enable

Codabar Setting check digit type

Change

WCm34n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm34

34n n=0: Mudulus16

03, 04,

1: Modulus 11

05, 08,

2: Modulus 10/Wait 2 14 3: Modulus 10/Wait 3 4: 7 Check DR 5: Modulus 11-A 6: Modulus 10/ Wait 2-A EAN/UPC (A•E) Reading UPC-E EAN/UPC (A•E) Reading EAN 8 digits

Change

WCm40n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm40

40n n=0: Disable

03, 04,

1: Enable

05, 07,

Change

WCm41n

OK m=0 to 3: Codes 1 to 4 14

Confirm

RCm41

41n n=0: Disable 1: Enable

95

5

Page 109

Chapter 5

Serial Communication Function

Command being sent

Response

EAN/UPC(A•E) Reading JAN 13 digits

Change

WCm42n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm42

42n n=0: Disable

03, 04,

1: Enable

05, 07,

EAN/UPC(A•E) No. of UPC-A output digits

Change

WCm43n

OK m=0 to 3: Codes 1 to 4 14

Confirm

RCm43

43n n=0:Output in 13 digits

EAN/UPC(A•E) Adding “0” to UPCE system code

Change

WCm44n

OK m=0 to 3: Codes 1 to 4

Confirm

RCm44

44n n=0: Disable 1: Enable

WCm51n

OK m=0 to 3: Codes 1 to 4

RCm51

51n n=0: Disable 1: Enable

➮ See p. 32.

Change

WCm83n

OK m=0 to 3: Codes 1 to 4

Confirm

RCm83

83n n=0: Disable 1: Enable

Setting direction for Change max. code length Confirm output

WCm84n

OK m=0 to 3: Codes 1 to 4

RCm84

84n n=0: Forward

WCm85nn

OK m=0 to 3: Codes 1 to 4 00, 02,

RCm85

85nn nn=01 to 32

WCm86nn

OK m=0 to 3: Codes 1 to 4 14

RCm86

86nn nn=01 to 32

Setting label orientation specified reading

Change

WCm81n

OK m=0 to 3: Codes 1 to 4 00, 02,

Confirm

RCm81

81n n=0: Disable

03, 04,

1: Enable

05, 07,

Setting orientation for orientationspecified reading

Change

WCm82n

OK m=0 to 3: Codes 1 to 4 14

Confirm

RCm82

82n n=0: Forward

Change Setting effective digits for max. code Confirm length output

5

Setting starting digit Change for max. code Confirm length output

96

Error code

1:Output in 12 digits

CODE128 Checking Change double character Confirm start pattern

Setting max. code length output function

Description

1: Reverse

: Effective digits

03, 04, 05, 09,

: Starting digit

1: Reverse

Page 110

Chapter 5

Serial Communication

■ Setting Reading Mode/Data Addition Functions Function

Command being sent

Response

Description

Error code

Setting reading mode

Change

WP12n

OK n=0: Single label

00, 02,

Confirm

RP12

12n

1: Multi label 1

05, 08,

2: Multi label 2

14

3: Multi label 3 Setting data send timing

Change

WP13n

OK

Confirm

RP13

13n

N=0: Sends data after 00, 02, reading

05, 07,

1: Sends after timing 14 input turns off Setting repeat-read Change time in multi label Confirm reading mode 1 or 2

OK nnn=001 to 225

00, 02,

41nnn

(by 100 ms step)

05, 09, nnn=001 to 225

14

Setting decoding match count

Change

WP43nnn

OK

Confirm

RP43

43nnn

Setting decoding match count in additional information

Change

WP10n

OK

Confirm

RP10

10n

Setting scans in additional information

Change

WP11n

OK

Confirm

RP11

11n

1: Add

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

5

Note: Effective only when No. of decodings are added.

Setting code type in Change additional information Confirm Setting reading error code n=0: No addition

14

Change Setting label orientation in Confirm additional information

Tips

WP41nnn RP41

WP14n

OK

RP14

14n n=0: No addition 1: Add

WP17n

OK

RP17

17n n=0: No addition

Change

WP55hhh...

OK hhh ... = Reading error

Confirm

RP55

55hhh...

code (within 8 characters) 05, 06, * Specify the charac- 10, 12, ters in HEX (hexadeci- 14 mal) code. * If the reading error code is not specified, hhh... = FF.

1: Add 00, 02,

To set the reading error code, send the following command: Example 1 Set the reading error code to “BR”. BR WP554252 * B = 42h, R = 52h Example 2 Set no reading error code. WP55FF

97

Page 111

Chapter 5

Serial Communication ■ Setting Trigger Input (Starting Test Mode)

5

Function

Command being sent

Response

Description

Setting signal type

Change

WP05n

OK n=0: Level

Confirm

RP05

05n

1: One-shot

Setting one-shot input time

Change

WP42nnn

OK nnn=001 to 225

Confirm

RP42

42nnn

Setting time constant of trigger input

Change

WP04n

OK n=0: 2 ms

Error code 00, 02, 05, 07, 14 00, 02, 05, 09, 14 00, 02,

Confirm

RP04

04n

1: 10 ms

05, 07,

Setting state of trigger input

Change

WP03n

OK

Confirm

RP03

03n

Starting test mode when trigger input turns on. (To specify the test mode, use the command below.)

Change

WP06n

OK n=0: Disable

Confirm

RP06

06n

1: Enable

Specifying the test mode to be started when trigger input turns on.

Change

TRGTn

OK

Confirm

TRGT

TRGTn

Starting test mode when power is turned on.

Change

TESTn

OK

Confirm

TEST

TESTn

(by 100 ms step)

14 n=0: Normal-open 1: Normal-close

N=1: Reading rate

00, 02, check mode

05, 08,

2: Tact check mode 14 n=0: Reset 1: Reading rate check mode 2: Tact check mode

Setting characters of trigger on command

Change

WP56hhh...

OK hhh...=Trigger on

00, 02,

Confirm

RP56

56hhh...

command (Up to 8

05, 11, characters)

14

* Specify characters in HEX (hexadecimal) code. Setting characters of trigger off command

Change

WP57hhh...

OK

Confirm

RP57

57hhh...

hhh...=Trigger off command (Up to 8 characters) * Specify characters in HEX (hexadecimal) code.

Tips

To set characters of the trigger on/Off command, send the following command. Example 1 Change the trigger on command to S. S WP5653 * S=53h

98

Page 112

Chapter 5

Serial Communication

■ Setting Communication Parameters 1 Function

Command being sent

Response

Description

Error code

Setting baud rate

Change

WP35n

OK

N=5: 38400 bps

00, 02,

Confirm

RP35

035n

6: 31250 bps

05, 08,

7: 19200 bps

14

0: 9600 bps 1: 4800 bps 2: 2400 bps 3: 1200 bps 4: 600 bps Setting data bit length

Change

WP30n

OK

Confirm

RP30 WP31n RP31

Setting parity check Change * To set the parity Confirm type, use the command below. Setting parity type Setting Stop bit n=0: 7 bits

00, 02,

30n

1: 8 bits

05, 07,

OK n=0: Disable

31n

1: Enable

Change

WP32n

OK n=0: Even

Confirm

RP32

32n

1: Odd n=0:1 bit

Change

WP33n

OK

Confirm

RP33

33n

1: 2 bits

Setting RTS/CTS handshaking

Change

WP22n

OK n=0: Disable

Confirm

RP22

22n

1: Enable

Setting RS-485 multi drop link

Change

WP34n

OK n=0: Disable

Confirm

RP34

34n

1: Enable

Setting ID No. for RS-485 multi drop link.

Change

WP44nn

OK nn=01 to 31

Confirm

RP44

44nn

14

5 00, 02, 05, 09, 14

99

Page 113

Chapter 5

Serial Communication ■ Setting communication parameters 2 (When the PLC link is not used) Function

Command

Response Description

Error code

Handshaking protocol 1

Change

OK n = 0: No handshaking n = 1: Use protocol

00, 02,

*To set details of the protocol, use handshaking protocol 2.

14

Handshaking protocol 2

Adding checksum

Header

Delimiter

WP07n

Confirm RP07

07n

Change

WP08n

OK n = 0: PASS/RTRY protocol

Confirm

RP08

08n n = 1: ACK/NAK protocol

Change

WP39n

OK n = 0: Do not add

Confirm

RP39

39n

Change

WP51hhh... OK n = 1: Add

51hhh...

Confirm

RP51

Change

WP52hhh... OK

Confirm

RP52

5

Tips

52hhh...

hhh... = Header (up to five characters) * To set a header, use HEX (hexadecimal) codes. * hhh... = FF: Header is not set. hhh... = Delimiter (up to five characters) * To set a delimiter, use HEX (hexadecimal) codes. * hhh... = FF: Delimiter is not set.

To set the header and delimiter, send the following command: Example Set the communication data format to <SOH> 01 bar code data A <CR>. SOH 0

1

WP51013031

A CR

WP52410D

* SOH =01h, 0=30h, 1=31h, A=41h, CR =0Dh

100

05, 07,

00, 02, 05, 06, 10, 12, 14