Write Variable Area Command - Omron K7DD User Manual

Power line data generator
Hide thumbs Also See for K7DD:
Table of Contents

Advertisement

Examples of Sending and Receiving Data
In these examples, measurement values are read from the slave with unit number 1.
The variable address for CH1 R.M.S. voltage is H'1010.
 Command Frame:
Slave
Function
address
code
H'01
H'03
 Response Frame:
Slave
Function
address
code
H'01
H'03
7-6-3

Write Variable Area Command

 Command Frame:
Slave
Function
address
code
H'10
1
1
Slave address
Function code
Write start
address
Number of
elements
Byte count
CRC-16
 Response Frame:
Slave
Function
address
code
H'10
1
1
Slave address
Function code
Data
Error code
CRC-16
Power Line Data Generator User's Manual (N233)
Read start address
Number of elements
H'1010
H'0001
Byte
Read data (for number of elements)
count
H'02
Write start address
Number of elements
2
2
CRC-16 calculation range
A number used to identify a destination device. Specify the unit number of the K7DD.
The unit number can be set between H'01 to H'63 hexadecimal (01 to 99 decimal).
The Write Variable Area Command's function code is H'10.
Specify the address of the variable area to start writing in 2-byte hexadecimal.
Refer to
7-4 Changing Setting Parameters (Write Variable Area) (P.7-6).
Specify the number of variables to write. You can specify up to 123 variables (H'007B).
Specify the number of bytes of data to write in hexadecimal format.
This check code is calculated with the data from the slave address to the end of the data.
Write start address
Number of elements
2
2
CRC-16 calculation range
The number specified in the command frame is entered as-is.
This is a received function code. H'80 is added if an error occurs.
Contains the number of bytes of read data. The byte count is a hexadecimal.
Contains the read data value.
This check code is calculated with the data from the slave address to the end of the data.
CRC-16
H'810F
CRC-16
Byte
count
Write data (for number of elements)
1
CRC-16
2 bytes
7 Communications
CRC-16
2 bytes
7 - 13
7

Advertisement

Table of Contents
loading

Table of Contents