Writing, Parameters of commands and responses – KEYENCE DL-RS1A/IG User Manual
Page 12
10
Commands and Responses
Writing
External devices such as PLC's use the following communication commands to write data to
DL-RS1A.
Attempting to write data with "read-only" attribute results in a communication error and an
error response (error number: 22).
■
Write to the specified sensor amplifier (SW command)
Command
Response
Error response
* The data length is different depending on the data being written.
■
Write to all sensor amplifiers (AW command)
Command
Response
Error response
* The data length is different depending on the data being written.
Point
S
W
CR LF
ID No.
Data No.
,
,
Setting data*
,
S
W
CR LF
ID No.
Data No.
,
,
E
R
CR LF
,
S
W
,
Error No.
A
W
CR LF
Data No.
,
Setting data*
,
A
W
CR LF
Data No.
,
E
R
CR LF
,
A
W
,
Error No.
Parameters of Commands and Responses
This section describes the parameters used with various commands and responses.
■
Communication commands
There are two types of communication commands: read commands and write commands.
• For information on the data, refer to the instruction manual or user's manual supplied with
the sensor amplifiers.
• If commands are sent during the period of approx. 3 seconds after the power is turned on,
the communication error (error number: 22) will occur.
■
ID numbers
This parameter is used with communication commands "SR" and "SW". Specify the ID number of the
target sensor amplifier using two digits (ASCII characters).
(Example) Sensor amplifier with the ID number 00 = 00, sensor amplifier with the ID number 03 = 03
Communication
command
Attribute
Description
SR
Read
Reads the data for the specified data number from the sensor amplifier with the
specified ID number.
M0
Reads the comparator value (P.V. value) that DL-RS1A periodically retrieves
from all sensor amplifiers.
MS
Reads the ON/OFF state of the judgment output and edge check output, and
the comparator value (P.V. value) that DL-RS1A periodically retrieves from all
sensor amplifiers.
DRQ input
Reads the ON/OFF state of the judgment output and edge check output, and
the comparator value (P.V. value) that DL-RS1A periodically retrieves from all
sensor amplifiers when a DRQ input is received.
SW
Write
Writes setting data for the specified data number onto the sensor amplifier with
the specified ID number.
AW
Writes setting data for the specified data number onto all sensor amplifiers.
Point