Navigation

    IO Ninja IO Ninja Forum
    • Register
    • Login
        No matches found
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. IO_Ninja_Marco
    I

    IO_Ninja_Marco

    @IO_Ninja_Marco

    0
    Reputation
    2
    Posts
    1
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    IO_Ninja_Marco Follow

    Best posts made by IO_Ninja_Marco

    This user hasn't posted anything yet.

    Latest posts made by IO_Ninja_Marco

    RE: MODBUS write multiple register script

    @vladimir Thanks so much!

    posted in Support & Troubleshooting •
    MODBUS write multiple register script

    Hello,

    How can I write a script for MODBUS to write on multiple register?
    Similar to the packet below, but in a scrip.
    Screenshot 2025-01-07 171555.png
    I have a script for single register but I can't find the field "value" for multiple registers.

    Code for single register:

    ModbusRtuWritePacket packetWS;
    packetWS.initialize();
    packetWS.m_adu.m_deviceAddress = addr;
    packetWS.m_pdu.m_func = io.ModbusFunc.WriteSingleRegister;
    packetWS.m_pdu.m_address = 0x1006;
    packetWS.m_pdu.m_value = 0x5501;
    packetWS.updateChecksum();
    // Transmit the packet
    transmit(&packetWS, sizeof(packetWS));

    Thanks for your help.

    posted in Support & Troubleshooting •