beautypg.com

Reading – KEYENCE DL-RS1A User Manual

Page 11

background image

9

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

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

(4) Contains CR + LF as the error response delimiter.

An error response indicating an "ID number error" as a response to the command
"SR,06,101CRLF":

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

* The data length is different depending on the data being read. (Up to 10 characters)

„ Read all data from all sensor amplifiers (M0 command)

Command

Response

Error response

S

R

CR LF

ID No.

Data No.

,

,

S

R

Data*

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

,

Data of the sensor
amplifier with ID:01

……

,

Data of the sensor amplifier
with the last ID No.

,

,

E

R

CR LF

,

M

0

,

Error No.