N-400 User Manual
N-400 User Manual
96M0353
User's Manual
Multi-Drop Controller for BL Series
N-400
N-400
TEST
RS-232C
READER SD RD CS RS
POWER TIMING SD RD
POWER SD RD RS-455
RS-232C
TERMINATOR
ON
TERMINATOR
OFF
ON
OFF
Keyence grants to you, and you accept a license to use the programs and the
related materials delivered with this agreement.
The manual and the software are copyrighted with all rights reserved. Your rights of
ownership are subject to the limitations and restrictions imposed by copyright laws.
Under the copyright laws, you may not copy the manual or software, in whole or in
part, without the written consent of Keyence, except in the normal use of the
software or to make a backup copy.
It is illegal to copy, reproduce, or transmit any part of the manual or the software in
any form or by any means (including translation to another language, computer
language, or format)except as permitted by the Copyright law. You are permitted to
write the contents of the software into the machine memory of your computer so
that the software can be executed. The software may be associated with one
computer and may be used by more than one person on that computer, or may be
associated with one person and used by that person on more than one computer.
However, in no event shall two or more persons use the software at the same time.
You may not rent or lease the software, but you transfer the software and accom-
panying written materials on a permanent basis provided you retain no copies and
the recipient agrees to the terms of this agreement. You may not reverse engineer,
decompile, or disassemble the software.
Keyence warrants that if you discover physical defects in the media on which this
software is distributed, or in the manual distributed with the software, Keyence will
replace the media or manual at no charge to you, provided you return the defective
items, postage prepaid and with proof of purchase, within ninety days of the date of
purchase. Keyence reserves the right to revise this software and manual without
obligation to notify any person of such revision. In no event will Keyence be liable
for loss of profits or goodwill or other indirect, special, incidental, or consequential
damages resulting from any defect in the software, media, or manual. Keyence’s
liability for damages to you or others will in no event exceed the total amount paid
by you for the software. In particular, Keyence shall have no liability for any data
stored in or used with Keyence’s products, including the costs of recovering such
data.
i
Safety Precautions
This instruction manual describes the operation and function of the N-400. Read
this manual carefully to ensure safe use and maximum performance from your N-
400.
The N-400 can be connected to the BL-700, BL-180 and BL-500 series.
Symbols
The following symbols alert you to important messages. Be sure to read these
messages carefully.
General Precautions
• At startup and during operation, be sure to monitor the functions and perfor-
mance of the N-400.
• We recommend that you take substantial safety measures to avoid any damage
in the event a problem occurs.
• Do not open or modify the N-400 or use it in any way other than described in
the specifications.
• When the N-400 is used in combination with other instruments, functions and
performance may be degraded, depending on operating conditions and the
surrounding environment.
• Do not use the N-400 for the purpose of protecting the human body.
• To install this unit, read “Chapter 2, 2.6 Mounting Procedure” in this manual
thoroughly for instructions on proper mounting conditions.
• For the RS-485 connections, use the recommended cable and follow the
instructions given in this manual. (➮ See “Chapter 2, 2.3.3 Connecting RS-485”
or “Chapter 2, 2.4.5 Connecting RS-485”.) Connecting the RS-485 cable without
following these instructions may cause a communication error.
ii
List of Package Contents
The N-400 includes the following equipment and accessories. Before using the
unit, ensure that all of these items are included with your N-400.
iii
Contents
iv
Chapter 4 Multi-Drop Link Mode Control Procedure
v
Chapter 6 PLC Link
Appendices
WARRANTIES
vi
vii
Chapter 1
Overview of the N-400
1 Note: The BL-U1 and N-48 can be used as an RS-232C to RS-485 converter.
However, the BL-U1 is not available in Europe.
BL series
N-400
RS-232C
N-48 * * Host
or RS-485
BL-U1
N-400
2
Chapter 1 Overview of The N-400
BL series
N-400
RS-485
N-400 DM103 4
DM104 &30
To BL DM105 &31
DM106 &32
• •
• •
• •
3
Chapter 1 Overview of The N-400
N-400
RS-232C
N-48 * * Host
or RS-485
BL-U1
Sensor for
trigger input N-400
N-48 RS-232C
or
BL-U1
* Host
RS-485
4
Chapter 1 Overview of The N-400
1 Display LEDs
N-400 1
TEST
2 RS-232C port
RS-232C
6 Power supply terminal
3 Communication SD RD CS RS
status indicator LEDs 7 RS-485 terminal
POWER TIMING SD RD
RS-455
4 Test switch 8 Trigger input terminal
TERMINATOR
ON
OFF
5 Terminator switch
ON
OFF
5
Chapter 1 Overview of The N-400
N-48
Note: BL-U1 is not available in the Europe area.
1 READER port
1
READER
2 POWER LED
POWER SD RD
6 Communication
3 I/O terminals status indicator
LEDs
7 Terminator switch
ON
OFF
4 RS-485 terminals
5 Power supply terminals
6
Chapter 1 Overview of The N-400
BL-U1
Note: The BL-U1 is not available in Europe
1 OK/NG LED
2 TIMING LED
6 Power switch
8 RS-232C port
9 READER port
0 DIP switches
7
Chapter 1 Overview of The N-400
8
Chapter 2
Installation Procedure
• N-48 (or BL-U1) power supply unit for BL series (RS-485 mode)
2 Each bar code reader requires one N-48 (or BL-U1) power supply.
• BL-U2 (or BL-U1) power supply unit for BL series (RS-232C mode)
To change the BL series’ settings, one BL-U2 or BL-U1 power supply unit is
required.
To use the N-48 for multi-drop link, an additional BL-U2 24 VDC power supply
unit is required. (The N-48 does not provide an RS-232C port.)
(The BL-U1 can be used as an RS-232C or RS-485 power supply.)
• Host computer
Use a personal computer with an RS-232C port.
When large quantities of data are sent from several BL series, they may exceed
the host computer’s data processing capacity.
If this occurs, reduce the number of the connected BL series units, or enhance
the data processing capacity (including the programming language) of the host
computer.
The setting contents vary slightly depending on the mode being used. Refer to
the following pages for more information.
10
Chapter 2 Installation Procedure
The setting contents vary slightly depending on the mode being used.
To use a PLC link, set up the PLC according to pp. 104 and 105.
4) Connection between the BL series and N-400 (See pp. 19, 20 and 25.)
Connect the N-48 (or BL-U1) power supply unit to the BL series. Then connect
the specified cable (twisted pair cable) between the power supply and the N-
400. Turn ON the equipment terminator at both ends of the connection.
When using the BL-U1, set the DIP switch to “RS-485”. (See p. 22.)
5) Connection between the N-400 and host computer/PLC (See pp. 13 to 15.)
To connect the N-400 to the host computer or PLC, use the RS-232C cable
whose pin assignment conforms to that of the host computer and PLC.
6) Checking the RS-485 connection between the N-400 and the BL series
The N-400 provides a connection test mode that checks whether the RS-485
connection is correct or not. Using this function, check whether the RS-485
communication can be correctly performed.
For the procedure for using this function, see p. 26.
To use the BL series in multi-head scan mode, connect a sensor for trigger input
to the N-400. (This sensor is not required when controlling the BL series’ read-
ing operation using the read start/end commands.)
If the sensor for trigger input is directly connected to each BL series, the BL
series cannot operate normally.
8) Checking operation
Using the terminal software included in the N-400 setup software, check
whether the RS-232C communication between the N-400 and host computer
can be performed correctly. (See p. 52.)
To use a PLC link, check whether data is stored in the PLC’s memory.
11
Chapter 2 Installation Procedure
2.0 mm 5 mm max.
max.
6 mm min
24V DC IN 24V DC IN
– + – + –
24 VDC
+
When a 24 VDC power supply is connected to the power supply “IN” terminal, the
“OUT” terminal can be used as the 24 VDC power supply output terminal. (Note:
The power supply connected to the “IN” terminal must have a capacity high enough
to supply power to the equipment connected to the “OUT” terminal.)
Using this function, the “OUT” terminal can be used as a 24 VDC power supply for
each BL series connected in the multi-drop link configuration. (For a connection
example, see p. 19.)
To operate the N-400, be sure to use a 24 VDC power supply. Using a power
CAUTION supply exceeding 24 VDC or using an AC power supply may damage the unit.
If your system must comply with UL regulations, be sure to use the power
supply with NEC class 2 output.
12
Chapter 2 Installation Procedure
TIM COM SG
TIM
Internal circuit
+
Contact
or solid state
+
+ COM
2
+
15 to 26 VDC
Pin No. 25 is used for a 5 V power supply output. Do not connect this termi-
CAUTION nal to the ground terminal or any other terminal when it is unused. Doing this
may damage the N-400 or the external device connected to this terminal.
* The OP-98769 cable (1.5 m: manufactured * The OP-98769 cable (1.5 m: manu
by KEYENCE) can be used. factured by KEYENCE) and the
OP25057 conversion connector can
be used.
Tips A commercially-available straight cable (D-sub 25 pin - 25 pin, or D-sub 25 pin - 9
pin) can be used.
13
Chapter 2 Installation Procedure
N-400
TEST
RS-232C
SD RD CS RS
POWER TIMING SD RD
RS-455
TERMINATOR
ON
OFF
OP-24045 (1 m) OP-96369
KV-10, 16, 24 or
KV-40, 80 OP-24025 (5 m)
2
KV-300 1. 1. KV-300 and KV-L2 are not available in Europe.
■ Connecting KV-L2 1.
Port 1 Terminal block
KV-L2 N-400 KV-L2 N-400
FG 1 1 FG SD 3 1 FG
SD 2 2 SD RD 5 2 SD
RD 3 3 RD 3 RD
RS 4 4 SG 4 RS
CS 5 5 RS 5 CS
DR 6 6 CS 6 DS
SG 7 7 DR 20 ER
ER 20 20 ER SG 1 7 SG
D-sub 25-pin (male) D-sub 25-pin (male) Terminal block D-sub 25-pin (male)
M2.6 screw M2.6 screw M2.6 screw
* The OP-98769 cable (1.5 m: manufactured 1. KV-300 and KV-L2 are not available in Europe.
by KEYENCE) or a commercially-available
straight cable can be used.
D-sub 25-pin (male) D-sub 25-pin (male) D-sub 25-pin (male) D-sub 25-pin (male)
M2.6 screw M2.6 screw M2.6 screw M2.6 screw
14
Chapter 2 Installation Procedure
■ SYSMAC-C series
Connection with C-200H-LK201(-V1), Connection with C-20H, C-28H,
C-500-LK203, C-500-LK201-V1, C120- C-40H, C-60H, C-80H
LK201-V1
PLC N-400
FG 1 1 FG
SD 2 2 SD
RD 3 3 RD
RS 4 4 RS
CS 5 5 CS
SG 9 7 SG
■ SYSMAC-CV series
Connection with CV500-LK201(Port 1) Connection with CV500-
LK201(Port 2), CV500, CV1000,
CVM1
D-sub 25-pin (male) D-sub 25-pin (male) D-sub 25-pin (male) D-sub 25-pin (male)
M2.6 screw M2.6 screw M2.6 screw M2.6 screw
15
Chapter 2 Installation Procedure
N-48 BL series
2 READER
POWER SD RD
Pin assignment
1 2 3 4 5
D-sub 9-pin (male)
DCE specification (defined as terminal)
#4-40 screw
6 7 8 9
16
Chapter 2 Installation Procedure
2.0 mm 5 mm max.
max.
6 mm min
24 VDC
+
• Do not connect a power supply other than 24 VDC or the unit may be
CAUTION damaged.
• Connecting a power supply to the RS-485 terminal may damage the N-48.
• Do not connect different types of power supplies to the IN and OUT termi-
nals or the unit may not start normally due to the potential difference
between the power supplies.
17
Chapter 2 Installation Procedure
To connect the BL series in multi-head mode, send the trigger input to the N-400
instead of the N-48.
TIM COM OK
TIM
Internal circuit
+
+ + COM
15 to 26 VDC
OK NG COM
Internal circuit
Load
Load
Load
+
*Rated load: 30 V max. (100mA)
18
Chapter 2 Installation Procedure
*
TIM
COM
RS-485 SG
RS-485 +
Shield cable RS-485 –
Twisted pair cable
24V DC OUT +
24V DC OUT –
2
RS-485 SG 24V DC IN +
RS-485 + 24V DC IN –
RS-485 –
24V DC IN + N-400
24V DC IN –
24V DC OUT –
24V DC OUT +
RS-485 + +
RS-485 –
RS-485 SG 24 VDC
N-48
RS-485 SG
RS-485 +
RS-485 –
24V DC IN +
24V DC IN –
24V DC OUT –
24V DC OUT +
RS-485 +
RS-485 –
RS-485 SG
N-48
RS-485 SG
RS-485 +
RS-485 –
24V DC IN +
24V DC IN –
24V DC OUT –
24V DC OUT +
RS-485 +
RS-485 –
RS-485 SG
*
N-48
19
Chapter 2 Installation Procedure
• The diagram on the previous page shows the connections to supply 24 VDC
power to the N-48 from the power supply connected to the N-400. In this case,
the 24 VDC power supply connected to the N-400 must have a capacity of at
least “140 mA (N-400 current consumption) + 260 mA (N-48 current consump-
tion) x n (Number of N48 units connected)”.
Example
When five N-48 units are connected:
140 mA + 260 mA x 5 = 1.44 A
Use a power supply with at least 1.44 A capacity.
2 Note: The RS-485 cable can be extended up to 1.2 km. With the power supply
cable, however, the 1.2 km extension is not guaranteed.
To extend the power supply cable as shown in the connection diagram on the
previous page, ensure that the power voltage supplied to all the N-48 units is within
the range of 24 VDC -20% to +10%.
• To connect a 24 VDC power supply to each N-48 unit, remove the 24 VDC
wiring shown in the previous page. To connect the power supply, use the follow-
ing cable.
• Up to thirty-one N-48 (BL series) units can be connected in multi-drop link mode.
• The total extension length of the RS-485 cable must be within 1.2 km.
• Turn ON/OFF the N-48 terminator using the terminator switch. (➮ See p. 7.)
• Turn ON/OFF the N-400 terminator using the terminator switch. (➮ See p. 6.)
Note: Be sure not to connect the RS-485 cable using the terminal block.
Incorrect Correct
Note 1: Do not place the RS-485 cable in the same conduit as a power cable.
20
Chapter 2 Installation Procedure
2
FG line
CAUTION Use a power supply of 100 to 240 VAC ± 10% (50/60 Hz).
21
Chapter 2 Installation Procedure
OFF
2
DIP Switch No. 1 2 3 4 5 6
Interface selection RS-232C ON OFF OFF
RS-422A OFF ON OFF
RS-485 multidrop OFF OFF ON
RS-422A terminator OFF OFF
(Termination resistance: 100 Ω) ON ON
RS-485 terminator OFF OFF
(Termination resistance: 100 Ω) ON ON
Selection of READER port ON or OFF according
CS control method to the RS-232C port OFF
CS signal status.
Normally ON ON
22
Chapter 2 Installation Procedure
Round-shape Fork-shape
6.0 mm or 6.0 mm or
less less
Contact or
+ solid-state
8.5~30VDC
23
Chapter 2 Installation Procedure
COM OK NG
2 Load
Load
2.4
TIM
KΩ
OK/NG
Internal circuit
Load
COM +
24
Chapter 2 Installation Procedure
• The total extension length of the RS-485 cable must be within 1.2 km.
• Turn ON/OFF the BL-U1 terminator using the terminator switch. (See p. 22.)
• Turn ON/OFF the N-400 terminator using the terminator switch. (See p. 6.)
Note: Be sure not to connect the RS-485 cable using the terminal block.
Incorrect Correct
BL-U1 BL-U1
Note 1: Do not place the RS-485 cable in the same conduit as a power cable.
Note 2: Do not branch the RS-485 connection as shown below.
Incorrect Correct
(Connection with branch) (Connection without branch)
*
BL-U1 BL-U1 N-400 BL-U1 BL-U1 N-400
*
BL-U1 BL-U1
* Terminator ON
25
Chapter 2 Installation Procedure
Note: To use the connection test mode, ensure that the settings of the connected
BL series and those of the N-400 are switched to “multidrop link” mode.
1) When you press and hold the N-400 test switch for approximately 2 seconds
after the power to all devices is turned ON, the connection test mode is acti-
2 vated. The N-400 displays the ID number of the device being tested. If the
devices are properly connected, the ID number is automatically incremented.
Example 1
When ten BL series (ID Nos. 1 to 10) are connected:
The displayed ID number automatically changes from “1” to “10”, and then “11”
will flash if the connection test result is “OK”.
Example 2
When fourteen BL series (ID Nos. 3 to 16) are connected:
When “1” flashes, press the test switch once. When “2” flashes, press the test
switch again. The displayed number changes from “3” to “16”, and then “17” will
flash if the connection test result is “OK”.
• Check that the RS-485 communication parameters (baud rate, data length,
parity and stop bit length) of the N-400 match to those of the BL series.
• Check that all cables are properly connected. Ensure that the connections are
not branched and that no cables are connected using the terminal block. (➮
See pp. 19, 20 and 25.)
• Check that the equipment terminators at both ends of the connection are ON
and the terminators of other equipment are OFF.
• Check that the BL series’ ID numbers are properly assigned. Make sure that the
same ID number is not assigned to different devices.
4) Pressing and holding the test switch for approximately 2 seconds again resets
the connection test mode.
26
Chapter 2 Installation Procedure
■ Ambient environments
Do not install the unit in place as shown below
• The unit is exposed to direct sunlight, or the ambient temperature may fall
below 0°C (32°F) or exceed 50°C (122°F);
2
• The relative humidity may exceed the range of 35 to 85%, or condensation may
occur due to rapid temperature changes;
• Corrosive gas or inflammable gas is present, or a high level of dust, salt, iron
particles or soot is present;
■ In-panel installation
To mount the N-400 in a panel, carefully observe the following instructions.
• If the ambient temperature may fall below 0°C (32°F) or exceed 50°C (122°F),
provide a fan or air conditioner.
• Do not mount this unit in a panel where a high voltage device is installed.
27
Chapter 2 Installation Procedure
Direct mounting
Pull the brackets provided at four positions on the rear of the N-400, and fix them
with screws.
N-400
2 TEST
RS-232C
SD RD CS RS
POWER TIMING SD RD
100 RS-455
TERMINATOR
ON
OFF
40 4 x ø5
mounting hole
DIN-rail mounting
To mount the N-400 on a DIN-rail, press the unit against the DIN rail until it clicks.
To remove the unit, pull the hook in the direction indicated by arrow.
N-400
TEST
RS-232C
SD RD CS RS
POWER TIMING SD RD
RS-455
TERMINATOR
ON
OFF
4 x ø5
mounting hole
POWER SD RD
43.2
5.9
5.9 63.2
75
28
Chapter 2 Installation Procedure
4 x ø5
98 2
150
DIN-rail mounting
1. Hook the BL-U1 in the groove of the DIN rail from the top, and press the bottom
of the BL-U1 against the DIN rail until it clicks.
2. Make sure that the DIN-rail mounting hook is set in condition “A”. If it is not,
push it inward.
3. To remove the BL-U1 from the DIN rail, pull the hook so that it is set in condition
“B”.
4. To mount the unit on the DIN rail again, restore the hook to condition “A”.
A B
29
Chapter 2 Installation Procedure
30
Chapter 3
N-400 Setup Procedure
■ Hardware requirments
• IBM PC/AT 100% compatible
CPU: 80386 or higher
Memory: 4 MB or more
Floppy disk drive: 3.5 inch floppy disk drive (1.44 Mb compatible)
Serial port: A minimum of one RS-232C port is required.
■ OS requirements
3 • MS-Windows 3.1 or MS-Windows 95
Installation procedure
1. Insert the N-400 setup software system disk into the floppy drive.
• Windows 3.1:
Execute “Run” in the icon menu of the program manager.
• Windows 95:
Select “Run” from the "Start" menu.
3. Run the “SETUP” file from the floppy disk drive.
(This step is common to both the Windows 3.1 and Windows 95.)
Type in as follows:
A: \SETUP
32
Chapter 3 N-400 Setup Procedure
4. The N-400 setup software installer starts. Follow the instructions in the install
window. (Typically, the installation procedure can be completed simply by
pressing [Next (N)] twice.)
C: \KEYENCE\N400
If this directory is correct, click on [Next (N)]. If you wish to change the directory,
click on [Browse (R)..], and select the desired directory.
6. When installation starts, the file copy process is displayed as a graph. When the
installation is completed, the following message appears.
7. For Windows 3.1, double-click on the [N400] icon in the [KEYENCE] group to
start the setup software.
For Windows 95, start the program from the "Start" menu.
33
Chapter 3 N-400 Setup Procedure
1. Connect the N-400 to the host computer using the RS-232C cable.
➮ For the recommended cable, see 2.2.2 Connecting RS-232C.
4. Before sending the updated settings to the N-400, click on [COM PORT] to
match the communication parameters of the personal computer with the current
3 settings of the N-400.
Immediately after you purchase the N-400, set [COM PORT] to the above
settings.
If you do not know the current settings of the N-400, press the N-400 test switch
for approximately 5 seconds. When the N-400 displays “S0(50)”, the N-400 is
automatically set to the above settings. The N-400 can communicate with the
host computer if the “COM PORT” settings are same as the above.
7. After the setup procedure is completed, click on [Exit] to close the setup soft-
ware.
34
Chapter 3 N-400 Setup Procedure
3
HOST MODE:
• Sets auto-polling mode (multi-drop link) and multi-head scan mode
• Sets the interference suppression function in multi-head mode
• Sets read mode, measuring method and trigger input in multi-head mode
• Sets a read error code and trigger ON/OFF commands in multi-head mode
PROTOCOL:
• Sets the handshaking protocol
• Sets the header and delimiter
• Sets the PLC link
ID SETUP:
• Registers the ID number of the connected BL Bar Code Reader
RS-232C:
• Sets the baud rate, data length, stop bit length and parity for the RS-232C
communication
• Setting the RTS/CTS protocol
RS-485:
• Sets the baud rate, data length, stop bit length and parity for the RS-485 com-
munication
FILES:
• Saves, reads or prints settings
COM PORT:
• Sets the communication parameters (baud rate, etc.) of the host computer
according to the settings of the N-400 before communication starts between the
N-400 and host computer.
TRANSFER:
• Sends updated settings to the N-400, or reads the current settings of the N-400.
MONITOR:
• Checks if the N-400 can operate normally.
EXIT:
• Quits the N-400 setup software.
35
Chapter 3 N-400 Setup Procedure
Mouse pointer
Clicking on • • •
Used to select the item to be changed.
3
Clicking on
Used to select any of several options.
The selected item is marked with • .
Clicking on
Used to select whether to enable or disable this function.
To enable this function, the mark is checked with “√”. (For the Windows Ver. 3.1,
it is checked with “x”.)
➞
Clicking on
Used to select any of several options.
36
Chapter 3 N-400 Setup Procedure
Entering a value
After clicking in the frame, enter a value using the keyboard.
If the entered value exceeds the setting range, an error message is displayed.
(➮ See p. 55.)
Entering characters
When you click in the frame labeled “ASC”, you can enter characters using the
keyboard.
When you click in the frame labeled “HEX”, you can enter characters using hexa-
decimal numbers (00 to 7F). This function is used to enter control characters (00 to
21h ASCII codes, such as [CR] and [STX]).
3
37
Chapter 3 N-400 Setup Procedure
1. If you select “Multi-head scan” mode, the following setup items appear. The
following steps are effective for “Multi-head scan” mode only.
“TIMER” indicates the reading time of each BL series in the interference sup-
pression mode. Enter a value using the keyboard.
4. Enter a read error code using the keyboard. The read error code can be
changed to any eight character string. Set this code so that it conforms to the
read error code of the connected BL series.
Normally, you should use the default setting (ERROR) without changing it (as
well as the BL series’ read error code).
38
Chapter 3 N-400 Setup Procedure
5. When you click on [Trigger setup], you can set the trigger input in multi-head
mode.
2. Enter the “Command for Trigger ON” and “Command for Trigger OFF” using the
keyboard. These commands can be changed to any eight character string. Set
these commands so that they conform to the trigger ON/OFF commands of the
connected BL series.
Normally, you should use the default settings (LON and LOFF) without chang-
ing them (as well as the BL series’ trigger ON/OFF commands).
39
Chapter 3 N-400 Setup Procedure
1. When “Use PLC” is disabled, set the “Handshaking protocol” as shown above.
2. Select “Header” and “Delimiter” from the displayed items. You can change the
read data format by setting these items. If you select “Custom”, the following
screen appears. These items can be set to any five character string using the
keyboard.
Note: When customizing the header and delimiter, you modify them based on the
previously selection. When selecting "custom," if you currently use "CR", "0D"
appears in hex and "." in ASCII (It is not a period but stands for "CR"). If "none"
was used previously, nothing appears.
3. Normally, the ID number of the BL series that executed reading is not added to
the read data in multi-head scan mode. However, you can set “Add ID” so that
the ID number is added to the read data.
40
Chapter 3 N-400 Setup Procedure
S018
The setting of the station
number is not displayed
when “KV Series” is selected.
▼
The setting of the file register
▼
is displayed only when
“MELSEC-A” is selected. 3
2. To send a trigger signal to the BL series when the PLC link is enabled, set
“PLC trigger area”.
3. To use “File Register”, set “File Register” to “Enable”. When “File Register” is
enabled, the following screen appears. The “File Register” can be used with
the Mitsubishi MELSEC-A series only.
Enter the block number (000 to 255) of the file register using the keyboard.
41
Chapter 3 N-400 Setup Procedure
ID SETUP
The ID SETUP screen is used to register the ID numbers of the connected BL
series. When you register the ID numbers in multidrop link mode, polling automati-
cally starts when the N-400 starts up. To perform manual polling, skip the ID
SETUP.
RS-232C
The RS-232C screen is used to set the RS-232C communication parameters for
the N-400. Set these parameters so that they conform to those of the host com-
puter or PLC.
Tips ➮ RTS/CTS: p. 66
42
Chapter 3 N-400 Setup Procedure
RS-485
The RS-485 screen is used to set the RS-485 communication parameters for the
N-400. Set these parameters so that they conform to those of the connected BL
series.
Note: We recommend that you set the baud rate to “38400 bits/s” to increase the
processing speed, since the RS-485 communication between the N-400 and the
BL series transfers a large volume of data.
43
Chapter 3 N-400 Setup Procedure
2. When you click on [OK] after selecting a file, the selected file can be opened.
44
Chapter 3 N-400 Setup Procedure
2. Click on the file name entry field, and enter a file name using the keyboard.
Specify a file name within eight characters. Be sure to add the extension “NCF”.
After entering the file name, click on [OK] to save the file.
Note: This software cannot accept a long file name in Windows 95.
When the saved setting file is sent to the N-400, the name of the file is simulta-
Tips
neously sent to the N-400. When you read the settings of the N-400 using this
software, the file name is also read. It is convenient for maintenance since you can
find the file that stores the settings.
To enter a file name, use alphanumerics (letters and numbers) only. Otherwise, the
file name cannot be sent to the N-400, because it can only recognize alphanumer-
ics. To send a file name, be sure to enter the file name using alphanumerics and
then save it. (If the file name is not saved, it cannot be sent to the N-400.)
45
Chapter 3 N-400 Setup Procedure
2. Select a file to be compared, and click on [OK]. Then, the system compares the
selected file with the settings currently edited, and displays the result.
46
Chapter 3 N-400 Setup Procedure
3
2. Adjust “Printer Setup” as required, and click on [OK]. Printing will then start.
2. If you try to initialize the settings currently being edited without saving them, the
following message appears. If you wish to execute initialization, click on [OK].
Note: The initialization procedure described in this section is used to initialize the
settings being edited with the setup software. The settings on the N-400 cannot be
initialized.
47
Chapter 3 N-400 Setup Procedure
1. Press and hold the N-400 test switch for five seconds. When the N-400 displays
“S0 (50)”, the communication parameters are temporarily set as follows:
2. Click on [COM PORT] to set the communication parameters of the host com-
puter according to the values listed in the step 1. (above procedure). Select an
RS-232C port, and click on [OK].
3. Click on [Send setting (Save in N-400 EEP-ROM]. The updated settings are
then sent to the N-400.
48
Chapter 3 N-400 Setup Procedure
4. If the settings were successfully sent to the N-400, the following message
appears.
If the host computer failed to send the data to the N-400, the following message
appears.
• Check that [COM PORT] is set to the values listed in step 1. when the N-
400 displays “S0 (50)”.
• Check that the RS-232C cable pin assignment of the N-400 is the same as
that of the host computer.
5. After the settings are sent, press the N-400 test switch once to reset the “S0
(50)” condition. (If the N-400 does not display “S0 (50)”, you do not need to
press the test switch. )
When the N-400 displays “00”, the sending procedure is completed. (The
communication parameters of the N-400 are set to the updated settings.)
49
Chapter 3 N-400 Setup Procedure
1. Press and hold the N-400 test switch for five seconds. When the N-400 displays
“S0 (50)”, the communication parameters are temporarily set as follows:
3 Tips If you know the current communication parameter settings of the N-400, step 1. is
not necessary. You can send data to the N-400 by setting the communication
parameters of the host computer using [COM PORT] so that they conform to the
current settings of the N-400. However, if PLC link is enabled, you cannot send
data to the N-400 without performing step 1., because the handshaking protocol is
set for PLC link only.
2. Click on [COM PORT] to set the communication parameters of the host com-
puter according to the values listed in step 1. Select an RS-232C port and click
on [OK].
50
Chapter 3 N-400 Setup Procedure
4. If the settings of the N-400 were successfully read, the following message
appears.
If the host computer failed to read the data, the following message appears.
• Check that [COM PORT] is set to the values listed in step 1. when the N-
400 displays “S0 (50).”
• Check that the RS-232C cable pin assignment of the N-400 is the same as
that of the host computer.
5. After the settings are read, press the N-400 test switch once to reset the “S0
(50)” condition. (If the N-400 does not display “S0 (50)”, you do not need to
press the test switch. )
When the N-400 displays “00”, the reading procedure is completed.
51
Chapter 3 N-400 Setup Procedure
1. Click on [COM PORT] to set the communication parameters of the host com-
puter according to the current settings of the N-400.
3. When the BL series reads bar codes, the data read by the BL series is listed on
the screen (in the [Received Data] field). A record of up to 1000 lines of data
can be obtained. Using the scroll bar at the right of the [Received Data] field,
you can see the previous data.
4. If you click [Stop], received data is not listed. (The button name is changed to
[Start].) If you try to display received data again, click on [Start].
52
Chapter 3 N-400 Setup Procedure
5. When you enter a command in the “Send command” field, you can send
the command to the N-400 (or BL series). The format of the command to
be sent is “[Command] + [CR]”. Typing command and pressing [ENTER]
key sends the command.
3
6. When you click on the [ARROW] button in the “Send command” field, the
commands previously sent are listed. (Up to 100 commands can be listed.)
Note: When only a few BL series units are connected, you need not send this
command. However, when many BL series units are connected, the cycle of
the N-400’s polling for each BL series becomes longer than the reading cycle
of the test mode, causing the data to be stored in the N-400 buffer. To prevent
this, be sure to send the above command.
53
Chapter 3 N-400 Setup Procedure
2. Send the test mode command to the BL series to be tested. When the test
mode is started, data read by the BL series is listed in the [Received Data] field
of the Monitor screen.
3. To quit the test mode, send the test mode end command.
5. When you finish using the test mode, reset the “Specific ID polling” command. If
the auto polling mode is selected, send the “Auto polling ON” command. If the
3 manual polling mode is selected, send the “Auto polling OFF” command.
Note: In multi-head scan mode, the N-400 performs polling only when the BL
series read bar codes. Therefore, to use the test mode, you need to send the
“Polling ON” command or “Specific ID polling” command before starting the test
mode so that polling is always enabled.
3. To quit the test mode, send the test mode end command.
5. When you finish using the test mode, send the “Polling OFF” command.
POFF[CR]
54
Chapter 3 N-400 Setup Procedure
Errors “Timer value incorrect. [OK]” The setting of the trigger ON time exceeds
during the range of 1 to 255 (x10 ms) in the interfer-
setup ence suppression mode.
“Block number incorrect. The setting of the block number exceeds the
[OK]” range of 0 to 255 when the file register is
used in PLC link.
Errors “N400 settings failed. [OK]” Communication with N-400 (for sending
settings) is abnormal.
3
communi-
cation
“N-400 failed to open. [OK]” Communication with N-400 (for reading
settings) is abnormal.
Errors file “Accessing file during No floppy disk is inserted. The floppy disk is
editing rejected. [OK]” write-protected.
The floppy disk is full.
“File not found. [OK]” The file name is incorrect. Enter a correct file
name.
55
Chapter 3 N-400 Setup Procedure
56
Chapter 4
Multi-Drop Link Mode Control Procedure
The procedures for controlling the N-400 through a 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.
4
• Command communication to the BL series: Used to send commands to the BL
series.
58
Chapter 4 Multi-Drop Link Mode Control Procedure
The baud rate cannot be set through normal operations to between 19200 and
38400 bps with the BL series setup software included with the BL-500/180 series.
(The baud rate can be set to be in the above range using serial commands.)
However, the BL-500/180 series’ baud rate can be set between 19200 and 38400
bps by performing the following procedure. (The following procedure is not de-
scribed in the “BL-500/180 Series User’s Manual”.)
The following procedure refers to the BL-180 series setup software. The procedure
is exactly the same for the BL-500 series.
1. Display the “Communication Setup” screen with the BL series setup software.
2. Select either “7 bits” or “8 bits” for the “data length” parameter on the communi-
cation setup screen by clicking on the appropriate value. (The selected item is
enclosed in a dotted line box.)
4. After the above operation, select “baud rate”. Baud rates of 19200 to 38400 bps
are added to this parameter. Select the desired baud rate.
* Perform the above operation every time you start the setup software.
59
Chapter 4 Multi-Drop Link Mode Control Procedure
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:
Note: To increase the response speed, set the BL series’ baud rate to 38400 bps.
3. Enter the ID numbers of the connected BL series on the “ID SETUP” screen.
(➮ See p. 41.)
4. Set the baud rate, data length, parity and stop bit length according to the host
computer’s settings on the “RS-232C” 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” 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.)
60
Chapter 4 Multi-Drop Link Mode Control Procedure
Since the N-400 automatically queries the BL series about its data, the host com-
puter can be operated using a simple program.
■ Communication format
4
The BL series with ID
No. 3 reads bar code Header % P 03 – ABC123 Terminator
data as “ABC123”.
••• N-400
In auto polling mode, the N-400 sends the read data to the host computer in the
following format:
• Select the header and delimiter from the following formats. The header and
delimiter can be changed to any string of five characters or less.
61
Chapter 4 Multi-Drop Link Mode Control Procedure
In manual polling mode, the host computer is operated with a more complex
program than in auto polling mode, because the host computer executes the
polling. However, manual polling mode allows data to be sent back to the host
computer only when the host computer can receive the data. For this purpose,
manual polling mode is useful. (In auto polling mode, data is constantly sent to the
host computer regardless of the conditions of the host computer.)
When auto polling is not performed (when the BL series’ ID numbers have not
been registered with the N-400 setup software), manual polling mode can be used.
••• N-400
Header % P mm Terminator
e: This code is sent back when the BL series has read no data.
NC: The BL series with the specified ID number does not exist, or is not con-
nected for communication.
62
Chapter 4 Multi-Drop Link Mode Control Procedure
% P mm CR , STX % P mm ETX
[LF] can be added to the end of the command. When [ESC] is added to the
head of the command, data stored in the N-400’s receiving buffer can be
cleared.
• Specify the read data format by selecting the “Header” and ”Delimiter” from the
following formats. (➮ See p. 40.) The read data format can be changed.
Reference: Auto polling mode simplifies the host computer’s program since the
polling command is constantly sent to each BL series from the N-400, instead of 4
from the host computer.
The number of characters stored in the transmission buffer per piece of data is the
number of characters of the data (including the additional data such as number of
decodings) plus two characters indicating the data attributes.
Example 1
When the number of bar code digits is 10 (with no additional data)
24576 / (10 + 2) = 2048
The transmission buffer can store 2048 pieces of data.
Example 2
When the number of bar code digits is 20 (with no additional data)
24576 / (20 + 2) = 1117
The transmission buffer can store 1117 pieces of data.
If the number of read data exceeds the buffer capacity, the N-400 sends back the
following “BUFFER OVERFLOW” error code to the host computer, and clears all
data stored in the transmission buffer. (The N-400 displays error code “97”.)
63
Chapter 4 Multi-Drop Link Mode Control Procedure
Five characters per piece of data indicating the data attributes are added to the
number of characters of the data (including the additional data such as number of
decodings) when stored in the transmission buffer .
Example 1
When the number of bar code digits is 10 (with no additional data)
400 / (10 + 5) = 26
The transmission buffer can store 26 pieces of data.
Example 2
When the number of bar code digits is 20 (with no additional data)
400 / (20 + 5) = 16
The transmission buffer can store 16 pieces of data.
4 If the number of read data exceeds the buffer capacity, the BL series until causing
the BUFFER OVERFLOW error sends the following error code to the host compu-
ter, and clears all data stored in the BL series.
The other BL series units which did not cause the error can continue to operate
normally.
% P mm CR , STX % P mm ETX
The BUFFER OVERFLOW error occurs when the BL series’ reading interval is
shorter than the polling interval. To prevent this error, take the following actions:
• Reduce the polling interval by setting the baud rate to 38400 bps (the highest
rate) for the RS-485 communication between the N-400 and each BL series
unit.
• In manual polling mode, modify the program so that the polling command is
sent to the BL series before the BUFFER OVERFLOW error occurs with the BL
series.
64
Chapter 4 Multi-Drop Link Mode Control Procedure
No handshaking
Read data
••• N-400
• The N-400 automatically sends read data to the host computer without using any
handshaking protocol.
PASS/RTRY protocol
4
Read data
••• N-400
Response (PASS,RTRY)
• After sending read data to the host computer, the N-400 waits for the response
(PASS or RTRY) from the host computer.
When the host computer sends the “PASS (quit)” command to the N-400,
communication of one piece of data is completed, and the N-400 is ready to
send the next data.
The N-400 sends back no data in response to the “PASS” command.
• If the “RTRY” (request to re-send) command is sent to the N-400 while the N-
400 is waiting for the “PASS” command, the N-400 sends the same data again,
and waits for the “PASS” command.
After the N-400 receives the “PASS” command, the N-400 sends back no data
even if the “RTRY” command is sent to the N-400.
• The BL series can read bar code data even when the N-400 is waiting for the
“PASS” command. In this case, the read data is stored in the transmission buffer
of the N-400. (➮ For the capacity of the transmission buffer, see p. 63.)
If the amount of read data exceeds the buffer capacity, the N-400 sends back
the “BUFFER OVERFLOW” error code to the host computer (➮ see p. 63), and
clears all data stored in the transmission buffer.
In this case, the N-400 stops its operation. The N-400’s operation restarts when
the “PASS” command is sent to the N-400 in response to the “OVER” code.
65
Chapter 4 Multi-Drop Link Mode Control Procedure
• The “PASS” and “RTRY” commands can be received in either of the following
formats:
[ESC] can be added to the head of the command, or [LF] can be added to the
end of the command.
Note 1: Even when the N-400 is waiting for the “PASS” command, it can still
receive any type of command. In this case, the N-400 immediately sends back a
response (e.g. “OK”) to the host computer.
Note 2: If the “SSET” command (➮ see p. 73) is sent to the N-400 while it is waiting
for the “PASS” command, the N-400 clears the data stored in the transmission
buffer and goes into SETUP mode.
ACK/NAK protocol
• The ACK/NAK protocol uses [ACK] (06H) instead of “PASS”, and [NAK] (15H)
instead of “RTRY” described in the above protocol. The operation is the same
as the above protocol; only the response codes are different.
4
RTS/CTS control
• When the RTS signal is turned OFF during RS-232C communication, the N-400
becomes ready for data transmission. When the RTS signal is turned ON, the
N-400 starts sending data. This cannot stop/start the data transmission once
data is being sent. It is effective for controling the transmission of a set of data.
• Even when the RTS signal is OFF, the BL series can read bar code data. In this
case, the read data is stored in the transmission buffer of the N-400. (➮ For the
buffer capacity, see p. 63.) If the amount of read data exceeds the buffer capac-
ity, the N-400 clears all data stored in the transmission buffer. In this case, the
N-400 stops its operation. The N-400’s operation restarts when the RTS signal
is turned ON, or when the N-400 sends back the “OVER” code to the host
computer. (➮ See p. 63.)
Note 1: The RTS/CTS control can be used together with other handshaking
protocols.
Note 2: When the RTS signal is OFF, the N-400 does not send back a response
(e.g. “OK) to the host computer.
66
Chapter 4 Multi-Drop Link Mode Control Procedure
••• N-400
Header % T 03 – OK Terminator
NC: “Disconnection” error. This error occurs when the BL series with the speci-
fied ID number does not exist.
* For the serial commands, the response to the serial commands, and the error
codes, see the BL series User’s Manual. The BL series does not send any
response to some of the direct control commands (TEST1, LON, etc.). How-
ever, the BL series always send back a response when they are used in multi-
drop link mode.
67
Chapter 4 Multi-Drop Link Mode Control Procedure
• When the command format is [Command] [CR], the response format is [Re-
sponse] [CR]. When the command format is [STX][Command][ETX], the
response format is [STX][Response][ETX].
Command Response
Command CR Response CR
STX Command ETX STX Response ETX
* [LF] can be added to the end of the command. However, [LF] is not added to
the response.
* When [ESC] is added to the head of the command, the N-400’s receiving buffer
is cleared. However, [ESC] is not added to the response.
Response: % T 05 – OK CR
4
Command being sent: ESC STX % T 05 – LON ETX
Note: When the reading rate check mode (TEST1) start command is sent to the BL
series, the data is stored in the BL series’ buffer, causing the buffer overflow error,
unless auto polling is performed.
Even if auto polling is performed, the buffer overflow error may occur because the
polling interval is longer than the BL series’ reading interval when many BL series
are connected. In this case, send the “Specific ID polling ON” command to the N-
400 (➮ see p. 72) to control the N-400 directly so that auto polling is performed only
for the BL series to be tested.
After using the specific ID polling mode, be sure to reset this command.
68
Chapter 4 Multi-Drop Link Mode Control Procedure
The above control 1) can be set with the N-400 setup software. (➮ See p. 42.) The
above control 3) can be performed using the connection test switch provided on the
N-400. (➮ See p. 51.)
Auto polling
ON POLE00 CR
••• N-400
OK CR
(For a description of the commands, see the following pages.)
1. Send a direct control command to the N-400 from the host computer.
2. After the N-400 receives the command, the N-400 sends back a response (e.g.
“OK” or “NG”) to the host computer.
The N-400 returns the response with the same header and delimieter as it
receives.
Command Response
Command CR Response CR
STX Command ETX STX Response ETX
* [LF] can be added to the end of the command. However, [LF] is not added to
the response.
* When [ESC] is added to the head of the command, the N-400’s receiving buffer
is cleared. However, [ESC] is not added to the response.
69
Chapter 4 Multi-Drop Link Mode Control Procedure
When “POLE00 [CR]” is sent to the N-400, the response is “OK [CR]”.
When “[STX] POLE00 [ETX]” is sent to the N-400, the response is “[STX]
OK [ETX]”.
When “[ESC] POLE00 [CR]” is sent to the N-400, the response is “OK
[CR].”
* The following commands are intended for the N-400. These commands do not
4 check whether the BL series of the registered ID number is connected.
Response: OK
ERR07... :“n” is any value other than “0” or “1”.
Description:
“n” corresponds to the ID number (1 to 31) in ascending order. (Thirty-one “n”s
are required.) If you need to register ID numbers 2, 3 and 4, the command is
ID000111000.....
Response: nnnnn...
n = 0: Not registered
n = 1: Registered
Description:
“n” corresponds to the ID number (1 to 31) in ascending order. (Thirty-one “n”s
are required.)
Response: OK
ERR01...: “mm” exceeds the range of “01” to “31”.
ERR07: “n” is any value other than “0” or “1”.
70
Chapter 4 Multi-Drop Link Mode Control Procedure
Response:
ON: Registered
OFF: Not registered
ERR01: “mm” exceeds the range of “01” to “31”.
Response: OK
ERR01: “mm” exceeds the range of “01” to “31”.
Description:
Registers all ID numbers not more than “mm”.
When the registered ID numbers are not serial numbers, the response is “99”.
Command: IDSAVE
Response: OK
● Auto polling ON
Command: POLE00
Response: OK
Example: Sending the command to start auto polling (When ten BL series units are
connected)
71
Chapter 4 Multi-Drop Link Mode Control Procedure
● Specific ID polling ON
Command: POLEmm
[mm = 01 to 31 (ID number)]
Response: OK
ERR01: “mm” exceeds the range of “01” to “31”.
The “Specific ID polling ON” command is used to execute polling for the BL
series with the specified ID number only.
When the N-400 executes polling for several BL series in reading rate check
mode, a large amount of data is continuously sent from the BL series, which
causes the buffer overflow error because the polling interval is longer than the
reading interval.
To perform the reading rate check, use the “Specific ID polling ON” command.
Response: mm OFF
mm = 01 to 31 (ID number)
4 Auto polling is performed for the BL series specified by “IDmm” only.
mm = 00: Auto polling ON
OFF: Auto polling OFF
Command: SRCmm
[mm = 01 to 31 (ID number)]
Response:
OK: Connection is correct.
NC: “Disconnection” error
SERR: Communication error
ERR01: “mm” exceeds the range of “01” to “31”.
● Starting reading
Command: LON
Response: None
● Ending reading
Command: LOFF
Response: None
You can start/end reading operation by sending the above command in the
same way as when using trigger input.
These commands can be used in multi-head mode only.
72
Chapter 4 Multi-Drop Link Mode Control Procedure
• The “LON” command corresponds to “Trigger input: ON”, and the “LOFF”
command corresponds to “Trigger input: OFF”.
• When the bar code data read by the BL series has already been sent to the
host computer, you do not need to send the “LOFF” command (in “Single Label”
reading mode only).
Reset
Resets the data stored in the N-400.
Command: RESET
Response: OK
Command: BCLR
Response: OK
4
Checking trigger input status
Used to monitor the ON/OFF status of the trigger input connected to the N-400.
Command: TIMCHK
Response: ON OFF
Command: SSET
Response: OK
If you send the following command, you can send a command to the specified BL
series without adding its ID number to the command.
After using this command, be sure to reset it.
Response: OK
ERR01: “mm” exceeds the range of “01” to “31”.
73
Chapter 4 Multi-Drop Link Mode Control Procedure
Response: mm
[mm = 01 to 31 (ID number)
mm = 00: ID number is not specified.]
2. You can then send a command to the specified BL series without adding its ID
number.
(For the commands sent to the BL series, see the BL series User’s Manual.)
Example
• To start reading: Send “LON [CR]”.
• To end reading: Send “LOFF [CR]”.
• To go to the SETUP mode: Send “SSET [CR]”.
4 3. When the N-400 fails to send a command to the BL series, the BL series sends
back the following response:
74
Chapter 4 Multi-Drop Link Mode Control Procedure
To change the settings of the N-400, you should normally use the N-400 setup
software instead of these commands.
2. After the N-400 goes into SETUP mode, send the command of the item to be
changed (setting change command) to the N-400.
When this command is processed normally, the N-400 sends back “OK”.
If an error occurs, the N-400 sends back “ERR**”. (** is the error code.)
3. To confirm the N-400’s current settings, send the setting check command to the
N-400. 4
When this command is processed normally, the N-400 sends back the data on
the current settings.
If an error occurs, the N-400 sends back “ERR**”.(** is the error code.)
4. To save the settings in the EEPROM of the N-400, send the “SAVE” command
to the N-400.
If updated settings are saved in the EEPROM, these settings take effect the
next time the N-400 is turned ON.
When this command is processed normally, the N-400 sends back “OK”.
If an error occurs, the N-400 sends back “ERR**”. (** is the error code.)
5. To exit SETUP mode and perform normal reading operation, send the “SEND”
command to the N-400.
When this command is processed normally, the N-400 sends back “OK”.
If an error occurs, the N-400 sends back “ERR**”. (** is the error code.)
■ Communication format
The ID number is not specified in the command/response format.
The N-400 returns the response with the same header and delimieter as it
receives.
Command Response
Command CR Response CR
STX Command ETX STX Response ETX
* [LF] can be added to the end of the command. However, [LF] is not added to
the response.
* When [ESC] is added to the head of the command, the N-400’s receiving buffer
is cleared. However, [ESC] is not added to the response.
75
Chapter 4 Multi-Drop Link Mode Control Procedure
00 Undefined command
14 The data stored in the EEPROM may be corrupted. Initialize the settings.
76
Chapter 4 Multi-Drop Link Mode Control Procedure
■ HOST MODE
Read error Change WP55hhh.. OK hhh... = Read error code 00, 02,
code (up to eight characters) 05, 10,
* To set a read error code, 12, 14
use HEX (hexadecimal)
Confirm RP55 55hhh.. codes.
* hhh... = FF: Read error
code is not set.
Tips To set a read error code, use the following command format.
B R
WP554252 * B = 42h, R = 52h
77
Chapter 4 Multi-Drop Link Mode Control Procedure
Tips To set the characters of the trigger ON/OFF commands, use the following com-
mand format:
78
Chapter 4 Multi-Drop Link Mode Control Procedure
■ PROTOCOL SETUP
79
Chapter 4 Multi-Drop Link Mode Control Procedure
80
Chapter 4 Multi-Drop Link Mode Control Procedure
■ ID SETUP
■ RS-232C SETUP
81
Chapter 4 Multi-Drop Link Mode Control Procedure
■ RS-485 SETUP
n = 1: Odd
Confirm RP72 72n
82
Chapter 4 Multi-Drop Link Mode Control Procedure
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
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3
(RS-485)
a b
4
A A
Host N400
(RS-232C) B B
* The above timing chart shows the case in which five BL series units are con-
nected.
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
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:
* The above table shows the case in which one BL series sends data to the N-
400. 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:
From the above data, the total communication time is obtained as follows:
Communication time = A + B
However, since each BL series constantly sends its data to the N400, the com-
mand 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.
a b
N-400 BL
1 2 3 4 5 1 Command 2 3 4 5 1 2 3 4 Command 5 1
(RS-485)
C D C D
Command Command
Host N-400
(RS-232C) 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
Chapter 4 Multi-Drop Link Mode Control Procedure
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 read-
ing end command (LOFF) is sent to the BL series, for example, the communication
time is as follows:
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 4
the BL series has stored some data
Minimum time: E = C + D
85
Chapter 4 Multi-Drop Link Mode Control Procedure
86
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
N-400
Sensor for
trigger input RS-232C
N-48
or
BL-U1
* Host PC
RS-485
The host
computer can
control several BL
series like it would
be a single unit.
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.
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
Chapter 5 Multi-Head Mode Control Procedure
Note: To increase the response speed, set the BL series’ baud rate to
38400 bps.
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).
89
Chapter 5 Multi-Head Mode Control Procedure
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. Nor-
mally, 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).
90
Chapter 5 Multi-Head Mode Control Procedure
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 * Read error
first is sent.
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.)
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 * Data is sent sequentially starting with * Read error
the earliest data.
91
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.
• If all of the connected BL series cannot read bar codes while the trigger input is
ON, a read error code is output.
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.
The BL series with ID No. 1 The BL series with ID No. 2 Read error occurred in the BL
reads bar code data as “1234”. reads bar code data as “ABC”. series with ID No.3.
92
Chapter 5 Multi-Head Mode Control Procedure
The trigger input signal type can be set for the N-400 as well as for the BL series.
Trigger input
Reading
Communication
output * Read error
Trigger input
Preset trigger time Preset trigger time 5
Reading
Communication
output * Read error
93
Chapter 5 Multi-Head Mode Control Procedure
Data transmission timing can be selected from the following modes only in single-
label reading mode:
(The data transmission timing cannot be selected in the multil 1/2/3 reading
modes.)
• After reading
This mode allows the BL series to send data immediately after reading them.
This operation is the same as that described in the timing chart in “5.2.2 Trigger
input signal type”. Normally, the data transmission timing should be set to this
mode.
This mode allows the BL series to send data when the trigger input is turned
OFF. (If the one-shot trigger mode is selected, data is sent after the preset
measurement time has passed.)
(When the BL series (When the BL series failed to
successfully read bar code data) read bar code data)
Trigger input
Reading
5 Communication
output * Read error
94
Chapter 5 Multi-Head Mode Control Procedure
The header and delimiter can be selected from the following formats: (The header
and delimiter can be changed to any string of up to five characters.) To change the
header and delimiter format, change the settings of the N-400.
Header: [ESC]/[STX]/None
Delimiter: [CR]/[CR][LF]/[ETX]
Tips You can change the communication format so that an ID number is included. The
communication format including an ID number is the same as that for multi-drop
link mode.
5
Header P mm – Reading Data Terminator [mm = 01 to 31 (ID number)]
Therefore, the read error code setting of the N-400 must be the same as that of all
connected BL series.
The default setting of the read error code is as follows:
The read error code can be easily changed. However, you must ensure that the
same error code is specified for all connected BL series.
95
Chapter 5 Multi-Head Mode Control Procedure
• Response
For details about the communication format, see pp. 4-10 and 4-11.
5 Note: To use the BL series’ reading rate check mode, send the “Specific ID polling
ON” command first. (➮ See p. 72.) After using this command, be sure to reset it.
• Response
➮ For details about the communication format, see pp. 69, 70 and 75.
96
Chapter 5 Multi-Head Mode Control Procedure
If the BL series are mounted close to each other, the laser beam emitted from one
unit enters the receiver of another unit, causing mutual interference. This may
result in a reading error or unstable reading. (Laser beams in close proximity often
cause interference.)
The differences in operation depending on the reading mode and the trigger input
signal type are the same as those in normal multihead mode.
Trigger input
A
Light source of
BL series with •••
ID No. 3
- You can change the laser ON time (A) of each BL series by changing the BL
series’ setting. When (A) is prolonged, the reading operation is stabilized, but it
is not applicable for a high-speed line. Conversely, when (A) is reduced, the
reading operation is applicable for a high-speed line, but the reading stability
may decrease.
Note: The interference suppression function prolongs the time duration that each
BL series' light source is OFF. Therefore, reading may be impossible, when the
scan time is extremely short (for example, when the BL series cans bar codes on a
high -speed line).
97
Chapter 5 Multi-Head Mode Control Procedure
Trigger input to
the N-400 F F
Reading operation
G
The communication time required to send the reading start command to one BL
series is as follows:
98
Chapter 5 Multi-Head Mode Control Procedure
Number of connected BL series Next trigger input receiving OFF time (I)
2 50 ms
5 140 ms
10 290 ms 5
20 590 ms
31 920 ms
Trigger input N
to N-400
BL series with L
ID No. 1
BL series with
ID No. 2
L
L
BL series with
ID No. 3 M M M M
99
Chapter 5 Multi-Head Mode Control Procedure
The following table shows the actual minimum scan time for each baud rate setting.
To reduce the scan cycle time (to scan bar codes on a high-speed line), reduce the
number of connected BL series or shorten the trigger ON time.
5 The scan cycle time can be calculated from the following formula:
Note: When the interference suppression function is used, the reading operation is
not applicable for a high-speed line because the scan OFF time of each BL series
is prolonged.
100
Chapter 6
PLC Link
6.1 PLC Link ............................................................................ 102
6.1.1 List of PLCs used for PLC link ............................................. 102
6.1.2 Devices used for PLC link .................................................... 103
6.2 Setup Procedure ............................................................... 104
6.2.1 Setting the BL Series ........................................................... 104
6.2.2 Setting the N-400 ................................................................. 105
6.2.3 Setting the PLC .................................................................... 106
6.3 Device Assignment ........................................................... 108
6.3.1 Device assignment in multi-drop link mode ......................... 108
6.3.2 Device assignment in multi-head scan mode ...................... 113
6.4 PLC Link Error .................................................................. 116
Chapter 6 PLC Link
Since the N-400 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 in-
volves the following limitations:
• The settings of the N-400 and BL series cannot be changed on the PLC.
• The PLC link cannot send a command to the BL series. However, the PLC link
provides a reading control address to start/end reading.
• The PLC link cannot send a command to the N-400. The start of auto polling or
registration of ID numbers cannot be set on the PLC.
To register ID numbers, use the N-400 setup software.
102
Chapter 6 PLC Link
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.
When a block number is specified during the N-400 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 N-400 setup and PLC programming), the
file register incorporated in the CPU is used.
103
Chapter 6 PLC Link
2. Enter the ID numbers (1 to 31) for 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 of the BL series and the N-400 are as follows:
Note: To increase the response speed, set the BL series’ baud rate to 38400 bps.
1) To use the N-400 in multi-head scan mode, set the BL series’ reading mode to
“Single label”.
4) 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” respec-
tively (default settings).
104
Chapter 6 PLC Link
1. Set the host mode to multi-drop link mode or multi-head scan mode. (➮ See p.
38.)
2. Set the PLC link on the “PROTOCOL SETUP” screen. (See p. 40)
3. Enter the ID numbers for 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 PLC’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
* To use multi-head scan mode, set the following parameters.
1) In multi-head scan mode, connect the trigger input to the N-400 so that all of the
BL series connected to the N-400 are controlled like a single bar code reader.
You must also set the “Read mode” and “Trigger input signal type” on the N-
400.
2) Set the read error code according to the BL series’ setting. Normally, the read
error code is set to “ERROR” (default setting).
3) 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).
105
Chapter 6 PLC Link
* The “I/O port”, “Trigger input”, “Supply 5 V” and “CTS” parameters may not be
provided depending on the type of link unit.
106
Chapter 6 PLC Link
4. To use the KV-L2 port 2, set the port 2 selector switch to “RS-232C”.
2. Set the baud rate, data length, parity and stop bit length according to the RS-
232C communication parameters of the N-400.
4. To use the KV-L2 port 2, set the port 2 selector switch to “RS-232C”.
6
5. No other parameters need to be set.
107
Chapter 6 PLC Link
When a device head address is specified on the “PLC SETUP” screen of the N-400
setup software, the device numbers are automatically assigned based on the
specified head address.
■ Data memory head address for each ID number and reading trigger areas
The addresses of “+00” to “+30” (based on the specified head address) indicate the
areas where the bar code data for each ID number is stored.
The addresses of “+31” to “+61” indicate the areas used to send a reading trigger
signal to the BL series. These areas are not assigned if you set “Reading trigger
input area” to “Disable” in the N-400 setup software. (In this case, these areas can
be used for other purposes.)
• The “+00” to “+30” data memory head addresses can be set to the same
number. If the same head address is specified, data from all the BL series is
stored in the same area.
108
Chapter 6 PLC Link
When ten BL series are connected, ten data memory areas exist (if the different
data memory head addresses are specified for each ID number).
Note: These data areas accept up to 255 digits. However, the BL series can read
only 32 digits. Therefore, all 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 head address is “100” and three BL series (ID nos. 1 to 3) are
connected:
109
Chapter 6 PLC Link
+00 to +30
Data memory head address for each ID number
Specify the head address of the areas where the read data are stored. (Specify the
head address as binary data.)
Specify different head addresses for each ID number. (If the same address is
specified, all data is replaced with the last data when BL series units with different
ID numbers continuously read data.)
+31 to +61
Reading trigger area for each ID number
These areas are used to send the trigger input signal to the BL series to start
reading bar code data.
You can set these areas to “Used” or “Unused”, depending on the N400’s internal
setting. (➮ See p. 40.) If you set these areas to “Unused”, users can freely use the
areas.
When a photoelectric sensor for trigger input is connected to the BL series, do not
use these areas.
Note: Specify these areas as “0000” while the BL series is not reading bar code
data.
6
A +00 (A: Data memory head address specified as +00 to +30)
Data memory flag area
These areas are used as a flag that indicates if bar code data has been stored in
each area.
The flag areas can be used for the following two purposes:
110
Chapter 6 PLC Link
Real-time control
• To specify the flag areas, 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 effective.
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. To prevent this, use the sequential processing mode as shown below.
Sequential processing 6
• To specify the flag areas, use “0002” or “0003”.
• 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. (In sequential processing mode, data is retained in the BL
series’ transmission buffer instead of the N-400’s 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.
Tips Even when the BL series with ID No. 1 retains data (the flag area is “0003”), data
from the BL series with other ID numbers can be stored (if the flag area is “0002”).
Thus, the sequential processing for each ID number is performed independently.
111
Chapter 6 PLC Link
A +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 A +02 ad-
dress. The number of data digits is stored in the A +03 address as binary data.
• The read bar code data is stored in the A+04 to +258 addresses using the ASCII
codes (Hexadecimal numbers in two digits) by the digit. (➮ See the ASCII code
table on p134.)
• 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
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 with ID No. 12 reads bar code data as “KE12”:
A + 02 12 ID number
6 A + 03 4
"K"
Number of digits
A + 04 $004B
A + 05 $0045 "E" Specified by ASCII codes
"E" (hexadecimal numbers)
A + 06 $0031
A + 07 $0032 "2"
Example: When a read error (ERROR) occurs in the BL series with ID No. 4:
A + 02 4 ID number
A + 03 5 Number of digits
A + 04 $0045 "E"
A + 05 $0052 "R" Specified by ASCII codes
"R" (hexadecimal numbers)
A + 06 $0052
A + 07 $004F "O"
A + 08 $0052 "R"
112
Chapter 6 PLC Link
If a communication failure occurs between the BL series and N-400 when the N-
400 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.
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
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.
Sequential processing
6 • To specify the flag area, use “0002” or “0003”.
• 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
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:
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.
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.
+ 02 12 ID number
+ 03 4 Number of digits
+ 04 $004B "K"
+ 05 $0045 "E" Specified by ASCII codes
(hexadecimal numbers)
+ 06 $0031 "1"
+ 07 $0032 "2"
+ 02 1 ID number
+ 03 5 Number of digits
+ 04 $0045 "E"
+ 05 $0052 "R" Specified by ASCII codes
"R" (hexadecimal numbers)
+ 06 $0052
+ 07 $004F "O"
+ 08 $0052 "R"
115
Chapter 6 PLC Link
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.
3. Check if the PLC’s settings are correct. (See pp. 106 and 107.)
5. Check if the device setting range does not exceed the available data memory
areas of the PLC.
6 If the data memory areas used for the N-400 do not exist in the PLC, communi-
cation is impossible.
For the settings of the link unit, see the instruction manual for the link unit being
used.
116
Chapter 6 PLC Link
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.
To obtain the total communication time, add the “RS-485 command transmission
time” (D + b) described on p. 84.
117
Chapter 6 PLC Link
118
Appendices
Appendix A Specifications
N-400
Model N-400
Connectable bar code reader BL-700 series, BL-500 series, BL-180 series
Trigger Rated input 15 to 26 VDC, 10 mA max.
input 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
RS-485 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 31
connectable units
Max. total 1.2 km
extension distance
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
Appendices
120
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 5 VDC ±5% (600 mA)
Trigger Rated input 15 to 26 VDC, 10 mA max.
input Max. OFF current 1.0 mA
OK/NG Output form NPN open-collector
output Rated load 30 VDC, 100 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
BL-U1
Model BL-U1
Power supply for bar code reader 5 VDC ±5% (1.5 A)
Appendices
Power supply for sensor 12 V ±10% (300 mA)
Trigger Rated input 8.5 to 30 VDC, 10 mA max.
input Max. OFF current 0.5 mA
OK/NG Output form NPN open-collector
output Rated load 30 VDC, 100 mA
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
Appendices
Unit: mm
Appendix B Dimensions
N-400
N-400
TEST 27.3
RS-232C
SD RD CS RS
POWER TIMING SD RD
RS-455
TERMINATOR
ON
OFF
4 x ø4.5
40 mounting (70) 51
60 hole
N-48
Appendices
(70)
2 x ø4.5
mounting hole
5.5
43.2
55
5.9 26
5.9 63.2
75
122
Appendices
BL-U1
Approx.
(with 3-core plug)
ø6.5, Cable length: 2 m
40
110
98
90
120°
4 x ø5 mounting hole
4
4
150 51
186 91 max.
Appendices
123
Appendices
The bar code data read by the BL series, along with the transmitted command and
response to the command can be displayed.
Enter the commands using the keyboard and press the [Return] key to send the
command.
124
Appendices
2100 '
3000 '*COMMAND RECEIVE:'***RECEIVING COMMAND****************
3010 MDAT$ = MID$(DAT$, 6, 2)
3020 IF MDAT$ = "NC" THEN GOSUB 5000: RETURN
3030 MDAT$ = MID$(DAT$, 6, 4)
3040 IF MDAT$ = "SERR" THEN GOSUB 6000: RETURN
3050 GOSUB 9000: RETURN
3060 '
4000 '*BUFFOVER :'***BUFFER OVER****************************
4010 PRINT DAT$
4020 PRINT "THE UNIT #"; MID$(DAT$, 3, 2); " OCCURS BUFFER OVER."
4030 DAT$ = ""
4040 RETURN
4050 '
5000 '*NOCONNECT :'***CONNECTION ERROR**********************
5010 PRINT DAT$
5020 PRINT "THE UNIT #"; MID$(DAT$, 3, 2); " IS NOT CONNECTED."
5030 DAT$ = ""
5040 RETURN
5050 '
6000 '*SRLERR :'***COMMUNICATION ERROR**********************
6010 PRINT DAT$
6020 PRINT "COMMUNICATION ERROR - PLEASE RETRY"
6030 DAT$ = ""
6040 RETURN
6050 '
7000 '*EMPTY :'***NO DATA***********************************
7010 PRINT DAT$
7020 PRINT "THE UNIT #"; MID$(DAT$, 3, 2); " HAS NO DATA."
7030 DAT$ = ""
7040 RETURN
7050 '
8000 '*BARCODE :'***DISPLAYING READ DATA********************
8010 PRINT DAT$
8020 PRINT "THE UNIT #"; MID$(DAT$, 3, 2); " READS THE DATA AS";
MID$(DAT$, 6)
8030 DAT$ = ""
Appendices
8040 RETURN
8050 '
9000 '*RESPONSE :'***DISPLAYING RESPONSE********************
9010 PRINT DAT$; " WAS RETURNED."
9020 DAT$ = ""
9030 RETURN
9040 WEND
9050 CLOSE #1
9060 END
Note: This sample program is shown for your reference only. Please note that this
may not work correctly depending on the version of BASIC you use.
125
Appendices
Data is stored in the following areas. Process the data using the program as
desired.
● N-400’s settings
• Mode: Multi-drop link
• Using PLC trigger area: Enable
126
Appendices
M9038
M0V K100 D0
M0V K300 D2
M0V K2 D100
Appendices
After processing is completed, enter “2”
M0V K2 D100 in D100.
END
127
Appendices
M9038 MOV
#0064 Specify the head address of the data
DM0000 memory area for each ID number.
MOV The N-400 processes data as binary
#0008 data. Specify each DM number in
DM0001 binary format.
0000 MOV
#0001
DM0031
Enter “0000” for the reading trigger input
0000 MOV of ID No. 1.
#0000
DM0031
0001 MOV
#0001
DM0032
Enter “0001” for the reading trigger
0002 MOV input of ID No. 2.
#0000
Appendices
DM0032
0002 MOV
#0001
DM0033
Enter “0002” for the reading trigger
0002 MOV input of ID No. 3.
#0000
DM0033
25313 MOV
#0100
DM0003
25506 [Data stored in D103 and When DM0100 becomes “3”, the
subsequent areas is specified processing is performed.
processed.] After processing is completed, enter “2”
in DM0100.
MOV
#0002
DM0100
128
Appendices
25313 CMP
DM0200
#0003
25506 [Data stored in DM0203 When DM0200 becomes “3”, the
and subsequent areas is specified processing is performed.
processed.] After processing is completed, enter “2”
in DM0200.
MOV
#0002
DM0200
25313 CMP
DM0300
#0003
25506 When DM0300 becomes “3”, the
[Data stored in DM0303
and subsequent areas is specified processing is performed.
processed.] After processing is completed, enter
“2” in DM0300.
MOV
#0002
DM0300
END
Appendices
129
Appendices
2008
#0100 #0200 #0300
DW DW DW Specify the head address of the data
DM0000 DM0001 DM0002 memory area for each ID number.
#0002 #0002 #0002 Specify the data memory flag for each
DW DW DW ID number as “2”. (To use the flag,
DM0100 DM0200 DM0300 select “Sequential processing”.)
0000
#0001
DW
DM0031 Enter “0000” for the reading trigger
0000 input of ID No. 1.
#0000
DW
DM0031
0001
#0100
DW
DM0032 Enter “0001” for the reading trigger
0001
#0000 input of ID No. 2.
DW
DM0032
0002
#0001
DW
DM0033 Enter “0002” for the reading trigger input
0002 of ID No. 3.
#0000
DW
DM0033
2002 #0003
#0100
LDA CMP
2010 When DM0100 becomes “3”, the
[Data stored in DM0103 and subsequent specified processing is performed.
areas is processed.] After processing is completed, enter “2”
in DM0100.
#0002
DW
DM0100
2002
DM0200 #0003
LDA CMP
2010 When DM0200 becomes “3”, the
[Data stored in DM0203 and subsequent specified processing is performed.
areas is processed.]
Appendices
END
ENDH
130
Appendices
Appendix D Troubleshooting
If an abnormal condition occurs while operating this unit, check the following points.
If you cannot solve the problem, contact KEYENCE.
Communication is unsuccessful.
1) Check communication between the N-400 and each BL series using the N-
400’s connection test mode.
If communication is unsuccessful, check the following points:
1 Check if the power switches of the N-400 and all BL series are ON.
2 Check if the RS-485 communication parameters (baud rate, data length, parity
and stop bit length) for the BL series are the same as the N-400’s settings.
5 Check if the specified cable is used for the multi-drop link connection, the cable
extension is within the specified distance (1.2 km), and the number of con-
nected BL series is within the specified range (thirty one).
6 Check if the multi-drop link connection is not passed through the terminal block
or not branched. (➮ See pp. 20 and 25.)
7 Check if the terminators are correctly set in the multi-drop link connection.
(➮ See pp. 20 and 25.)
2) Check the communication between the N-400 and the host computer for the
Appendices
following points:
1 Check if the communication parameters (baud rate, data length, parity and stop
bit length) for the host computer are the same as the N-400’s settings.
131
Appendices
1 Check if the ID numbers of all connected BL series have been registered on the
“ID SETUP” screen of the N-400 setup software.
2 To use multi-head mode, check the following points in addition to the above.
ii) Check if the BL series’ trigger input signal type is set to “Level”.
iii) Check if the BL series’ read error code setting is the same as the N-400.
iv) Check if the BL series’ reading start/end commands are the same as the N-
400’s settings.
132
Appendices
■ Status indication
These codes indicate that the N-400 is in a special condition.
50
50):
S0 (50
When you press and hold the test switch for five seconds, this code is displayed.
When the N-400 displays this code, the communication parameters are set as
follows: (➮ See p. 48.)
This code is used to send settings to the N-400 on the N-400 setup software.
51):
S1(51
51
The code indicates that the N-400 is in SETUP mode. This code is displayed after
the SSET command is sent, or while settings are sent to the N-400 or received
from the N-400 on the setup software.
■ Error indication
The following codes indicate that the N-400 is in an abnormal condition.
“99”: 99
That the N-400 is defective. If this error cannot be removed even when the test
switch is pressed, contact KEYENCE.
“98”: 98
Appendices
Indicates an EEPROM memory error. All the settings will be initialized. Press the
test switch to reset this error.
“97”: 97
Indicates a data overflow in the N-400’s buffer. Press the test switch to reset this
error.
“96”, ”95”: 96 95
Displayed when communication is abnormal in PLC link mode. (Indicates a PLC
link error.) Press the test switch to reset this error.
133
Appendices
High-order 4 bits
Hexadecimal 0 1 2 3 4 5 6 7
8 1000 BS CAN ( 8 H X h x
Appendices
9 1001 HT EM ) 9 I Y i y
A 1010 LF SUB ✽ : J Z j z
B 1011 HM ESC + ; K [ k {
C 1100 CL , < L \ I
D 1101 CR – = M ] M }
E 1110 SO . > N n ~
F 1111 SI / ? O _ o del
134
Appendices
Appendices
Header % P 01 – AB12 CC Delimiter
Convert each character into the ASCII code as shown below, and express the
result as 8-bit binary numbers.
135
Appendices
Convert the calculated hexadecimal number into an ASCII code in two digits. The
result obtained is the checksum.
Therefore, the checksum for the above example is “cc = 59 (35h 39h).
Example:
Result:
Header % P 15 – ERROR CC Delimiter CC=04
0+0=0
0+1=1
1+0=1
1+1=0
* + : Operator of Exclusive OR
Hexadecimal number 0 1 2 3 4 5 6 7
Binary number 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal number 8 9 A B C D E F
Binary number 1000 1001 1010 1011 1100 1101 1110 1111
Appendices
136
Appendices
PROTOCOL SETUP
Appendices
PLC link
❑ ACK/NAK
Header ❑ None ❑ STX ❑ ESC
❑ Custom ( ) * Up to five characters
Delimiter ❑ CR ❑ CR + LF ❑ ETX
❑ Custom ( ) * Up to five characters
Add ID ❑ Do not add ❑ Add
Checksum ❑ Do not add ❑ Add
❑ Enable PLC model name ❑ SYSMAC-C ❑ MELSEC-A
❑ KV
PLC trigger area ❑ Disable ❑ Enable
DM head address ( ) 00 * 0000 to 9900
PLC station/ ( ) * 000 to 255
unit number
File register ❑ Disable ❑ Enable
File register ( ) * 000 to 255
block number
137
Appendices
ID SETUP
❑ 01 ❑ 08 ❑ 14 ❑ 20 ❑ 26
❑ 02 ❑ 09 ❑ 15 ❑ 21 ❑ 27
❑ 03 ❑ 10 ❑ 16 ❑ 22 ❑ 28
❑ 04 ❑ 11 ❑ 17 ❑ 23 ❑ 29
❑ 05 ❑ 12 ❑ 18 ❑ 24 ❑ 30
❑ 06 ❑ 13 ❑ 19 ❑ 25 ❑ 31
❑ 07
RS-232C SETUP
Baud rate ( ) * 600 to 38400 bps
Data length ❑ 7 bits ❑ 8 bits
Parity ❑ Even ❑ Odd ❑ None
Stop bit length ❑ 1 bit ❑ 2 bits
RTS/CTS handshaking ❑ Disable ❑ Enable
RS-485 SETUP
138
Appendices
PROTOCOL SETUP
PLC link Disable
Handshaking No handshaking
Header None
Delimiter CR
Add ID Add
Checksum Do not add
ID SETUP
Only ID 1 is registered.
RS-232C SETUP
Appendices
RS-485 SETUP
139
Appendices
1) HOST MODE
[MODE] [X] MULTI-DROP LINK [X] MULTI-HEAD SCAN
[Interference Suppression] [X] Disable [X] ENABLE Timer [10] x 10 msec
[Read mode] [X] Single [X] Multi 1 [X] Multi 2
[Data-send] [X] After read [X] At trigger input
[Read error code] ERROR [4552524F52]
3) PROTOCOL SETUP
[Use PLC] [X] Don't use [X] Use
[Handshaking] [X] No handshaking [X] PASS/RTRY [X] ACK/NAK
[Header] [X] None [X] STX [X] ESC [X] Custom
[Delimiter] [X] CR [X] CR + LF [X] ETX [X] Custom
[Add ID] [X] Don’t Add [X] Add
[Checksum] [X] Don’t Add [X] Add
[PLC Model Name] [X] SYSMAC-C [X] MELSEC-A [X] KV
[PLC Trigger Area] [X] Disable [X] ENABLE
[DM Head Address] 000
Appendices
4) ID setup
[X]01 [X]02 [X]03 [X]04 [X]05 [X]06 [X]07 [X]08 [X]09
[X]10
[X]11 [X]12 [X]13 [X]14 [X]15 [X]16 [X]17 [X]18 [X]19
[X]20
[X]21 [X]22 [X]23 [X]24 [X]25 [X]26 [X]27 [X]28 [X]29
[X]30
[X]31
5) RS-232C
[Baud rate] 9600 bit/s
[Data bits] [X] 7 bits [X] 8 bits
[Parity] [X] Even [X]Odd [X]None
[Stop bits] [X] 1 bit [X]2 bits
[RTS / CTS] [X] Invalid [X]Use RTS / CTS handshaking
6) RS485
[Baud rate] 9600 bit/s
[Data bits] [X] 7 bits [X] 8 bits
[Parity] [X] Even [X]Odd [X]None
[Stop bits] [X] 1 bit [X]2 bits
140
WARRANTIES AND DISCLAIMERS:
(1) KEYENCE warrants the Products to be free of defects in materials and
workmanship for a period of one (1) year from the date of shipment. If any models
or samples were shown to Buyer, such models or samples were used merely to
illustrate the general type and quality of the Products and not to represent that the
Products would necessarily conform to said models or samples. Any Products
found to be defective must be shipped to KEYENCE with all shipping costs paid by
Buyer or offered to KEYENCE for inspection and examination. Upon examination
by KEYENCE, KEYENCE, at its sole option, will refund the purchase price of, or
repair or replace at no charge any Products found to be defective. This warranty
does not apply to any defects resulting from any action of Buyer, including but not
limited to improper installation, improper interfacing, improper repair, unauthorized
modification, misapplication and mishandling, such as exposure to excessive
current, heat, coldness, moisture, vibration or outdoors air. Components which
wear are not warranted.
(2) KEYENCE is pleased to offer suggestions on the use of its various Products.
They are only suggestions, and it is Buyer’s responsibility to ascertain the fitness of
the Products for Buyer’s intended use. KEYENCE will not be responsible for any
damages that may result from the use of the Products.
(3) The Products and any samples (“Products/Samples”) supplied to Buyer are
not to be used internally in humans, for human transportation, as safety devices or
fail-safe systems, unless their written specifications state otherwise. Should any
Products/Samples be used in such a manner or misused in any way, KEYENCE
assumes no responsibility, and additionally Buyer will indemnify KEYENCE and
hold KEYENCE harmless from any liability or damage whatsoever arising out of
any misuse of the Products/Samples.
(4) OTHER THAN AS STATED HEREIN, THE PRODUCTS/SAMPLES ARE
PROVIDED WITH NO OTHER WARRANTIES WHATSOEVER. ALL EXPRESS,
IMPLIED, AND STATUTORY WARRANTIES, INCLUDING, WITHOUT LIMITA-
TION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU-
LAR PURPOSE, AND NON-INFRINGEMENT OF PROPRIETARY RIGHTS, ARE
EXPRESSLY DISCLAIMED. IN NO EVENT SHALL KEYENCE AND ITS AFFILI-
ATED ENTITIES BE LIABLE TO ANY PERSON OR ENTITY FOR ANY DIRECT,
INDIRECT, INCIDENTAL, PUNITIVE, SPECIAL OR CONSEQUENTIAL DAM-
AGES (INCLUDING, WITHOUT LIMITATION, ANY DAMAGES RESULTING
FROM LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF INFORMATION,
LOSS OR INACCURACY OF DATA, LOSS OF PROFITS, LOSS OF SAVINGS,
THE COST OF PROCUREMENT OF SUBSTITUTED GOODS, SERVICES OR
TECHNOLOGIES, OR FOR ANY MATTER ARISING OUT OF OR IN CONNEC-
TION WITH THE USE OR INABILITY TO USE THE PRODUCTS, EVEN IF
KEYENCE OR ONE OF ITS AFFILIATED ENTITIES WAS ADVISED OF A POS-
SIBLE THIRD PARTY’S CLAIM FOR DAMAGES OR ANY OTHER CLAIM
AGAINST BUYER. In some jurisdictions, some of the foregoing warranty disclaim-
ers or damage limitations may not apply.
141
N-400 User's Manual
96M0353
User's Manual
Multi-Drop Controller for BL Series
N-400
N-400
TEST
RS-232C
READER SD RD CS RS
POWER TIMING SD RD
POWER SD RD RS-455
RS-232C
TERMINATOR
ON
TERMINATOR
OFF
ON
OFF