Writing, Parameters of commands and responses – KEYENCE DL-RS1A/GT-70A User Manual

Page 12

Advertising
background image

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.

Data that can be read with communication commands "M0", "MS", and DRQ input

For information on the data and the calculation function, refer to the manual supplied with
the sensor amplifiers.

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 07 = 07

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 data that DL-RS1A periodically retrieves from all sensor amplifiers.

MS

Reads the control output state and data that DL-RS1A periodically retrieves

from all sensor amplifiers.

DRQ input

Reads all of the control output state and data 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 into the sensor amplifier with

the specified ID number.

AW

Writes setting data for the specified data number into all sensor amplifiers.

Type of amplifier

Calculation

function OFF

Calculation function ON

Other displays

Reference

difference display

Main unit

P.V. values

(comparator values)

R.V. values

(raw values)

R.V. values

(raw values)

Expansion unit

P.V. values

(comparator values)

R.V. values

(raw values)

P.V. values

(comparator values)

Point

Advertising