I’ve got a Wago Modbus coupler with one module with 4 INs and one with 4 OUTs.
When I connect to the coupler using a selfmade LabVIEW program, everything works as expected:
FC2 with start 0 & length 4 bits reads the 4 INs
FC5 with address 0…4 sets one of the 4 OUTs
FC2 or FC1 with start 512 & length 4 bits reads the state of the 4 OUTs (according to the manual, offset 0x200)
With Openhab I can read inputs and write outputs, this already works. But I dont know how to read back the state of the outputs correctly. I don’t understand the principle:
modbus.cfg tells the modbus binding, where to read (“query”) input bits. So I could read discretes with start=0/length=4 and read the state of my coils with start=512/length=4, but the coils have to be written beginning from 0.
syntax, but how do I tell, that the binding should write to 0 and read from 512? slave2:<512:>0 does not work. And configuring start=0 and length=515 does not work because there’s nothing between 4 and 511 and these values are invalid…
And how do I explicitely force a FC5 call to write the coils at 0…3
but unfortunately this implies only being able to write outputs starting from 0.
I’m using a OpenhabianPI installed a week ago with “binding-modbus1 - 1.9.0”, this version should be the latest one…
Don’t assume, FIND OUT what binding version you have. I doubt you have the experimental 1.10 version that is needed for this. Re-read the post linked to.
Why does your slave2out config start at 1? You wanted 0 earlier on.