154
CFW-08 OPTIONS AND ACCESSORIES
8.20.3.3 Function 05 - Write
Single Coil
This function is used to write a value to a single bit. The bit value 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 values are 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)
Slave address
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)
Slave address
Function
Byte Count Field
Data 1 (high)
Data 1 (low)
Data 2 (high)
Data 2 (low)
etc...
CRC-
CRC+
Query (Master)
Field Value
Slave address 01h
Function 03h
Initial register (byte high) 00h
Initial register (byte low) 02h
Number of registers (byte high) 00h
Number of registers (byte low) 02h
CRC- 65h
CRC+ CBh
Response (Slave)
Field Value
Slave address 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 e low). For the example,
we have P002 = 09C4h, that in decimal number is equal to 2500.
As this parameter have a 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)
Slave address
Function
Bit address (byte high)
Bit address (byte low)
Bit value (byte high)
Bit value (byte low)
CRC-
CRC+
Response (Slave)
Slave address
Function
Bit address (byte high)
Bit address (byte low)
Bit value (byte high)
Bit value (byte low)
CRC-
CRC+