The text of a manual · part 15 of 19
Laser Bar Code Reader BL-700 Series User's Manual: Chapter 1 Laser Safety Precautions, pages 114 to 123
Pages 114 to 123 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 114
Chapter 5
Serial Communication
■ Setting communication parameters 2 (only when PLC link is used) Function
Command
PLC link model
Change
Confirm
Response Description WP36n
RP36
OK
36n
Error code n = 0: PLC link disabled
00, 02, n = 1: SYSNAC-C
05, 07, n = 2: MELSEC-A
14 n = 3: KV n = 4: MELSEC-A (File register is used.)
Trigger input through PLC link
Change
WP37n
OK
Confirm
RP37
37n
DM head address
Change
WP45nn
OK
Confirm
RP45
45nn
Change
WP47nn
OK
Confirm
RP47
47nn
Change
WP46nnn
OK
Confirm
RP46
46nnn
PLC / station number
File register block number n = 0: Disable n = 1: Enable nn = 00 to 99
00, 02,
(0000 to 9900)
05, 09, 14 nn = 00 to 31 nnn = 000 to 255
5 ■ Setting communication strings Function
Setting partition Change mark when additional Confirm information is used. Setting interme- Change diate delimiter when multi label reading mode 2 Confirm or 3 is used.
Response Description
Command WP50hh RP50
OK 50hh
WP54hhh... OK RP54
54hhh...
Error code hh = Partition mark (1 character)
00, 02,
* Specify the mark in HEX (hexadecimal) code.
10, 12,
05, 06, 14 hhh = Intermediate delimiter (Up to 5 characters) * Specify the mark in HEX (hexadecimal) code. * To set no intermediate delimiter, hhh = FF.
101
Page 115
Chapter 5
Serial Communication ■ Utility Setting (Stability LED, OK/NG output duration, Preset data for compare) Function
Command being sent
Response
Description
Indication of Stability LED
Change
WP09n
OK n=0: Disable
Confirm
RP09
09n
1: Enable
Change
WP40nnn
OK nnn= 001 to 255
Confirm
RP40
40nnn
(by 10 ms step)
Setting OK/NG output duration Registration of preset data for compare
Tips
Change
WP68aaa...
OK aaa...= Preset data
Confirm
RP68
68aaa...
(Up to 32 characters)
To register the preset data, send the following command. Example Register “ABC123” as preset data.
5
WP68ABC123
102
* For CODE128, see P.136 to 137. * 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
Page 116
Chapter 6 PLC Link 6.1
PLC Link ............................................................................ 104
6.1.1 List of PLCs used for PLC link ............................................. 104 6.1.2 Devices used for PLC link .................................................... 105 6.2
Setting the BL-700 and PLC ............................................. 106
6.2.1 Setting the BL-700 series .................................................... 106 6.2.2 Setting the PLC .................................................................... 106 6.3
Device Assignment ........................................................... 109
6.4
PLC Link Error .................................................................. 116
6.5
Communication Time ....................................................... 117
Page 117
Chapter 6
6.1
PLC Link
PLC Link The PLC link enables read data to be directly stored in the internal memory of a PLC (programmable logic controller). Since the BL-700 directly controls the PLC’s memory, no program is required for data communication, resulting in a reduced number of programming steps. As compared with the serial communication using a computer, the PLC link involves the following limitations: •
The BL-700 settings cannot be changed because the PLC link cannot send a command to the BL-700. However, the PLC link provides a reading control address to start/end reading.
•
The PLC link cannot start the test mode.
6.1.1 List of PLCs used for PLC link KEYENCE KV series
(Built-in CPU port) KV-10/16/24/40/80 KV-300* (Serial interface module) KV-L2*
Mitsubishi MELSEC-A series
(Built-in CPU port) A2CCPU24 A2CCPU24-PRF (Calculator link unit) AJ71C24 AJ71C24-Sx AJ71UC24 A0J2-C214-S1 A1SJ71(U)C24-R2/PRF/R4
OMRON SYSMAC-C series
(Built-in CPU port) C20H/28H/40H/60H C200HS(CPU21/23/31/33) C200HE(CPU42) C200HG(CPU43/63) C200HX(CPU44/64) (High-order link unit) C200H-LK201(-V1) C500-LK203 C500-LK201-V1 C120-LK201-V1 C200H-LK202(-V1) C120-LK202-V1 (Communication board) C200HW-COM02 C200HW-COM03 C200HW-COM04 C200HW-COM05 C200HW-COM06
OMRON SYSMAC-CQM1 series
(Built-in CPU port) CQM1(CPU21/41/42/43/44)
OMRON SYSMAC-CV series
(Built-in CPU port) CV500 CV1000 CV-M1 (High-order link unit) CV500-LK201
6
Note: KV-300 and KV-L2 are not available in Europe.
104
Page 118
Chapter 6
PCL Link
6.1.2 Devices used for PLC link The BL-700 supports the following PLC devices. To use MELSEC-A series, select the data register or file register. 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. PLC
Device name
Memory area
KV-10/16
Data memory
DM0000 to DM0999
KV-24/40/80
Data memory
DM0000 to DM1999
KV-300*
Data memory
DM0000 to DM8999
MELSEC-A
Data register
DM0000 to D8191
File register
DM0000 to R8191 (according to the setting)
Data memory
DM0000 to DM6143
SYSMAC-C
The MELSEC-A series provides an extension file register. When a block number is specified during the BL-700 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-700 setup and PLC programming), the file register incorporated in the CPU is used.
6
Note: KV-300 is not available in Europe.
105
Page 119
Chapter 6
6.2
PLC Link
Setting the BL-700 and PLC
6.2.1 Setting the BL-700 series Use the BL-700 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 bits of the BL-700 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 Iinterface mode, set “SYSMAC-C” in the BL700 settings.
•
PLC trigger input area
•
DM head address
•
PLC unit No./station No.
•
Set whether or not the final register is used.
6 Note: KV-L2 is not available in Europe.
6.2.2 Setting the PLC Set the PLC or link unit as follows:
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 Set the RS-232C communication parameters of the BL-700 according to the above settings. Set the BL-700’s communication mode to “KV”. 2. No other parameters need to be set.
106
Page 120
Chapter 6
PCL Link
Settings for KV-L2/KV mode* 1. Set the KV-L2’s communication mode to “KV mode”. Set the BL-700’s communication mode to “KV”. 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-700 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". 5. No other parameters need to be set. Note: KV-L2 is not available in Europe.
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-700’s setting. 2. Set the baud rate, data length, parity and stop bit length according to the RS232C communication parameters of the BL-700. 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”. 5. No other parameters need to be set.
Setting MELSEC-A series 1. Set the RS-232C communication parameters (baud rate, data length, parity and stop bit length) according to the BL-700’s settings. 2. Set the station number according to the BL-700’s setting. 3. Set the mode to “Protocol Type 4 ”. 4. Set the main channel to “RS-232C”. 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).
107
6
Page 121
Chapter 6
PLC 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-700’s settings. 2. Set the unit number according to the BL-700’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 “RS-232C”. 6. Set “Trigger input” to “Internal”. 7. Set “Supply 5 V” to “Disable”. 8. Set “CTS” to “0 V (Normally ON).” *
6
108
The “I/O port”, “Trigger input”, “Supply 5 V” and “CTS” parameters may not be provided depending on the type of link unit.
Page 122
Chapter 6
6.3
PCL Link
Device Assignment The data areas used to control the BL-700 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 BL700 setup software, the device numbers are automatically assigned based on the specified head address.
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-700. The method for using the areas varies depending on the BL-700 scan method, “Level signal trigger” or “One-shot signal trigger”. These areas are not assigned if you set “Reading trigger input area” to “Disable” in the BL-700 setup software. (In this case, these areas can be used for other purposes.) Address
Description
Reference page
+00
Data memory head address for Code 1
P.111
+01
Reserved area for Code 2
P.111
+02
Reserved area for Code 3
P.111
+03
Reserved area for Code 4
P.111
+04
Reading trigger area
P.111 to 113
+05
Reading trigger response area * Only when “Level signal trigger” is selected.
+06
One-shot trigger time setup area * Only when “One-shot signal trigger” is selected.
6
When using the BL-700 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.
109
Page 123
Chapter 6
PLC Link
Data memory areas Bar code data read by the BL-700 is stored in the areas starting from “+00”. (Based on the specified data memory head address). In the following table, “A” indicates the data memory head address. Address
Description
Reference page
A+00
Data memory flag area
P.113
A+01
Label orientation
P.114
A+02
Decode count
A+03
Scan count
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
...
...
P.114
A+69
64th digit of bar code data
Note: These data areas accept up to 64 digits. However, the BL-700 series can read only 32 digits. When the bar code type is CODE128 and the start character is CODE-C, up to 64 digits can be read.
Example When the bar code types are set in Codes 1 to 3 in multi-label read mode 3 (Code 4 is not set)
6
Head address: 100 DM100
200
DM101
300
DM102
400
(Code 1)
110
(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
•• •
•• •
•• •
•• •
•• •
•• •