This document describes the Modbus function codes and register addresses used for communication between different devices. It shows that devices use Modbus function codes 03, 06, 16 to read/write holding registers; 04 to read input registers; 02, 05, 15 to read/write coils; and 01 to read discrete inputs. The document also notes that write commands can use either function code 06 for single words or 16 for multiple words, and the system will automatically select the appropriate code based on the required word length.
This document describes the Modbus function codes and register addresses used for communication between different devices. It shows that devices use Modbus function codes 03, 06, 16 to read/write holding registers; 04 to read input registers; 02, 05, 15 to read/write coils; and 01 to read discrete inputs. The document also notes that write commands can use either function code 06 for single words or 16 for multiple words, and the system will automatically select the appropriate code based on the required word length.
This document describes the Modbus function codes and register addresses used for communication between different devices. It shows that devices use Modbus function codes 03, 06, 16 to read/write holding registers; 04 to read input registers; 02, 05, 15 to read/write coils; and 01 to read discrete inputs. The document also notes that write commands can use either function code 06 for single words or 16 for multiple words, and the system will automatically select the appropriate code based on the required word length.
Hex Address nW *3 W40001 RW-0000 W40001 W40001 | | | | Holding W50000 RW-270F W50000 W50000 Register RW-2710 | RW-FFFF Modbus 03, Function 03, 06, 16 *4 03, 06, 16 *4 03, 16 *5 06 *1 *6, Code 16 *2 *6 W30001 R-0000 W30001 W30001 | | | | Input W40000 R-270F W40000 W40000 Register R-2710 | R-FFFF Modbus Function 04 04 04 04 Code B00001 RWB-0000 B00001 B00001 | | | | Discrete B10000 RWB-270F B10000 B10000 Output RWB-2710 (Coil) | RWB-FFFF Modbus Function 02, 05, 15 02, 05, 15 02, 05, 15 02, 05, 15 Code B10001 RB-0000 B10001 B10001 | | | | Discrete B10000 RB-270F B10000 B10000 Input RB-2710 | RB-FFFF Modbus Function 01 01 01 01 Code *1 If the written value is only one word, modbus function code 06 is used. *2 If the written value is more than one word (ex. a double word), modbus function code 16 is used. *3 I. The value of devices with consecutive address are read by one modbus command. II. The "Optimize" option of communication should be enabled. *4 You could select whether to stick write command to 0x06 (one word per command), 0x10 (code 16) (multiple words per command), or auto to let system decide by the required word length. The default is “auto”. *5 The write command uses 0x10 (code 16). *6 The write command uses auto (system selected by required length)