Help with PLC Modbus Schneider M221 adressing

Current situation:

The Schneider M221 PLC (see config attached) controls my lights. I’ve switches on the inputs of the PLC. Some of the outputs direct activates my lights and some outputs control some 5V relays.
I’ve had help programming the PLC, so my knowledge about PLC and Modbus is very poor.

OH 2.2 is running on an micro PC with Win10.

Also i’ve some z-wave devices up and running (dimmers and multi-sensor)

Problem:

I want to keep using my plc to control the lighting in case OH stops running.
OH has to control the outputs of the PLC and also use the inputs.
The ouput of the plc can be triggered by a switch or an sensor (Rules)
Actions on OH can be triggered by input of the PLC (switch) (all active lights off)
I like to combine the functionality of both OH and PLC

Questions:

I’m using the binding of Sami Salonen and tried to program via PaperUI.
How can I adress my coils and inputs using the binding

Schneider M221.pdf (908.6 KB)

Somebody any experience!

Recommend starting from the docs for the binding version 2: https://github.com/ssalonen/openhab2-addons/blob/modbus-openhab2-native-binding/addons/binding/org.openhab.binding.modbus/README.md

There are several examples to read coils and input registers, for example.

If you are new to basic modbus concepts, I suggest you refer to Background material section in the docs.

Don’t know how to help, I am not familiar with your PLC…

Best,
Sami