Function 01 - Read Coils; Function 03 - Read Holding Register - WEG CFW-09 User Manual

Frequency inverter
Hide thumbs Also See for CFW-09:
Table of Contents

Advertisement

8.14.3.1
Function 01 -
Read Coils
8.14.3.2
Function 03 - Read
Holding Register
It reads the content of an internal group of bits that must compulsorily in
a numerical sequence. This function has the following structure for the
read and response messages (the values are always hexadecimal, and
each filed represents one byte):
Query (Master)
Slave address
Function
Initial bit address (byte high)
Initial bit address (byte low)
Number of bits (byte high)
Number of bits (byte low)
CRC-
CRC+
-
Each response bit is placed at a position of the data bytes sent by the
slave. The first byte, from the bits 0 to 7, receives the first 8 bits from the
initial address indicated by the master. The other bytes (if the number of
the read bits is higher than 8) remain in the same sequence. If the number
of the read bits is not a multiple of 8, the remaining bits of the last byte
should be filled out with 0 (zero).
Example: reading of the status bits for general enable (bit 1) and
direction of rotation (bit 2) of then CFW-09 at the address 1:
Query (Master)
Field
Slave address
Function
Initial bit address (byte high)
Initial bit address (byte low)
Number of bits (byte high)
Number of bits (byte low)
CRC-
CRC+
As the number of read bits in the example is smaller than 8, the slave
required only 1 byte for the response. The value of the byte was 02h, that
as binary value will have the form 0000 0010. As the number of read bits is
equal to 2, only the two less significant bits, that have the value 0 = general
disable and 1 = direction of rotation, are of interest. The other bits, as
they did not be requested, are filled out with 0 (zero).
It reads the content of a group of registers that must be compulsorily in a
numerical sequence. This function has following structure for the read
and response messages (the values are always hexadecimal values, and
each field represents one byte):
CHAPTER 8 - CFW-09 OPTIONS AND ACCESSORIES
Response (Slave)
Byte Count Field (number of data bytes)
Response (Slave)
Value
Field
01h
Slave address
01h
Function
00h
Byte Count
01h
Status of the bits 1 and 2
00h
CRC-
02h
CRC+
ECh
-
0Bh
-
Slave address
Function
Byte 1
Byte 2
Byte 3
etc to
CRC-
CRC+
Value
01h
01h
01h
02h
D0h
49h
-
-
321

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents