IDEC KW2D Series User Manual page 45

Smart rfid reader
Hide thumbs Also See for KW2D Series:
Table of Contents

Advertisement

Read the value of the holding register or input register
The host device (ModbusTCP client) reads the value of the holding register or input register of the KW2D Smart RFID
Reader (ModbusTCP Server). The number of continuous read words is 1 to 32 words. The function code is "03h" for
the holding register and "04h" for the input register. In case of error, the function code is "83h" (03h + 80h) for the
holding register and "84h" (04h + 80h) for the input register.
Example: Read data for 32 words from input register 0001
Request
Function code Start address number Number of words of data to read
04h
(1 byte)
The value of the input register 0001 is "1234h", the value of the input register 0002 is "2345h", ...,
the value of the input register 0032 is "5678h".
ACK Reply
Function code
Number of data
04h
(1 byte)
(1 byte)
Example: Try to access the input register of a slave address outside the range
NAK Reply
Function code
Error code
84h
02h
(1 byte)
(1 byte)
For details on the error code, refer to "Error code" on page 4-5.
Write the value to the coil relay.
The host device (ModbusTCP client) can write to the coil relay of the KW2D Smart RFID Reader (ModbusTCP Server).
When writing a value to one address number, the function code is "05h". When 0 is written, the value to write will be
"0000h", and when 1 is written, it will be "FF00h". When writing values to multiple consecutive address numbers, the
function code is "0Fh". The value to write is stored in order from the lower bit of the first byte. The function code for
error is "85h" (05h+80h) in the case of writing to one address number, and "8Fh" (0Fh+80h) in the case of writing to
multiple address numbers.
Example: Write 1 to coil relay 0001
Request
Function code Start address number
05h
(1 byte)
ACK Reply
Function code
Start address number
05h
(1 byte)
Example: Try to access one coil relay with a slave address outside the range.
NAK Reply
Function code
Error code
85h
02h
(1 byte)
(1 byte)
For details on the error code, refer to "Error code" on page 4-5.
00h
00h
00h
20h
(2 bytes)
(2 bytes)
40h
12h
34h
23h
(1st byte) (2nd byte) (3rd byte) (4th byte)
Value to write
00h
00h
FFh
00h
(2 bytes)
(2 bytes)
Written value
00h
00h
FFh
00h
(2 bytes)
(2 bytes)
KW2D Series Smart RFID Reader User's Manual
1 ModbusTCP Communication (Server)
Read value
45h
...
56h
(63th byte) ( 64th byte)
...
78h
4-3
4

Advertisement

Table of Contents
loading

This manual is also suitable for:

Kw2d-r100q4eKw2d-rh100q4e

Table of Contents