When encoding a ReadCoils response, the coils are returned incorrectly. From the modbus specification:
The LSB of the first data byte contains the output addressed
in the query. The other coils follow toward the high order end of this byte, and from low order
to high order in subsequent bytes.
This means that when reading coils 1 .. 32 (Starting Address=0, Quantity of Coils=32), 4 octets will be returned with coils 0..7 in octet 1, 8..15 in octet 2, etc. In addition, coil 0 will be in bit 0 of octet 1 (the least significant bit of the octet).
When we performed this with coils 17, 18, 19 set to 1 and all others to 0, the simulator returned "00 00 00 e0" instead of "00 00 07 00".
A screen capture is attached showing this.
Carl,
Try checking the "Clone" box at the top right of the form.
Now the bits will show a reversed ordering in the top line.
It seems that many things are reversed unless this box is checked.
With this checked then I suspect that your information will be correct.