155
CFW-08 OPTIONS AND ACCESSORIES
8.20.3.5 Function 15 - Write
Multiple Coils
This function allows writing values for a bit group that must be in numerical
sequence. This function can be also used to write a single bit (the values
are always hexadecimal, and each field represents one byte).
Example: to drive a ramp enable command (bit 100 = 1) of a CFW-08
at the address 1:
Query (Master)
Field Value
Slave address 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
Slave address 01h
Function 05h
Bit number (high) 00h
Bit number (low) 64h
Bit value (high) FFh
Bit value (low) 00h
CRC- CDh
CRC+ E5h
8.20.3.4 Function 06 - Write
Single Register
This function is used to write a value to a single register. This function has
following structure (values are always hexadecimal values, and each field
represents one byte):
For this function, the slave response is an identical copy of the query sent
by the master.
Query (Master)
Slave address
Function
Register address (byte high)
Register address (byte low)
Value for the register (byte high)
Value for the register (byte low)
CRC-
CRC+
Response (Slave)
Slave address
Function
Register address (byte high)
Register address (byte low)
Value for the register (byte high)
Value for the register (byte low)
CRC-
CRC+
Example: write of the speed reference (basic variable 4) equal to 30.00 hz of
a CFW-08 at address 1.
Query (Master)
Field Value
Slave address 01h
Function 06h
Register (high) 13h
Register (low) 8Ch
Value (high) 0Bh
Value (low) B8h
CRC- 4Bh
CRC+ E7h
Response (Slave)
Field Value
Slave address 01h
Function 06h
Register (high) 13h
Register (low) 8Ch
Value (high) 0Bh
Value (low) B8h
CRC- 4Bh
CRC+ E7h
For this function, the slave response will be again a copy identical to the
request made by the master. As already informed above, the basic variables
are addressed from 5000, thus the basic variable 4 will be addressed at
5004 (138Ch). The value for this variable is 30.00 hz, that is represented
by 3000 (0BB8h).