favalex / modbus-cli

Command line tool to access Modbus devices
Mozilla Public License 2.0
175 stars 33 forks source link

Use function `0x6` for single register writes #6

Closed RJ closed 3 years ago

RJ commented 4 years ago

I wanted to use modbus-cli to talk to an air conditioner type system with an Enecon control board, but it doesn't support function 16 to write multiple registers. So this change makes modbus-cli use function 6 if only one register write is requested. Any attempt to write multiple registers still uses the multiple write call (16).

favalex commented 3 years ago

Thanks! Merged.