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 7 of 12

BL-600 Series User's Manual: Laser Bar Code Reader, pages 61 to 70

Pages 61 to 70 of 112

The original document is the PDF (1.0 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-600 and Keyence BL-601

Page 61

Chapter 8

PCL Link

8.1.2 Devices used for PLC link The BL-600 supports the following PLC devices. To use MELSEC-A Series, select the data register or file register. PLC

Device name

KV-10/16 Data memory KV-24/40/80 Data memory NEW KV-10/16/24/40 KV-300 Data memory MELSEC-A SYSMAC-C

Memory area DM0000 to DM0999 DM0000 to DM1999 DM0000 to DM8999

Data register

D0000 to D8191

File register

R0000 to R8191 (according to the setting)

Data memory

DM0000 to DM6143

*

The available memory areas of the MELSEC-A or SYSMAC-C may be smaller than the following data. For details, see the instruction manual for the PLC being used.

*

The MELSEC-A Series provides an extension file register.

*

When a block number is specified during the BL-600 setup, the specified extension file register is used. When “0” is specified for the block number, the extension file register of the block number specified in the PLC program is used. If no block number is specified (during the BL-600 setup and PLC programming), the file register incorporated in the CPU is used.

Note: KV-300 is not available in Europe.

8

131

Page 62

Chapter 8

8.2

PLC Link

Setting the BL-600 and PLC This section describes setting the BL-600 Series and the PLC.

8.2.1 Setting the BL-600 Series Use the BL-600 setup software to set the following. For the differences in setting due to the link unit or PLC type, see the next subsection “Setting the PLC”. 1. In [[Comm settings-1]], set the following data. •

Match the baud rate, data length, parity and stop bit length of the BL-600 to those of the PLC.

•

Disable the RTS/CTS protocol.

•

Disable the multi-drop link.

2. In [[Comm settings-2]], set the following data. •

Type of the PLC When using the KV-L2* in “Display interface mode”, set “SYSMAC-C” in the BL-600 settings.

•

PLC trigger input area

•

DM head address

•

PLC unit No./station No.

•

Set whether or not the final register is used.

8.2.2 Setting the PLC Set the PLC or link unit as follows: ■ Setting MELSEC-A Series 1. Set the RS-232C communication parameters (baud rate, data length, parity and stop bit length) according to the BL-600’s settings.

8

2. Set the station number according to the BL-600’s setting. 3. Set the mode to “Protocol Type 4 ”. * Only for the AJ71QC24, set the mode to “Special protocol”, “ASCII”, and “Type4”. 4. Set the main channel to either “RS-232C” or “RS-422A”. 5. Set “Checksum” to “Enable”. 6. Set “Write during running” to “Enable”. 7. Set “Selecting computer link/multi-drop” to “Computer link” (for the AJ71UC24 only).

132

Page 63

Chapter 8

PCL Link

■ Setting SYSMAC-C Series 1. Set the RS-232C communication parameters (baud rate, data length, parity and stop bit length) according to the BL-600’s settings. 2. Set the unit number according to the BL-600’s setting. 3. Set the command level to “Level 1, 2, 3”. 4. Set “1:1/1:N” to “1:N”. 5. Set “I/O port” to either “RS-232C” or “RS-422A”. 6. Set “Trigger input” to “Internal”. 7. Set “Supply 5 V” to “Disable”. 8. Set “CTS” to “0 V (Normally ON).” *

The “I/O port”, “Trigger input”, “Supply 5 V” and “CTS” parameters may not be provided depending on the type of link unit.

*

If using the C200HE/HG/HX or a communication board, follow steps 1 and 2 above, and set the mode to “Upper link”, and “CTS control” to “None”. Use the initial settings for the other parameters.

■ Setting KV Series/handheld programmer port 1. The KV series’ RS-232C port must always be set to the following values: • Baud rate : 9600 bps • Data length: 8 bits • Parity: Even • Stop bit length: 1 bit 2. Set the RS-232C communication parameters of the BL-600 according to the above settings. Set the BL-600’s communication mode to “KV”. *

No other parameters need to be set.

■ Settings for KV-L2/KV mode* 1. Set the KV-L2’s communication mode to “KV mode”. Set the BL-600’s communication mode to “KV”.

8

2. The KV mode must be always set to the following values: • Baud rate : 9600 bps • Data length: 8 bits • Parity: Even • Stop bit length: 1 bit Set the RS-232C communication parameters of the BL-600 according to the above settings. 3. Set the station number to “00”. 4. To use the KV-L2 port 2, set the port 2 selector switch to “RS-232C” or "RS422A". *

No other parameters need to be set.

Note: KV-L2 is not available in Europe.

133

Page 64

Chapter 8

PLC Link ■ Settings for KV-L2/Display Interface mode* 1. Set the KV-L2’s communication mode to “Display Interface” mode. To use link mode, select “SYSMAC-C” for the BL-600’s setting. 2. Set the baud rate, data length, parity and stop bit length according to the RS232C communication parameters of the BL-600. 3. Set the station number to “00”. 4. To use the KV-L2 port 2, set the port 2 selector switch to “RS-232C” or “RS422A”. *

8

134

No other parameters need to be set.

Page 65

Chapter 8

8.3

PCL Link

Device Assignment The data areas used to control the BL-600 are provided in the PLC’s internal memory (D areas or DM areas). When a device head address is specified on the “PLC SETUP” screen in the BL600 setup software, the device numbers are automatically assigned based on the specified head address.

8.3.1 Data memory head address [Specified head address] +00 indicates the area where the bar code data is stored. [Specified head address] +01 to +03 are reserved areas and cannot be assigned for the bar code data. [Specified head address] +04 to +06 are the areas used by the PLC to send a reading trigger to the BL-600. *

The method for using the areas varies depending on the BL-600 scan method, “Level signal trigger” or “One-shot signal trigger”.

*

If the BL-600 Series is set to disable the “PLC Trigger Area”, data is not assigned to the data memory head address area. You can use this area for other purposes. Address

Description

Reference page 137

+00

Data memory head address for Code 1

+01

Reserved area for Code 2

137

+02

Reserved area for Code 3

137

+03

Reserved area for Code 4

137

+04

Reading trigger area Reading trigger response area * Only when “Level signal trigger” is selected. One-shot trigger time setup area * Only when “One-shot signal trigger” is selected.

+05 +06

137 to 139

Note 1: When using the BL-600 in multi-label read mode 3, addresses +00 to +03 are used as the data memory head addresses for Codes 1 to 4, respectively. Data is not stored in the areas for which the code type is not set. Note 2: If using the BL-600 Series in multi-label read mode 1 or 2, the read data is written one at a time to the area specified with address +00 in the order of the reading.

135

8

Page 66

Chapter 8

PLC Link

8.3.2 Data memory areas Bar code data read by the BL-600 is stored in the areas starting from “+00”. (Based on the specified data memory head address). “A” indicates the data memory head address Address

Reference page 139 to 140

Description

A+00

Data memory flag area

A+01

Label orientation

A+02

Decoding count/PMI

A+03

Scan count

140

A+04

Bar code type

A+05

Number of digits of bar code data

A+06

1st digit of bar code data

A+07

2nd digit of bar code data

A+08

3rd digit of bar code data

141

:

:

A+69

64th digit of bar code data

Note: The data memory areas accept up to 64 digits. However, the BL-600 Series can only read a maximum of 32 digits. It can only read 64 digits if the bar code type is CODE128 and the start character is CODE-C.

Example When the bar code types are set in Codes 1 to 3 in multi-label read mode 3 (Code 4 is not set) Head address: 100 DM100

200

DM101

300

DM102

400

(Code 1)

8

136

(Code 2)

(Code 3)

DM200

Flag

DM300

Flag

DM400

Flag

DM201

Label orientation

DM301

Label orientation

DM401

Label orientation

DM202

Decode count

DM302

Decode count

DM402

Decode count

DM203

Scan count

DM303

Scan count

DM403

Scan count

DM204

Type

DM304

Type

DM404

Type

DM205

Number of digits

DM305

Number of digits

DM405

Number of digits

•• •

•• •

•• •

•• •

•• •

•• •

Page 67

Chapter 8

PCL Link

8.3.3 Detailed description of device assignment +00 to +03 Data memory head address

Specify the head address of the areas where the read data is stored. * Specify the head address as binary data. Note: When using the BL-600 in multi-label read mode 3, +00 to +03 are used as the data memory head address for Codes 1 to 4, respectively. However, data is not stored in the area for which the code type is not set.

+04 to +06 Reading trigger area

These areas are used to send the trigger input signal to the BL-600 to start reading bar code data. *

If the BL-600 Series is set to disable the “PLC Trigger Area”, data is not assigned to the data memory head address area. You can use this area for other purposes.

Note: When connecting a photoelectric sensor for trigger input in the BL-600 Series, do not use these areas. The method for using the areas varies depending on the BL-600 scan method, “Level signal trigger” or “One-shot signal trigger”. Each case is described below. ■ When “Level signal trigger” is set • “Reading trigger area” at the +04 address is used to trigger the BL-600 to start reading the data (turn on the laser beams). •

“Trigger input response area” at the +05 address is used to check whether the data at +04 was sent correctly to the BL-600. When the BL-600 recognizes the +04 address (which means that the process has been completed), it returns a “1” to the +05 address. Address

Description

+04

Reading trigger area

+05

Trigger input response area

+06

Reserved

Data 1 ... Trigger ON 0 ... Trigger OFF 1 ... Process completed 0 ... Process not completed Reserved

8

137

Page 68

Chapter 8

PLC Link Operating procedure 1. Set the +05 address to “0”. 2. To trigger the BL-600 to start reading (to turn the trigger ON), set the +04 address to “1”. 3. When the BL-600 recognizes the change in the +04 address, it returns a “1” to the +05 address. The BL-600 then starts reading the data. If a “1” is not returned, the BL-600 has not recognized the +04 address yet. Do not immediately reset the +04 address to “0”. After confirming that a “1” has been returned to the +05 address, reset the address to “0”. 4. After reading the bar code data, the BL-600 writes new data in A+05 to A+69. 5. To turn the trigger OFF, reset the +04 address to “0”. 6. When the BL-600 recognizes the change in the +04 address, it returns a “1” to the +05 address. The trigger then turns OFF. If a “1” is not returned, the BL-600 has not recognized the +04 address yet. Do not immediately set the +04 address to “1”. After confirming that the +05 address has been set to “1”, reset the address to “0”. 7. If a reading error occurs, a reading error code is written in A+05 to A+69. Note: When quickly turning the trigger ON/OFF at the +04 address, the BL-600 may overlook the change in the +04 address and fail to turn the trigger ON/OFF. If this occurs, change the program so that the +05 address can confirm that the BL600 recognized the +04 address. If your system does not have the problem described above, monitoring by the +05 address is not required. ■ One-shot signal trigger • The +04 address “Reading trigger area” triggers the BL-600 to start reading (turn ON the laser). •

8

The +06 address “One-shot signal trigger time setup area” sets the scan time in one-shot signal mode. ➮ See page 86. When “0” is set for this address, the value set by the BL-600 setup software is used as the scan time. Address

Description

+04

Reading trigger area and response area

+05

Reserved

+06

One-shot signal trigger time setup area

Data 1: Trigger ON 0: Trigger OFF Reserved 0: Use the value set by the BL600 setup software. 1 to 255 (binary) : 100 ms to 25.5 s

* When the BL-600 recognizes “1”, “0” is set to the +04 address.

138

Page 69

Chapter 8

PCL Link

Operating procedure 1. To trigger the BL-600 to start reading, set the +04 address to “1”. 2. When the BL-600 recognizes the +04 address, it returns a “0” to the +04 address. The BL-600 then starts reading the data. 3. The BL-600 continues reading for the “one-shot signal trigger time” set at the +06 address. 4. When the BL-600 has read all the bar codes, it writes the new data in A+05 to A+69. 5. If a reading error occurs, the BL-600 writes a reading error code in A+05 to A+69. A+00 (A is the head address in which the data specified in +00 to +03 is stored.) Memory data flag areas

The memory data flag areas are used to flag that the bar code data has been stored. The following two methods are available depending on the application. ■ Real-time processing • A number of “0” or “1” is written to the memory data flag area. •

While the BL-600 is reading and writing the bar code data in the PLC’s memory, the flag area is set to “1”.

•

When new data is stored in addresses A+05 to A+69, address A+00 becomes “0”. In other words, new data is the data when address A+00 changes from a “1” to a “0”.

•

If the bar code reading interval of the BL-600 Series is shorter than that of the communication in the PLC link, data that has not been written into the specified area is stored in the transmission buffer of the BL-600 Series. ➮ See page 6-5. If the amount of stored data exceeds the capacity of the buffer, the entire contents of the buffer is cleared and an “OVER” is stored in the memory data area (A+05 to A+09). If an overflowed buffer error occurs, the BL-600 Series halts operation. It will resume operation once the “OVER” has been stored.

8

Example 1 Normally, the A+00 address is set to “0”. While the BL-600 is writing data, the flag area is “1”. When the flag area becomes “0”, the data stored in the A+05 to A+69 addresses can be processed.

Example 2 Normally, the A+00 address is set to “1”. When data writing is completed, the flag area becomes “0”. The data stored in the A+05 to A+69 addresses can be processed. Set the A+00 address to “1” immediately after data processing is completed. This enables the BL-600 to use the point at which the A+00 address becomes “0” as the trigger for writing new data. Note: When the BL-600 continuously reads bar codes, the real time processing mode may replace stored data with new data before the new data is processed in the PLC. To prevent this, use the sequential processing mode as shown in the next page.

139

Page 70

Chapter 8

PLC Link ■ Sequential processing • A number of “2” or “3” is written to the memory data flag area. •

When the A+00 address is “2”, new data can be stored.

•

When data writing is completed, the flag area becomes “3”, and new data has been stored in the A+05 to A+69 addresses.

•

After data processing is completed, set the flag area to “2”. Writing new data is impossible until the flag area is set to “2”.

•

Data that has not been written into the specified area is stored in the transmission buffer of the BL-600 Series. ➮ See page 112. If the amount of stored data exceeds the capacity of the buffer, the entire contents of the buffer is cleared and an “OVER” is stored in the memory data area (A+05 to A+09). When an overflowed buffer error occurs, the BL-600 Series halts operation. It will resume operation once the “OVER” has been stored.

Note: If the PLC link communication is not established or the memory data flag area stores data other than a “0” or a “2” at the occurrence of an overflowed buffer error, the BL-600 Series stops all operation because the “OVER” cannot be stored. (Laser emission is disabled even if the trigger input turns on.) In this case, check the settings and wiring of the BL-600 Series and the PLC, and the PLC program.

A+01 to A+04 Additional data area

The label orientation, decode count and other additional data are stored in these areas. Address

8

Description

A+01

Label orientation

A+02

Decode count

A+03

Scan count

A+04

Bar code type

Data 0: Reading error 1: Formal orientation 2: Reverse orientation 0 to 9999 (binary) 0 to 9999 (binary) 0: CODE 39 1: ITF 2: Industrial 2of5 3: Codabar 4: EAN/UPC 5: CODE128 6: COOP 2of5 7: Reading error 8: CODE 93

If PMI is added, only A+02 and A+03 store the following data. Address

140

Description

A+02

PMI (Preventive Maintenance Information)

A+03

Reserved

Data 0: Normal 1: Caution 2: Warning 9: Reading error Reserved