Simple ModBus Master function 15
i found it
it is the
temp = register_array[packet-&gt;local_start_address + i]; // get the data
in the ccp file
register_array[packet-&gt;local_start_address + i]
its pointing to the wrong location... register_array??
supersized no one has noticed this as long as the simple modbus master for adruino
has been used ?
or i have a bad CPP file ?
i have temp corrected this by replacing with
unsigned char construct_F15()
{
    // function 15 coil information is packed LSB first until the first 8 bits are completed
    unsigned char frameSize = 10;
    unsigned char temp;
    frame[6] = 1;
    frame[7] = packet-&gt;local_start_address ^ 0XFFFF; 
    return frameSize;
}

works (0 = off / 255 = on)
modbus_construct(&amp;packets[PACKET1], 1, 15, 1, 8, 0); // 1 thru 8 = off
modbus_construct(&amp;packets[PACKET2], 1, 15, 1, 8, 255); // 1 thru 8 = on