Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 9 of 15

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

Pages 81 to 90 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 81

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).

•

These commands can be changed to any string of up to eight characters.

Reset Resets the data stored in the N-400. Command: RESET Response: OK

Clearing transmission buffer Clears the transmission buffer of the N-400 and all BL series. 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. * This command can be used in multi-head scan mode only. Command: TIMCHK Response: ON OFF

Shift to SETUP mode Used to go to the SETUP mode. (See p. 4-19.) Command: SSET Response: OK

Specifying the ID number of command transmission destination (Hotline command) Normally, when a command is sent to the BL series, the ID number of the BL series is added to the command. 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. ● Specifying the Destination ID number for command transmission Command: TRCIMmm [mm = 01 to 31 (ID number)] Response: OK ERR01: “mm” exceeds the range of “01” to “31”. ● Resetting the destination ID number for command transmission Command: TROFF Response: OK

73

Page 82

Chapter 4

Multi-Drop Link Mode Control Procedure ● Checking the destination ID number for command transmission Command: TRCOM Response: mm [mm = 01 to 31 (ID number) mm = 00: ID number is not specified.] ■ Description of the procedure 1. Send the “TRCOMmm” command. (The N-400 sends back “OK”.) The N-400 displays the specified ID number. 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: NC: The BL series with the specified ID number is disconnected. SERR: Communication error 4. After the command transmission is completed, be sure to send “TROFF”. Otherwise, the N-400 cannot receive any commands.

74

Page 83

Chapter 4

4.5

Multi-Drop Link Mode Control Procedure

N-400 Setup Command This section describes the procedure for changing the N-400’s settings by sending a command to the N-400. To change the settings of the N-400, you should normally use the N-400 setup software instead of these commands. ■ Details of the communication 1. Send the “SSET” direct control command to the N-400. The N-400 then goes into SETUP mode. (In SETUP mode, the N-400 displays “S1(51)”.) When this command is processed normally, the N-400 sends back “OK”. 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. 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. When the command format is [Command][CR], the response format is [Response][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.

75

4

Page 84

Chapter 4

Multi-Drop Link Mode Control Procedure ■ Response error codes If an incorrect setup command is sent to the N-400, the N-400 sends back the cause of the error (error code). Error response: ERR** (** is the error code.)

Error code

4

76

Cause of error

00

Undefined command

01

The ID number exceeds the setting range.

02

The number included in the command does not correspond to anything.

05

The number included in the command is too long.

06

“hhh...” is too short.

07

“N” is any value other than “0” or “1”.

08

“n” exceeds the setting range.

09

“nnn” or “nn” exceeds the setting range.

10

“hhh...” is not specified as HEX codes (hexadecimal numbers).

11

Setting “hhh... = FF” is impossible.

12

“hhh...” exceeds the specified number of characters.

14

The data stored in the EEPROM may be corrupted. Initialize the settings.

15

The area storing the initial settings is incorrect.

Page 85

Chapter 4

Multi-Drop Link Mode Control Procedure

Description of setup commands ■ Saving settings/Initializing settings/Quitting SETUP mode Function

Command

Response

Description

Error code

Saving settings in the EEPROM

SAVE

OK

See p. 74.

00, 02, 05, 14

Initializing settings

DFLT

OK

Resets the current settings to the default values and saves them in the EEPROM.

00, 02, 05, 14, 15

Quitting SETUP mode

SEND

OK

See p. 74.

00, 02, 05, 14

Response Description

Error code

■ HOST MODE Function

Command

Mode

Change

WP00n

OK

Confirm

RP00

00n

Interference suppression Trigger

Change

WP06n

OK

Confirm

RP06

06n

ON time in interference suppression mode

Change

WP47nnn

OK

Confirm

RP47

47nnn

Read mode

Change

WP12n

OK

Confirm

RP12

12n

WP13n

OK

RP13

13n

Data transChange mission timing (Effective in signal label Confirm mode only) Read error code

Tips

Change

WP55hhh.. OK

Confirm

RP55

55hhh..

n = 0: Multi-drop link n = 1: Multi-head scan mode n = 0: Disable n = 1: Enable

00, 02, 05, 07, 14 nnn = 001 to 255 (Units: 10 ms)

00, 02, 05, 07, 09, 14 n = 0: Single n = 1: Multi-label 1 n = 2: Multi-label 2

00, 02, 05, 08, 14 n = 0: After read n = 1: At trigger

00, 02, 05, 07, 14

4 hhh... = Read error code 00, 02, (up to eight characters) 05, 10, * To set a read error code, 12, 14 use HEX (hexadecimal) codes. * hhh... = FF: Read error code is not set.

To set a read error code, use the following command format.

Example: To set the read error code to “BR” B R WP554252

* B = 42h, R = 52h

77

Page 86

Chapter 4

Multi-Drop Link Mode Control Procedure ■ TRIGGER INPUT SETUP (Effective in multi-head scan mode only) Function

Command

Trigger input signal type

Change

One-shot input time Trigger input time

OK

Confirm

RP05

05n

Change

WP42nnn

OK n = 0: Level n = 1: One-shot nnn = 001 to 255 (Units: 100 ms)

Confirm

RP42

42nnn

Change

WP04n

OK

RP04

04n

Change

WP03n

OK

Confirm

RP03

03n

Characters of trigger ON command

WP56hhh...

OK hhh... =

Change

Confirm

RP56

Characters of trigger OFF command

Change

WP57hhh.. OK n = 0: 2 ms n = 1: 10 ms

Error code 00, 02, 05, 07, 14 00, 02, 05, 07, 09, 14 00, 02, 05, 07, 14 n = 0: Normally open n = 1: Normally closed

Confirm

Tips

WP05n

Confirm

State of trigger input

4

Response Description

57hhh..

56hhh...

Trigger ON command (up to eight characters) * To set this command, use HEX (hexadecimal) codes. hhh... = Trigger OFF command (up to eight characters) * To set this command, use HEX (hexadecimal) codes.

00, 02, 05, 06, 11, 14

00, 02, 05, 06, 11, 14

To set the characters of the trigger ON/OFF commands, use the following command format:

Example: To change the trigger ON command to “[CR]” or “[STX]S[ETX]”. S WP5653

78

* S = 53h

Page 87

Chapter 4

Multi-Drop Link Mode Control Procedure

■ PROTOCOL SETUP Function

Command

Handshaking protocol 1

Change

WP07n

OK

Confirm

RP07

07n

*To set details of the protocol, use handshaking protocol 2.

Change

WP08n

OK n = 0: PASS/RTRY protocol

Confirm

RP08

08n n = 1: ACK/NAK protocol

Change

WP51hhh...

OK hhh... = Header (up to five characters) * To set a header, use HEX (hexadecimal) codes. * hhh... = FF: Header is not set. hhh... = Delimiter (up to five characters) * To set a delimiter, use HEX (hexadecimal) codes. * hhh... = FF: Delimiter is not set.

Handshaking protocol 2

Header

Delimiter

Adding checksum

Response Description

Confirm

RP51

51hhh...

Change

WP52hhh...

OK

Confirm

R39

39n

Change

WP39n

OK

Confirm

RP39

39n

Error code n = 0: No handshaking n = 1: Use protocol 00, 02, 05, 07, 14

00, 02, 05, 10, 12, 14

4 00, 02, 05, 07, 14 n = 0: Do not add n = 1: Add

79

Page 88

Chapter 4

Multi-Drop Link Mode Control Procedure ■ PROTOCOL SETUP (only when PLC link is used) Function

Command

PLC link model

Change

Response Description WP36n

OK n = 0: PLC link disabled n = 1: SYSNAC-C n = 2: MELSEC-A

Confirm

RP36

36n

Error code n = 3: KV

00, 02, 05, 08, 14 n = 4: MELSEC-A (File register is used.) Change Confirm

RP37

37n

DM head address

Change

WP40nn

OK

Confirm

RP40

40nn

Change

WP43nn

OK

Confirm

RP43

43nn

Change

WP41nnn

OK

Confirm

RP41

41nnn

PLC / station number

4 File register block number

80

OK

Trigger input through PLC link

WP37n n = 0: Disable n = 1: Enable

00, 02, 05, 07, 14 nn = 00 to 99 (0000 to 9900) nn = 00 to 31 nnn = 000 to 255

00, 02, 05, 07, 09, 14

Page 89

Chapter 4

Multi-Drop Link Mode Control Procedure

■ ID SETUP Function

Command

Response

Description

Registering ID number (for each unit)

Change WIDmmn

OK mm = 01 to 31 (ID 3 number)

Confirm RIDmm mmn n = 0: Do not register n = 1: Register

Change

Confirm

RWIDMAXmm MAXmm

* If “mm” is “99” in the response, serial ID numbers are not registered.

Registering all serial numbers

Change

WIDAnnn...n OK n = 0: Do not register n = 1: Register

Confirm

RIDA

Annn...n

00, 01, 02, 05, 07, 14 mm = 01 to 31 (ID 4 number)

Registering serial numbers (Register all ID numbers more than the specified number.)

WIDMAXmm OK

Error code

* “n” corresponds to ID numbers (1 to 31) in ascending order.

00, 01, 02, 05, 14

00, 02, 05, 07, 14

■ RS-232C SETUP Function

Command

Response Description

Baud rate

Change

OK

WP35n n = 5: 38400 bps n = 6: 31250 bps n = 7: 19200 bps n = 0: 9600 bps

Confirm

RP35

35n

Error code 00, 02, 05, 08, 14 n = 1: 4800 bps n = 2: 2400 bps n = 3: 1200 bps n = 4: 600 bps

Data length

Parity

Parity type

Stop bit length

RTS/CTS control

Change

WP30n

OK

Confirm

RP30

30n

Change

WP31n

OK n = 0: None n = 0: 7 bits n = 1: 8 bits

Confirm

RP31

31n n = 1: Set parity * To set the parity type, use the "Parity type" command.

Change

WP32n

OK n = 0: Even

Confirm

RP32

32n

Change

WP33n

OK

Confirm

RP33

33n

Change

WP22n

OK

Confirm

RP322

22n n = 1: Odd

00, 02, 05, 07, 14 n = 0: 1 bit n = 1: 2 bits n = 0: Disable n = 1: Enable

81

4

Page 90

Chapter 4

Multi-Drop Link Mode Control Procedure ■ RS-485 SETUP Function

Command

Response Description

Baud rate

Change

OK

WP75n

Error code n = 5: 38400 bps n = 6: 31250 bps n = 7: 19200 bps n = 0: 9600 bps

Confirm

RP75

75n n = 1: 4800 bps

00, 02, 05, 08, 14 n = 2: 2400 bps n = 3: 1200 bps n = 4: 600 bps Data length

Parity

4

Parity type

Stop bit length

82

Change

WP70n

OK

Confirm

RP70

70n

Change

WP71n

OK n = 0: None n = 1: Set parity * To set the parity type, use the "Parity type" command.

Confirm

RP71

71n

Change

WP72n

OK

Confirm

RP72

72n

Change

WP73n

OK

Confirm

RP73

73n n = 0: 7 bits n = 1: 8 bits n = 0: Even n = 1: Odd n = 0: 1 bit n = 1: 2 bits

00, 02, 05, 07, 14