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

N-400 User's Manual: Multi-Drop Controller for BL Series, pages 91 to 100

Pages 91 to 100 of 150

The original document is the PDF (1.3 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 N-400

Page 91

Chapter 4

4.6

Multi-Drop Link Mode Control Procedure

Communication Time Consideration This section describes how to calculate the time required for data transmission and for command transmission in multi-drop link mode. ■ How to calculate data transmission time The following is the timing chart for multi-drop link mode communication . Through the RS-485 communication between the N-400 and each BL series unit, data transmission is constantly performed from the BL series to the N-400. When the N-400 sends the polling command to a BL series with a specified ID number, the data read by the BL series is sent to the host computer through the RS-232C interface of the N-400.

N400 BL (RS-485)

1 2 3 4 5 1 2 3 a

4

5 1 2 3 4 5

1

2 3 b

4 A

A

Host N400 (RS-232C)

*

B

B

The above timing chart shows the case in which five BL series units are connected.

Therefore, data transmission is delayed by a certain time duration until the polling command is sent to the BL series after the BL series reads bar code data. First, obtain the time duration required for the RS-485 data transmission. In the RS-485 data transmission from the BL series to the N-400, the required time varies depending on whether the BL series has stored bar code data (the BL series has already read bar code data) or not. In the above timing chart, “a” (the RS-485 data transmission time is short) shows the case in which the BL series has stored no data, and “b” (the RS-485 data transmission time is long) shows the case in which the BL series has stored some data. •

• a: RS-485 data transmission time required when the BL series has stored no data Baud rate (for RS-485)

Communication time (a)

9600 bps

27.9 ms

38400 bps

12.8 ms b: RS-485 data transmission time required when the BL series has stored some data Baud rate (for RS-485)

Communication time (b) Number of data Number of data Number of data digits: 10 digits: 20 digits: 32

9600 bps

64 ms

74 ms

86 ms

38400 bps

28 ms

32 ms

37 ms

83

Page 92

Chapter 4

Multi-Drop Link Mode Control Procedure From the above data, the RS-485 data transmission time (“A” shown in the timing chart on the previous page) is obtained as follows: • •

Maximum time: A = a x n + b (n = Number of connected BL series) Minimum time: A = b

*

The above table shows the case in which one BL series sends data to the N400. When several BL series simultaneously send data, the required time may be longer than the above. The time duration “b” (corresponding to the case in which the BL series has stored some data) is prolonged.

Next, obtain the time duration required for the RS-232C data transmission. The RS-232C data transmission time (“B” shown in the timing chart on the previous page) can be obtained from the following formula: B = Amount of data + (1: Set Parity) + Start/Stop bit x Baud rate (Number of data digits + Header/Delimiter + 5)

4

Baud rate (for RS-232C) Communication time (b) Number of data Number of data Number of data digits: 10 digits: 20

9600 bps

21.3 ms

33.8 ms digits: 32 48.8 ms

38400 bps

5.4 ms

8.5 ms

12.2 ms

From the above data, the total communication time is obtained as follows: Communication time = A + B ■ Command communication time When you send a command (e.g. Laser ON command) to the BL series, obtain the time duration for how long it takes for the BL series to receive the command after you send it to the N-400. The communication time required to send a command to the BL series consists of the time required for the RS-232C command transmission from the host computer to the N-400, and the time required for the RS-485 command transmission from the N-400 to each BL series. However, since each BL series constantly sends its data to the N400, the command transmission from the N-400 to the BL series must be performed in the interval of the data transmission from the BL series to the N-400.

N-400 BL (RS-485)

a 1 2 3 4 5 b 1

C

D

Command

Host N-400 (RS-232C)

Command

2 3 4 5 1 2 3 4 Command 5 1 D

C

Command

E

E

First, obtain the time (C) required for the RS-232C command transmission from the host computer to the N-400. Calculate this time duration by substituting the number of command characters (e.g. LON: three characters, LOFF: four characters) for the number of data digits in formula B given above.

84

Page 93

Chapter 4

Multi-Drop Link Mode Control Procedure

Baud rate (for RS-232C)

Communication time (B) Command = LON

Command = LOFF

9600 bp

12.5 ms

13.8 ms

38400 bps

3.2 ms

3.5 ms

Then, obtain the time duration (D) required for the RS-485 command transmission from the N-400 to the BL series. When the reading start command (LON) or reading end command (LOFF) is sent to the BL series, for example, the communication time is as follows: Baud rate (for RS-485)

Communication time (D) Command = LON

Command = LOFF

9600 bp

29 ms

30 ms

38400 bps

11.5 ms

11.8 ms

From the above data, the total communication time (E) can be obtained as follows: Maximum time: E = C + b + D * b: Time required for the data transmission from the BL series to the N-400 when the BL series has stored some data Minimum time: E = C + D

85

4

Page 94

Chapter 4

4

86

Multi-Drop Link Mode Control Procedure

Page 95

Chapter 5 Multi-Head Mode Control Procedure 5.1

Multi-head Mode ................................................................. 88

5.1.1 Controlling multi-head mode .................................................. 88 5.1.2 Setup procedure .................................................................... 89 5.2

Reading Operation in Multi-Head Mode ............................ 91

5.2.1 Difference in operation depending on reading mode ............. 91 5.2.2 Trigger input signal type ........................................................ 93 5.2.3 Data transmission timing ....................................................... 94 5.3

Data Communication in Multi-Head Mode ........................ 95

5.3.1 Communication format ........................................................... 95 5.3.2 Handshaking protocol ............................................................ 95 5.3.3 Read error code ..................................................................... 95 5.4

Command Communication in Multi-Head Mode .............. 96

5.4.1 Sending a command to BL series .......................................... 96 5.4.2 N-400 direct control/setup commands ................................... 96 5.5

Interference Suppression Function .................................. 97

5.6

Communication Time ......................................................... 98

Page 96

Chapter 5

5.1

Multi-Head Mode Control Procedure

Multi-head Mode

5.1.1 Controlling multi-head mode If the bar code position on a product is unknown, or if bar codes are printed in several positions, the bar code data cannot be read with a single bar code reader. In such cases, several bar code readers need to be mounted in various positions or at various angles. When the N-400 is used in multi-head mode, the host computer can control several BL series like it would be a single unit.

N-48 or BL-U1

Sensor for trigger input

N-400 RS-232C *

Host PC

RS-485 The host computer can control several BL series like it would be a single unit.

5 The procedures for controlling the N-400 using the host computer are classified into the following three methods: •

Data communication: Used to send bar code data read by the BL series to the host computer.

•

Command communication to the BL series: Used to send a command to the BL series.

•

Command communication to the N-400: Used to control the N-400 directly or change the settings of the N-400.

*

All of the above communication methods use ASCII codes.

The procedures for sending a command to the BL series or the N-400 are the same as for multi-drop link mode. For details, see the descriptions on multi-drop link mode.

88

Page 97

Chapter 5

Multi-Head Mode Control Procedure

5.1.2 Setup procedure For setup and connection procedures, see p. 10. This section describes the procedures for setting the N-400, BL series and host computer only.

Setting the BL series 1. Set “Multi-drop Link” to “Enable”. (Click the button.) 2. Assign ID numbers (1 to 31) to the connected BL series. Be sure not to assign the same ID number to different units. 3. Set the RS-485 communication parameters (baud rate, data length, parity and stop bit length) for the BL series according to the N-400’s settings. The default settings for the BL series and the N-400 are as follows: Baud rate: 9600 bps Data length: 7 bits Parity: Even Stop bit length: 1 bit Note: To increase the response speed, set the BL series’ baud rate to 38400 bps. 4. Setting “Handshaking protocol” or “RTS/CTS” is not effective.

5

5. Set “Header” to “None”. Setting the terminator is not effective. 6. Set the BL series’ reading mode to “Single label”. 7. Set the trigger input signal type to “Level”. 8. Set the read error code of the BL series according to the N400’s setting. Normally, the read error code is set to “ERROR” (default setting). 9. Set the reading start command and read end commands according to the N-400’s settings. Normally, these commands are set to “LON” and ”LOFF” respectively (default settings). *

Set other parameters as required.

89

Page 98

Chapter 5

Multi-Head Mode Control Procedure

Setting the N-400 Using the N-400 setup software, set the N-400 as follows: 1. Set the host mode to multi-head mode (Click the button). (➮ See p. 38.) 2. In multi-head mode, connect the trigger input to the N-400 so that all BL series connected to the N-400 are controlled as if they are a single bar code reader. You must set the “Read mode” and “Trigger input signal type” of the N-400. 3. Enter the ID numbers of the connected BL series on the “ID SETUP” screen. (➮ See p. 42.) 4. Set the baud rate, data length, parity and stop bit length according to the host computer’s settings on the “RS-232C SETUP” screen. (➮ See p. 42.) 5. Set the baud rate, data length, parity and stop bit length according to the BL series’ settings on the “RS-485 SETUP” screen. (➮ See p. 43.) Note: To increase the response speed, set the RS-485 communication baud rate to 38400 bps. (Set the BL series’ baud rate to this value as well.) 6. Set the read error code of the N-400 according to the BL series’ setting. Normally, the read error code is set to “ERROR” (default setting).

5

7. Set the reading start command and read end commands according to the BL series’ settings. Normally, these commands are set to “LON” and ”LOFF” respectively (default settings).

Setting the host computer Set the RS-232C communication parameters (baud rate, data length, parity and stop bit length) for the host computer according to the N-400’s settings.

90

Page 99

Chapter 5

5.2

Multi-Head Mode Control Procedure

Reading Operation in Multi-Head Mode

5.2.1 Difference in operation depending on reading mode Multi-head mode can control several BL series like they are a single bar code reader. The N-400 provides the “Level” and “Oneshot” trigger signal types, and the “Single” label and “Multi” label reading modes.

“Single” label reading mode The following timing chart shows the case in which three BL series are connected.

Timing input Light source of BL series with ID No. 1

Reading

Light source of BL series with ID No. 2 Light source of BL series with ID No. 3 Communication output

* A piece of data which was read first is sent.

* Read error

5

•

In the “Single” label reading mode, a piece of data which was first read by any of several BL series is sent to the host computer. (When any of the connected BL series reads bar code data, all light sources of the other BL series are turned OFF.) Therefore, several BL series can be operated like a single bar code reader.

•

If all of the connected BL series units cannot read bar code data while the trigger input is ON, a read error code is output.

•

Normally, the BL series sends data immediately after reading it. However, you can set the data transmission timing so that data is sent after the trigger input is turned OFF. (➮ See p. 94.)

“Multi 1” label reading mode The following timing chart shows the case in which three BL series are connected.

Timing input Light source of BL series with ID No. 1

Reading

Reading

Light source of BL series with ID No. 2 Light source of BL series with ID No. 3 Communication output

* Data is sent sequentially starting with the earliest data.

* Read error

91

Page 100

Chapter 5

Multi-Head Mode Control Procedure •

In “Multi 1” reading mode, all connected BL series units read bar code data while the trigger input is ON, and send the individual data immediately after reading it.

•

A BL series that causes a read error sends no data.

•

If all of the connected BL series cannot read bar codes while the trigger input is ON, a read error code is output.

“Multi 2” reading mode The following timing chart shows the case in which three BL series are connected.

Reading

Timing input Light source of BL series with ID No. 1

Reading

Light source of BL series with ID No. 2 Light source of BL series with ID No. 3

ID•••

1

2

3

1

2

3

Communication output

5

A

B

•

In “Multi 2” reading mode, all connected BL series read bar code data while the trigger input is ON, and send the individual data after the trigger input is turned OFF, starting with the smallest ID number.

•

In “Multi 2” reading mode, every connected BL series sends a piece of data. A BL series which causes a read error sends an error code.

Example: In the above timing chart, the communication output is as follows: Communication output (A): Header 1234

Terminator

Header ABC

The BL series with ID No. 1 reads bar code data as “1234”.

Terminator

Header ERROR Terminator

The BL series with ID No. 2 reads bar code data as “ABC”.

Read error occurred in the BL series with ID No.3.

Header ERROR Terminator

Header ERROR Terminator

Communication output (B): Header ERROR Terminator

Read errors have occurred in the BL series with ID Nos. 1, 2 and 3.

92