User`s guide

197
CHAPTER 8 - CFW-08 OPTIONS AND ACCESSORIES
8.25.3.3
Function 05 -
Write Single Coil
This function is used to writea valueto a singlebit. The bitvalue
is represented by using two bytes, where FF00h represents
the bit that is equal to 1, and 0000h represents the bit that is
equal to 0 (zero). It has the following structure (the valuesare
always hexadecimal, and each field represents one byte):
Example: read of the value proportional to the frequency
value (P002) and motor current (P003) of the CFW-08 at
address 1:
Query (Master)
Field
Value
Slaveaddress
01h
Function
03h
Initial register (byte high)
00h
Initial register (byte low)
02h
Numberofregisters(bytehigh)
00h
Number of registers (byte low)
02h
CRC-
65h
CRC+
CBh
Response (Slave)
Field
Value
Slaveaddress
01h
Function
03h
Byte Count
04h
P002 (high)
09h
P002 (low)
C4h
P003 (high)
02h
P003 (low)
8Ah
CRC-
38h
CRC+
95h
Each register is always formed by two bytes (high and low).
For the example, we have P002 = 09C4h, that in decimal
number is equal to 2500.
As this parameter have a two decimal place indication, the
real read value is 25.00 Hz. In the same way we will have a
current value P003 = 028Ah, that is equal to a 650 decimal.
As the current has two decimal resolution, the read value is
6.50 A.
Query (Master)
Slaveaddress
Function
Bit address (byte high)
Bit address (byte low)
Bit value (byte high)
Bit value (byte low)
CRC-
CRC+
Response (Slave)
Slaveaddress
Function
Bit address (byte high)
Bit address (byte low)
Bit value (byte high)
Bit value (byte low)
CRC-
CRC+
Example: to drive a ramp enable command (bit 100 = 1) of
a CFW-08 at the address 1:
Query (Master)
Field
Value
Slaveaddress
01h
Function
05h
Bit number (high)
00h
Bit number (low)
64h
Bit value (high)
FFh
Bit value (low)
00h
CRC-
CDh
CRC+
E5h
Response (Slave)
Field
Value
Slaveaddress
01h
Function
05h
Bit number (high)
00h
Bit number (low)
64h
Bit value (high)
FFh
Bit value (low)
00h
CRC-
CDh
CRC+
E5h
Table 8.20 -
Message example using function 03
Table 8.21
- Function 05 structure
Table 8.22
- Message example using function 05