4 n-400 direct control commands, 1 communication procedure – KEYENCE N-400 User Manual
Page 77

69
Chapter 4 Multi-Drop Link Mode Control Procedure
4
4.4
N-400 Direct Control Commands
You can perform the following controls by sending a command to the N-400.
1) Assigning an ID number to the BL series for which auto polling is performed.
2) Setting auto polling mode to ON/OFF
3) Checking if the BL series is properly connected
4) Reading control command in multi-head scan mode
5) Resetting the N-400
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.)
4.4.1 Communication procedure
■
Sequence and format for communication
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.
Note: If an incorrect command is sent, the N-400 sends back no response.
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].
*
[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.
(For a description of the commands, see the following pages.)
N-400
POLE00 CR
OK
CR
• • •
Auto
polling
ON
Command
Response
Command CR
Response CR
STX Command ETX
STX Response ETX