I'm using the Libmodbus library, with a Swift wrapper on an iOS device. I can read coils and registers no problem, but nothing happening when I try to write a single coil. The response comes back as a success, but nothing seems to be happening.
As far as I can see it's sending 5 as a function number and 0 as the coil number.
Anyone else have any experience of this sort with a Modicon M221 PLC and could help me out here?