The text of a manual · part 7 of 15
N-400 User's Manual: Multi-Drop Controller for BL Series, pages 61 to 70
Pages 61 to 70 of 150
The original document is the PDF (1.3 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Keyence N-400
Page 61
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.)
7. Click on [Quit] to quit this mode.
Procedure for starting BL test mode using the “Monitor” screen To start the BL series “Reading rate check” mode by sending a command from the host computer to the N-400 in multidrop link mode, send the command using the “Monitor” screen according to the procedure below. ■ Using the N-400 in multi-drop link mode 1. Send the “Specific ID polling” command (see p. 72) so that polling is performed only for the BL series to be tested. To send the command using the Monitor screen, be sure to enter the command using uppercase characters. [CR] of the following command corresponds to the [Enter] key of the personal computer. POLEmm[CR]
* mm = 01 to 31 (ID number of BL series)
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
Page 62
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. %Tmm-TEST1[CR]
* mm = 01 to 31: ID number of BL series
3. To quit the test mode, send the test mode end command. %Tmm-QUIT[CR]
* mm = 01 to 31: ID number of BL series
4. To continue the test mode with a BL series of a different ID number, repeat steps 1. to 3. 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 manual polling mode is selected, send the “Auto polling OFF” command.
3
• •
Auto polling: POLE00[CR] Manual polling: POFF[CR]
■ Using the N-400 in multi-head scan mode 1. Send the “Specific ID polling” command (see p. 72) so that polling is performed only for the BL series to be tested. To send the command using the Monitor screen, be sure to enter the command using uppercase characters. [CR] of the following command corresponds to the [Enter] key of the personal computer. POLEm[CR]
* mm = 01 to 31 (ID number of BL series)
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.
2. Send the test mode command to the BL series to be tested. %Tmm-TEST1[CR]
* mm = 01 to 31: ID number of BL series
3. To quit the test mode, send the test mode end command. %Tmm-QUIT[CR]
* mm = 01 to 31: ID number of BL series
4. To continue the test mode with a BL series of a different ID number, repeat steps 1. to 3. 5. When you finish using the test mode, send the “Polling OFF” command. POFF[CR]
54
Page 63
Chapter 3
3.6
N-400 Setup Procedure
List of Error Messages Error message Errors during setup
Errors communication
Errors file editing
Contents
“Timer value incorrect. [OK]”
The setting of the trigger ON time exceeds the range of 1 to 255 (x10 ms) in the interference suppression mode.
“Station number incorrect.” [OK]
The setting of the station number exceeds the range of 000 to 255.
“Block number incorrect. [OK]”
The setting of the block number exceeds the range of 0 to 255 when the file register is used in PLC link.
“N400 settings failed. [OK]”
Communication with N-400 (for sending settings) is abnormal.
“N-400 failed to open. [OK]”
Communication with N-400 (for reading settings) is abnormal.
“Accessing file during rejected. [OK]”
No floppy disk is inserted. The floppy disk is write-protected.
3
The floppy disk is full. “File not found. [OK]”
The file name is incorrect. Enter a correct file name.
“File name incorrect. [OK]”
55
Page 64
Chapter 3
3
56
N-400 Setup Procedure
Page 65
Chapter 4 Multi-Drop Link Mode Control Procedure 4.1
Multi-Drop Link Mode ......................................................... 58
4.1.1. Controlling multi-drop link mode ............................................ 58 4.1.2 Setup procedure .................................................................... 60 4.2
Data Communication in Multi-Drop Link Mode ................ 61
4.2.1 4.2.2 4.2.3 4.2.4
Auto polling ............................................................................ 61 Manual polling ........................................................................ 62 Capacity of Transmission Buffer ............................................ 63 Handshaking protocol ............................................................ 65
4.3
Command Transmission To BL Series ............................. 66
4.4
N-400 Direct Control Commands ...................................... 69
4.4.1 Communication procedure ..................................................... 69 4.4.2 Description of commands ...................................................... 70 4.5
N-400 Setup Command ...................................................... 75
4.6
Communication Time Consideration ................................. 83
Page 66
Chapter 4
4.1
Multi-Drop Link Mode Control Procedure
Multi-Drop Link Mode
4.1.1. Controlling multi-drop link mode Multi-drop link mode can control up to thirty-one BL series units through a host computer. Since the complex communication (RS-485 communication) between each BL series unit and the N-400 is controlled by the N-400, the host computer controls the communication with the N-400 only, and consequently can be operated with a simple program. (The ID number assigned to the header of the transmitted data allows you to identify the BL series unit that sent the data.) Therefore, multi-drop link mode provides a system configuration that allows use of a simpler program on the host computer. The procedures for controlling the N-400 through a host computer are classified into the following three methods:
4
•
Data communication: Used to send bar code data read by the BL series to the host computer.
•
Command communication to the BL series: Used to send commands to the BL series.
•
Command communication to the N-400: Used to control the N-400 directly or change the settings of the N-400.
*
All of the above communication is performed using ASCII codes.
Details on these control methods are described on the following pages.
58
Page 67
Chapter 4
Multi-Drop Link Mode Control Procedure
Setting the Baud Rate of the BL Series In order to increase the response speed of the BL-500/180 series when it is connected in the multi-drop link mode through the N400, we recommend that the baud rate for RS-485 communication between the BL-500/180 series and the N-400 be set to 38400 bps. 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 described 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.
4
2. Select either “7 bits” or “8 bits” for the “data length” parameter on the communication setup screen by clicking on the appropriate value. (The selected item is enclosed in a dotted line box.) 3. Press the [@] key once. 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
Page 68
Chapter 4
Multi-Drop Link Mode Control Procedure
4.1.2 Setup procedure For setup and connection procedures, see p. 10. This section describes the procedures for setting the N-400, BL series and host computer only.
Setting the BL series Using the BL setup software or serial communication, set the BL as follows: 1. Set “Multi-drop Link” to “Enable”. 2. Assign ID numbers (1 to 31) to the connected BL series. Be sure not to assign the same ID number to different units. 3. Set the RS-485 communication parameters (baud rate, data length, parity and stop bit length) for the BL series according to the N-400’s settings. The default settings for the BL series and the N-400 are as follows: Baud rate: 9600 bps Data length: 7 bits Parity: Even Stop bit length: 1 bit
4
Note: To increase the response speed, set the BL series’ baud rate to 38400 bps. 4. Setting “Handshaking protocol” or “RTC/CTS” is not effective. 5. Set “Header” to “None”. Setting “Delimiter” is not effective. *
Set other parameters as required.
Setting the N-400 Using the N-400 setup software, set the N-400 as follows: 1. Set the host mode to multi-drop link mode. (➮ See p. 38.) 2. Set the handshaking protocol on the “PROTOCOL” screen. (➮ See p. 40.) 3. Enter the ID numbers of the connected BL series on the “ID SETUP” screen. (➮ See p. 41.) To perform manual polling, do not register ID numbers. 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.)
Setting the host computer Set the RS-232C communication parameters (baud rate, data length, parity and stop bit length) for the host computer according to the N-400’s settings.
60
Page 69
Chapter 4
4.2
Multi-Drop Link Mode Control Procedure
Data Communication in Multi-Drop Link Mode In multi-drop link mode, the bar code data read by the BL series is sent to the host computer through either “Auto polling” or “Manual polling”. The following sections describe these polling methods individually. You should normally use auto polling mode.
4.2.1 Auto polling ■ Auto polling mode When the ID numbers of the BL series connected to the N-400 have been registered in auto polling mode, the N-400 automatically executes polling (queries the BL series of the specified ID number about its data). The obtained data is constantly sent to the host computer from the N-400. Since the N-400 automatically queries the BL series about its data, the host computer can be operated using a simple program. ■ Communication format
4 The BL series with ID No. 3 reads bar code data as “ABC123”.
•••
Header % P 03 – ABC123 Terminator
N-400
In auto polling mode, the N-400 sends the read data to the host computer in the following format:
Header % P mm – (Data) Terminator • mm = 01 to 31: ID number of BL series
•
(Data) = Read data OVER: “BUFFER OVERFLOW” error has occurred. (➮ See p. 63.)
•
Select the header and delimiter from the following formats. The header and delimiter can be changed to any string of five characters or less. Header: [ESC], [STX], None Delimiter: [CR], [CR][LF], [ETX]
■ Setting auto polling mode To set auto polling mode, use the N-400 setup software (➮ see p. 42) or serial commands (➮ see p. 71). Using the serial commands, you can easily control auto polling (stop or start auto polling).
61
Page 70
Chapter 4
Multi-Drop Link Mode Control Procedure
4.2.2 Manual polling ■ Manual polling When you send a polling command from the host computer to a desired BL series while in manual polling mode, the BL series sends back its data to the host computer. 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. ■ Sequence and format for communication In manual polling mode, data is sent in the following sequence and format:
4 The BL series with ID No. 5 reads bar code data as “123456”.
•••
Header % P 05 Terminator
N-400
Header % P 05 – 123456 Terminator
1. Send a polling command from the host computer. Header % P mm Terminator 2. The BL series sends back its bar code data.
Header % P mm – (Data) Terminator • mm = 01 to 31: ID number of BL series
•
(Data) = Read data e: This code is sent back when the BL series has read no data. OVER: “BUFFER OVERFLOW” error has occurred. (➮ See p. 63) NC: The BL series with the specified ID number does not exist, or is not connected for communication. SERR: Communication error has occurred.
62