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 15

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

Pages 121 to 130 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 121

Chapter 6

PLC Link

Operation when a connection error occurs The power supply of the connected BL series is turned off: • The BL series is disconnected from the BL-U1 or N-48: • The cable is disconnected: • A communication error occurs: If a communication failure occurs between the BL series and N-400 when the N400 is in the multi-drop link mode, the N-400 operates as follows: Address

Contents

Operation during a connection error

A + 00

“Write Data” flag

The flag is turned on as data are area written.

A + 01

Reserved area

A + 02

ID number

“FFFF” is written.

A + 03

Number of bar code

“1” is written. (This indicates that the number of digits of the error code written in “A + 04” is “1”.)

A + 04

First digit of bar code data

During connection error: “N (ASCII codes: 4E)” is written. During communication error: “S (ASCII codes: 53)” is written.

*

The above specifications apply to the multi-drop link mode only. The same specifications do not apply to the multi-head scan mode. The addresses subsequent to “A + 04” retain the previous data.

*

Note: If the N-400’s power supply is turned on before the BL series is turned on, the N-400 starts communication before the BL series starts. This results in the above connection error. Create programs that ignore the connection error when the power supply is turned on in this case.

6

6.3.2 Device assignment in multi-head scan mode These areas are used to store the bar code data read in multi-head scan mode. Unlike multi-drop link mode, multi-head scan mode can control several BL series like a single unit. Therefore, this mode provides only one data memory area. Address

Description

Reference page

A + 00

Data memory flag area pp. 113 and 114

A + 01

Reading trigger area p. 114

A + 02

BL series ID number memory area

A + 03

Number of digits of bar code data

A + 04

1st digit of bar code data

A + 05

2nd digit of bar code data

:

:

:

:

A + 06

3rd digit of bar code data

A + 258

255th digit of bar code data p. 115

■ Detailed description on device assignment +00 Data memory flag area

This area is used as a flag that indicates if bar code data has been stored in the area. The flag area can be used for the following two purposes:

113

Page 122

Chapter 6

PLC Link

Real-time control •

To specify the flag area, use “0000” or “0001”.

•

While the N-400 is writing the bar code data read by the BL series in the PLC’s memory, the flag area is specified as “0001”.

•

When data writing is completed, the flag area becomes “0000”. This indicates that new data has been stored in the A+02 to A+258 addresses. When the A+00 address is “0000”, the stored data is available.

Example 1 Normally, the A+00 address is set to “0000”. While the N-400 is writing data, the flag area is “0001”. When the flag area becomes “0000”, the data stored in the A+02 to A+258 addresses can be processed. Example 2 Normally, the A+00 address is set to “0001”. When data writing is completed, the flag area becomes “0000”. The data stored in the A+02 to A+258 addresses can then be processed. Set the A+00 address to “0001” immediately after data processing is completed. When the A+00 address becomes “0000”, this indicates that writing new data is completed. Note: When the BL series 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. This prevent this, use the sequential processing mode.

6

Sequential processing •

To specify the flag area, use “0002” or “0003”.

•

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

•

When data writing is completed, the flag area becomes “0003”, and new data has been stored in the A+02 to A+258 addresses.

•

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

•

Data which cannot be stored in the specified areas is retained in the BL series’ transmission buffer. (➮ For the capacity of the BL series’ transmission buffer, see p. 63.) If the amount of retained data exceeds the buffer capacity, the buffer overflow error occurs and the “OVER” code is stored in the corresponding area. +01 Reading trigger area

This area is used to send the trigger input signal to the BL series to start reading bar code data. You can set this area to “Used” or “Unused”, depending on the N400’s internal setting. (➮ See p. 41.) If you set this area to “Unused”, users can freely use it.

114

Page 123

Chapter 6

PLC Link

When a photoelectric sensor for trigger input is connected to the BL series, do not use this area. Specify this area as follows: • Start reading (Trigger ON): 0001 • End reading (Trigger OFF): 0000 Note: Specify this area as “0000” while the BL series is not reading bar code data. +02 to +258 Data (ID number, number of digits, data) memory area

•

The ID number of the BL series that read the data is stored in the +02 address. The number of data digits is stored in the +03 address as binary data.

•

The read bar code data is stored in the +04 to +258 addresses using the ASCII codes (Hexadecimal numbers in two digits) by the digit. (See the ASCII code table on p.134.)

•

If a read error occurs, the “ERROR” code is stored in the corresponding area. (The read error code can be easily changed according to the BL series’ setting.)

•

If the buffer overflow error occurs with the BL series, the “OVER” code is stored in the corresponding area. A+02

ID number (1 to 31)

A+03

Number of digits of bar code data (1 to 255)

A+04

1st digit of read data

A+05

2nd digit of read data

:

:

A+258

255th digit of read data

6

Note: These data areas accept up to 255 digits. However, the BL series can read only 32 digits. Therefore, all of the areas for 255 digits are not used for the N-400. Only the areas corresponding to the number of the data digits are used.

Example: When the BL series reads bar code data as “KE12”: + 02

12

ID number

+ 03

4

Number of digits

+ 04

$004B

"K"

+ 05

$0045

"E"

+ 06

$0031

"1"

+ 07

$0032

"2"

Specified by ASCII codes (hexadecimal numbers)

Example: When a read error (ERROR) occurs: + 02

ID number

1

+ 03

5

+ 04

$0045

"E"

Number of digits

+ 05

$0052

"R"

+ 06

$0052

"R"

+ 07

$004F

"O"

+ 08

$0052

"R"

Specified by ASCII codes (hexadecimal numbers)

115

Page 124

Chapter 6

6.4

PLC Link

PLC Link Error When a communication error occurs during PLC link, communication stops and the N-400 displays the following code:

or

When this error occurs with the PLC link, check the following points: 1. Check if the RS-232C communication parameters (baud rate, data length, parity and stop bit) for the PLC are matched with the N400’s settings. 2. Check if the N-400’s communication mode is set to “KV”, “MELSEC” or “SYSMAC”. 3. Check if the PLC’s settings are correct. (See pp. 106 and 107.) 4. Check if the cable connections are correct, or if any cable is disconnected. Referring to pp. 14 to 16 of this manual, check the connections using a multimeter. 5. Check if the device setting range does not exceed the available data memory areas of the PLC. If the data memory areas used for the N-400 do not exist in the PLC, communication is impossible.

6

6. Check if the link unit operates normally. To re-start the PLC link, press the test switch. For the settings of the link unit, see the instruction manual for the link unit being used.

116

Page 125

Chapter 6

6.5

PLC Link

Communication Time Even in PLC link mode, the RS-485 communication between the N-400 and each BL series is regarded as the same as standard mode serial communication. (➮ See pp. 83 to 85.) The time required for the RS-232C communication between the N-400 and the PLC is described below: This communication time may change depending on the PLC’s scan time and the model of the PLC. ■ Time required for RS-232C data transmission in PLC link mode The time required for data transmission from the N-400 to the PLC is as follows: This time duration corresponds to the “RS-232C data transmission time in multidrop link mode” (B) described on p. 84. To obtain the total communication time, add the “RS-485 data transmission time” (A) described on p. 82. * When the RS-232C communication baud rate is 9600 bps: Number of data digits

MELSEC-A

SYSMAC-C

KV(KV mode)

10

Approx. 300 ms

Approx. 350 ms

Approx. 500 ms

20

Approx. 350 ms

Approx. 400 ms

Approx. 750 ms

32

Approx. 400 ms

Approx. 500 ms

Approx. 1050 ms

■ Communication time to start reading using reading trigger area To control the BL series’ reading operation using the reading trigger area, enter the trigger ON command on the PLC, and obtain the time duration until the command is received by the N-400. This time duration corresponds to the “RS-232C command transmission time”(C) described on p. 84. To obtain the total communication time, add the “RS-485 command transmission time” (D + b) described on p. 84. * When the RS-232C communication baud rate is 9600 bps: Number of connected BL series

MELSEC-A

SYSMAC-C

KV(KV mode)

1

Approx. 150 ms

Approx. 150 ms

Approx. 100 ms

31

Approx. 400 ms

Approx. 600 ms

Approx. 1.5 s

117

6

Page 126

Chapter 6

6

118

PLC Link

Page 127

Appendices Appendix A

Specifications ................................................... 120

Appendix B

Dimensions ....................................................... 122

Appendix C

Sample Programs ............................................. 124 Sample programs for multi-drop link ................... 124 Sample program for PLC link .............................. 126

Appendix D

Troubleshooting ............................................... 131

Appendix E

Indications on the N-400 .................................. 133

Appendix F

ASCII Code Table ............................................. 134

Appendix G

Checksum Calculation Method ....................... 135

Appendix H

Setup Parameter List ....................................... 137

Appendix I

Default Setting List .......................................... 139

Appendix J

Sample Printout of Setting List ....................... 140

Page 128

Appendices

Appendix A

Specifications

N-400 Model

N-400

Connectable bar code reader Rated input

15 to 26 VDC, 10 mA max.

Max. OFF current

1.0 mA

RS-232C

Applied standards

EIA, RS-232C standards

Synchronization

Start-stop (full-duplex)

Transmission code

ASCII code

Baud rate

600/1200/2400/4800/9600/19200/31250/38400bps

Data length

7 or 8 bits

Parity check

Even/Odd/None

Stop bit length

1 or 2 bits

Appendices

RS-485

120

BL-700 series, BL-500 series, BL-180 series

Trigger input

Applied standards

EIA, RS-485 standards

Synchronization

Start-stop (full-duplex)

Transmission code

ASCII code

Baud rate

600/1200/2400/4800/9600/19200/31250/38400 bps

Data length

7 or 8 bits

Parity check

Even/Odd/None

Stop bit length

1 or 2 bits

Max. number of connectable units

31

Max. total extension distance

1.2 km

Ambient temperature

0 to 50°C (32 to 122°F), No freezing

Relative humidity

35 to 85%, No condensation

Ambient atmosphere

No dust or corrosive gas

Vibration resistance

10 to 55 Hz, 1.5 mm double amplitude in X, Y and Z directions, respectively

Power supply voltage

24 VDC +10%/-20%

Current consumption

140 mA max.

Weight

Approx. 180 g

Page 129

Appendices

N-48 Model

N-48

Conversion interface

RS-232C & RS-485 (Level conversion)

Connectable bar code reader

BL-500 series BL-180 series

Power supply for bar code reader Trigger Rated input input Max. OFF current

5 VDC ±5% (600 mA)

OK/NG output

Output form

NPN open-collector

Rated load

30 VDC, 100 mA

15 to 26 VDC, 10 mA max. 1.0 mA

Leakage current (at OFF) 0.1 mA max. Residual voltage (at ON)

1 V max.

Interface

RS-485 multi-drop (Max. number of connectable units: 31) (Max. total extension distance: 1.2 km)

Ambient temperature

0 to 50°C (32 to 122°F), No freezing

Relative humidity

35 to 85%, No condensation

Ambient atmosphere

No dust or corrosive gas

Vibration resistance

10 to 55 Hz, 1.5 mm double amplitude in X, Y and Z directions, respectively

Power supply voltage

24 VDC +10%/-20%

Current consumption

260 mA max.

Weight

Approx. 100 g

Model

BL-U1

Power supply for bar code reader

5 VDC ±5% (1.5 A)

Power supply for sensor

12 V ±10% (300 mA)

Trigger input

Rated input

8.5 to 30 VDC, 10 mA max.

Max. OFF current

0.5 mA

OK/NG output

Output form

NPN open-collector

Rated load

30 VDC, 100 mA

Appendices

BL-U1

Leakage current (at OFF) 0.1 mA max. Residual voltage (at ON)

1 V max.

Interface

RS-232C, RS-422A, RS-485 multi-drop (Max. number of connectable units: 31) (Max. total extension distance: 1.2 km)

Ambient temperature

0 to 50°C (32 to 122°F), No freezing

Relative humidity

35 to 85%, No condensation

Ambient atmosphere

No dust or corrosive gas

Vibration resistance

10 to 55 Hz, 1.5 mm double amplitude in X, Y and Z directions, respectively

Power supply voltage

100 to 240 VAC (50/60 Hz)

Power consumption

40 VA (100 VAC), 50 VA (240 VAC)

Weight

Approx. 615 g (including cable)

121

Page 130

Appendices

Appendix B

Unit: mm

Dimensions

N-400

N-400

27.3

TEST

RS-232C

SD

RD

POWER TIMING

CS SD

RS RD RS-455

35.4

112 100 90 TERMINATOR ON OFF

4 x ø4.5 mounting hole

40 60

(70)

51

Appendices

N-48

(70) 2 x ø4.5 mounting hole

5.5

43.2 55

5.9 5.9

26 63.2 75

122