Custom Command

Forum Home Forums Communicating with Devices Modbus Custom Command

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #17245
    123
    Participant

    Hello, regarding the send commands in Modbus, point 1 described below is originally built-in. Can points 2 and 3 be achieved using custom function codes? How can they be implemented?

    1.The original data block is Holding Registers (4x), the read function code is 0x03, and the write command function code is 0x06.

    2.Modify it so that the data block remains Holding Registers (4x), the read function code is 0x03, and the write command uses a custom function code of 0x07.

    3.Change the data block to Input Registers (3x), the read function code to 0x04, and the write command to a custom function code of 0x06.

    #17251
    Mikhail
    Moderator

    Hello,

    2. In the Modbus template, add a new command, set the Data block to Custom, the function code to 7.

    3. According to the Modbus specification, Input Registers are read-only. So it’s not possible to write them. You can try creating a separate command with the 0x06 code.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.