Skip to content

Use Function Code 0x06 for Single Holding Register Write #75

@h95332

Description

@h95332

When writing to Holding Registers, I noticed that even when only a single register is written, the implementation still uses function code 0x10 (Write Multiple Registers).

According to the Modbus protocol, writing to a single Holding Register should typically use function code 0x06 (Write Single Register).

Would it be possible to modify or provide an option so that:

When only one register is being written, function code 0x06 is used instead of 0x10?

This could improve compatibility with devices that strictly expect 0x06 for single register writes.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions