User`s guide
196
CHAPTER 8 - CFW-08 OPTIONS AND ACCESSORIES
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 bythe 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 the CFW-08 at the
address 1:
Query (Master)
Field
Value
Slaveaddress
01h
Function
01h
Initial bit address (byte high)
00h
Initial bit address (byte low)
01h
Number of bits (byte high)
00h
Number of bits (byte low)
02h
CRC-
ECh
CRC+
0Bh
Response (Slave)
Field
Value
Slaveaddress
01h
Function
01h
Byte Count
01h
Status of the bits 1 and 2
02h
CRC-
D0h
CRC+
49h
8.25.3.2
Function 03 -
Read Holding
Register
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
valuesarealways hexadecimal, andeach fieldrepresents one
byte):
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 binaryvalue 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).
Query (Master)
Slaveaddress
Function
Initial register address (byte high)
Initial register address (byte low)
Number of registers (byte high)
Number of registers (byte low)
CRC-
CRC+
Response (Slave)
Slaveaddress
Function
Byte Count Field
Data 1 (high)
Data 1 (low)
Data 2 (high)
Data 2 (low)
etc to
CRC-
CRC+
Table 8.18
- Message example using function 01
Table 8.19
- Function 03 structure










