Reading – KEYENCE DL-RS1A User Manual
Page 10
8
Commands and Responses
Error response
If DL-RS1A could not receive a command from the external device or if the received command
included an error, it automatically returns an "error response" based on ASCII codes.
For information on the parameters used in the error response, refer to page 10.
Sample error response structure
(1) Contains "ER".
(2) Contains the same communication command as the received command.
(3) Contains a two-digit error number (ASCII characters) indicating the error type.
For information on the error numbers, refer to "Error numbers" (page 16).
(4) Contains CR + LF as the error response delimiter.
An error response indicating an "ID number error" as a response to the command
"SR,01,136CRLF":
DL-RS1A sends the error response to the external device.
E
(1)
(2)
(3)
R
,
,
Error No.
S
R
(4)
CR LF
Example
E
(45H) (52H)
(2CH)
(2CH) (53H) (52H)
R
S R
(36H) (35H)
6 5
,
,
Error response :
ID No. error
E
(45H)
,
(2CH)
R
(52H)
S
(53H)
R
(52H)
6
(36H)
,
(2CH)
5
(35H)
CR
(0DH)
LF
(0AH)
ASCII character conversion :
4552
H
→
Value to store
in data memory
2C53
H
→
522C
H
→
3635
H
→
0D0A
H
→
bit
15
bit
0
(0DH) (0AH)
CR LF
Commands and Responses
Reading
External devices such as PLC's use the following communication commands to read data from
DL-RS1A.
Read from the specified sensor amplifier (SR command)
Command
Response
Error response
Read all data from all sensor amplifiers (M0 command)
Command
Response
Error response
Read output states and data from all sensor amplifiers (MS command)
Command
Response
Error response
S
R
CR LF
ID No.
Data No.
,
,
S
R
Data*
1
ID No.
Data No.
,
,
,
CR LF
E
R
,
S
R
Error No.
,
CR LF
M
0
CR LF
M
0
CR LF
Data of the sensor
amplifier with ID:00*
2
,
Data of the sensor
amplifier with ID:01*
2
……
,
Data of the sensor amplifier
with the last ID No.*
2
,
,
E
R
CR LF
,
M
0
,
Error No.
M
S
CR LF
M
S
Control
output*
3
Control
output*
3
Control
output*
3
CR LF
Data of the sensor
amplifier with ID:00*
2
,
,
,
,
Data of the sensor
amplifier with ID:01*
2
…
Data of the sensor
amplifier with the last ID No.*
2
,
,
Sensor amplifier with ID:00
Sensor amplifier with ID:01
Sensor amplifier with the last ID No.
E
R
CR LF
,
M
S
,
Error No.