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

BL-180 Series User's Manual, CCD Bar Code Reader: BL-U1 Power Supply, pages 94 to 102

Pages 94 to 102 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 94

Power Supply BL-U1 1.8 Wiring the RS-485 (multidrop link) Multidrop link is a method to connect multiple BL series units to a single PC. See P. 82 of this document for details. Use the terminal blocks SDA and SDB. Twisted pair cable Twisted

BL-U1 * SDA SDB SG

RS-485/RS-232C convertor

BL-U1 SDA SDB SG

*

BL-U1 SDA SDB SG

SD/RD+ SD/RDGND

Shielded cable

RS-232C

PC

• Up to 31 BL-U1 (BL series) units can be connected in multidrop link. • The extended cable length must be within 1.2 km. • Connect the BL-U1 (BL series) to a PC using a commercially available RS485/RS-232C convertor. • For units between the RS-485 (those marked with * in the above figure), turn ON the terminator. You can turn the BL-U1 terminator on and off using DIP switch 5. For the terminator of the RS-485/RS-232C convertor, see the instruction manual for the convertor.

CAUTION

• Do not connect the RS-485 cable through the terminal block. • Do not connect the multidrop link cables together with the power cable. • Avoid connection including branch of the BL-U1 and RS-485/RS-232C convertor as shown below.

Not applicable

Applicable

(Connection with branch)

(Connection without branch)

BL

BL

BL

Convertor

*

BL

BL

BL Terminator ON

88

Convertor *

Page 95

Power Supply BL-U1

2

Installation

2.1 Precautions before use Operating environment

The BL-U1 is a precision instrument. Be sure to install the unit in the proper operating environment, and avoid using the unit under any of the following conditions. • Exposed to direct sunlight, or where the ambient temperature is below 0°C or above 50°C for the BL-U1. • Where the relative humidity is below 35% or above 85%, or where the temperature changes drastically, causing condensation. • Where corrosive gases, flammable gases, dust, salt, iron particles or oily smoke may be present. • Where shock or vibration may occur to the BL unit. • Where water, oil or chemicals may be spilled or splashed. • Near any strong magnetic field.

Installing the BL-U1

When installing the BL-U1 at the site, consider the following points: • Reserve sufficient ventilation space at the site. • If the ambient temperature rises above 50°C during operation, be sure to install a ventilation fan or cooler. • Avoid installing the BL-U1 near any high-voltage equipment. • Keep the BL-U1 away from the power cable.

89

Page 96

Power Supply BL-U1 2.2 Installing the BL-U1 There are two methods for installing the BL-U1: When installing the BL-U1 directly Pull out the four screw slots on the rear panel and screw them to the base. 4-ø5 98

150

When installing the BL-U1 to the DIN rail 1. Hook the BL-U1 to the DIN rail groove from its top. Push the BL-U1 bottom against the DIN rail until you hear a click.

2. Check that the DIN rail mounting notch is shaped like notch A below. If not, push the BL-U1 further. OK

Insufficient

Fig. A

Fig. B

3. To remove the BL-U1 from the DIN rail, pull out the notch until its shape turns from Fig. B to Fig. A. Then, disengage the BL-U1 from the DIN rail. 4. When you want to re-install the BL-U1 to the DIN rail, return the notch from that of Fig. A to Fig. B.

90

Page 97

Power Supply BL-U1

3

Outline of Multidrop Link

3.1 Multidrop Link The multidrop link is a communication method to control several BL series readers simultaneously with one host computer as shown in the system configuration on page 79. Using the RS-485 cable as the communication path, the multidrop link offers high noise immunity and enables long-distance transmission. The multidrop link allows easy wiring using twisted-pair cables (2-wire).

3.2 System Configuration To use the multidrop link, a BL series reader plus the following equipment is required. BL-U1 To use the multidrop link, be sure to use this power supply unit. RS-485/RS-232C converter To connect a BL series reader to the host computer, the RS-485 signal must be converted into an RS-232C signal. Host computer Use a personal computer with an RS-232C interface. When several BL readers are reading several bar codes, the amount of data to be processed may exceed the host computer’s capacity. To prevent this, reduce the number of the BLs connected to the host computer, or replace the host computer with another one which provides higher data throughput (including processing of the programming language). 2-wire twisted-pair cable for the RS-485 interface. Prepare the specified cable (see page 88). RS-232 cable Cable used to connect the host computer to the RS-485/RS-232C converter. Use a cable whose pin assignment conforms to those of the RS-232C connector of the host computer and the RS-485/RS-232C converter.

91

Page 98

Power Supply BL-U1

4

Setup and Connection Procedures 1. BL series setup Using the Setup software, set the BL series as described below: • Set the multidrop link to “Enable”. • Assign ID number 1 to 31 to the connected BL series. Do not assign the same ID number to different BL series. • Set the baud rate, data length, parity and stop bit length. 2. RS-485/RS-232C converter setup Referring to the instruction manual of your RS-485/RS-232C converter, set the following parameters. Example

Baud rate:

Conforms to the setting of the BL series.

Driver active:

AUTO

Terminater:

See p. 17.

DTE/DCE selector switch: DTE

3. PC setup Set the baud rate, data length, parity and stop bit length according to the BL series’ settings. 4. Connection between the BL series (BL-U1) and the RS-485/RS-232C converter. To connect the equipment, use the specified cable (see page 88). 5. Connection between the RS-485/RS-232C converter and the host computer Use a cable whose pin assignment conforms to those of the RS-232C connector of the host computer and the RS-485/RS-232C converter. Example

When the host computer is an IBM PC/AT compatible, use the KEYENCE OP-22149 cable (1.5 m). 6. Confirmation of operation Send a command to the BL series to confirm its operation.

92

Page 99

Power Supply BL-U1

5

Communication

5.1 Outline of Communication types You can perform all multidrop link communication by sending commands from the host computer to the BL series. The communication of the multidrop link is classified into the following two types: Data communication For sending read data from the BL-series to the host computer. When data receive commands (polling commands) are sequentially sent to each BL series connected to the host computer, the read data is sent to the host computer. The read data is stored in the BL series’ transmission buffer, and the data stored in the transmission buffer is called using the polling command. Command communication Using serial communication commands allows direct control of the BL series or change/confirmation of the BL series’ settings.

5.2 Communication Format All multidrop link communication is done in the following format. Send any command in this format and the BL Series will respond in the format shown below. <Communication format> STX mmm nn

Data/Command/Response cc

ETX

Delimiter

No. of data

ID No.

Contents of data

Checksum

Delimiter

1

2

3

4

5

6

Detail of each data: 1, 6 Delimiter: All the data should start with [STX](02h) and should end with [ETX](03h). This cannot be changed. 2 mmm/No. of data: Total number of characters of above data 2 to 5 should be entered. (Do not count [STX] and [ETX].) When you send [STX][mmm][03][SSET][cc][ETX], for example, the number of characters will be; 3+2+4+2=11Thus, [mmm] is 011.

3 nn/ID No.: Specify the ID No. of the BL Series reader you want to send/ receive. ID Nos. should be from 01 to 31.

4

Data/Command/Response: Two commands can be used for multidrop link communication. [P] for polling and [C] for clearing data. Name

Command

Response

Description

Polling comP mand

Data is returned if any data is stored.

[e] is [OVER] is returned returned if if no data the buffer is is stored. full.

Command to ask whether the BL series’ transmission buffer contains any data.

Data clear command

[NG] is returned if the data has [OK] is returned if the data is cleared. been already cleared.

This command clears one piece of the sent data, and completes a series of data communication.

5

C cc/Checksum: Add the checksum when you send the data. When the response is returned from BL, the checksum follows the data. Determine the checksum by calculating the Exclusive OR of each data from 2 to 4 as follows.

93

Page 100

Power Supply BL-U1 Example: Data to send is [STX][008][01][P][cc][ETX]

Examples

0

0

8

0

1

P

30h

30h

38h

30h

31h

50h

1.

Convert each data bit to ASCII code (Hex).

2.

Convert the ASCII code to 8-bit binary.

3.

Calculate Exclusive OR of each data bit.

0011 0000 0011 0000 0011 1000 0011 0000 0011 0000 0101 0000 Exclusive OR 0110 1001

4.

Convert the 8-bit binary to hexadecimal data.

0110 1001 6 9 h

5.

Enter the result as [cc].

[cc] = 69

0011 0000 0011 0000 0011 1000 0011 0000 0011 0000 0101 0000

To send [STX]

008

01

C cc

[ETX].

cc = 7A To send [STX]

013

11

ABC876 cc

[ETX].

cc = 4B To send [STX]

010

31

LON cc

[ETX].

cc = 7E.

Point

Exclusive OR calculation formula Calculate each bit using the following formula. 0 , 0 =0 0 , 1 =1 1 , 0 =1 1 , 1 =0

, Exclusive OR operator

Conversion form hexadecimal number into binary number Convert ASCII codes into binary numbers referring to the following table. Hexadecimal Binary Hexadecimal Binary

94

0 1 2 3 4 5 6 7 0000 0001 0010 0011 0100 0101 0110 0111 8 9 A B C D E F 1000 1001 1010 1011 1100 1101 1110 1111

Page 101

Power Supply BL-U1 5.3 Details on Data Communication Communication Procedure 1

S

2

S

3

S

4

S

5

6

S

S

T X

008

03

P

6B

E

T X

008

03

P

6B

E

T X

011

T X

008

03

T X

008

03

T X

009

03

1234

03

37

E

C

78

E

C

78

E

OK 3E

E

ID•••1

T X

T X

ID•••2

T X

ID•••3

T X

ID No. 3 is reading bar code data ”1234“

T X

ID•••4

T X

1. Send a polling command (P) to the BL series whose data you wish to receive. [STX] mmm nn

P cc

[ETX] mmm=008 2. The RS-485 uses a 2-wire cable which sends data and receives data along the same wire. Therefore, the command sent from the host computer loops back to the host computer. In this example, immediately after the above command is sent to the BL series, the following data loops back to the host computer. [STX] mmm nn

P cc

[ETX] mmm=008 To detect data conflict, compare the command sent from the host computer with the loopback data. However, data collision will not occur if you follow the procedure described here. Normally, you need not compare the command sent from the host computer with the loopback data. 3. When the BL series’ transmission buffer contains any data, the BL series sends back the read data, and waits for the clear command (C). [STX] mmm nn

Read Data cc

[ETX]

When the BL series’ transmission buffer contains no data, the BL series sends back the following response (e: empty), and does not wait for the clear command. [STX] mmm nn e cc

[ETX]

When the BL series’ transmission buffer is full, the BL series sends back the following response (OVER), clears all data stored in the transmission buffer, and waits for the clear command. [STX] mmm nn

OVER cc

[ETX]

95

Page 102

Power Supply BL-U1 4. After sending data, the BL series waits for the clear command (C). When the clear command is sent to the BL series, the BL series clears one piece of data received with the polling command. [STX] mmm nn

C cc

[ETX]

When the polling command is sent to the BL series again while the BL series is waiting for the clear command, the BL series sends back the same data again, and waits for the clear command. [STX] mmm nn

P cc

[ETX]

5. The same data sent in step 4 loops back to the host computer. [STX] mmm nn

C cc

[ETX]

6. The BL series sends back OK in response to the clear command. [STX] mmm nn

OK cc

[ETX]

If the clear command is sent to the BL series when the BL series is not waiting for the clear command (one piece of data has already been cleared), the BL series sends back NG. [STX]

CAUTION mmm nn

NG cc

[ETX]

If an incorrect ID number is specified, an incorrect format is used to send a command, or a data transmission error occurs (checksum is incorrect), the BL series sends back no response. You will need to design a program so that the same command is sent again (Retry) if the BL series sends back no response within a specified period (Timeout). If the amount of stored data exceeds the capacity of the transmission buffer, the BL series stops the read operation. To re-start the read operation, turn on the timing input again, or send the trigger ON command to the BL series again. If you retry the clear command when the response data has been improperly transmitted (when the checksum is incorrect), the BL series may send back NG in response to the retried command since the clear command previously sent has already cleared one piece of data.You will need to design a program so that both OK and NG are regarded as acceptable responses to the clear command. When using CODE128, do not include the control code (e.g. <STX>, <ETX>).

96