bevins
I cannot find this info anywhere. 

I have a Raspberry Pi4 running openplc. I have this up and running. I have two slave mega2560 boards.

When I am doing the ladder logic in openplc editor, hjow am I addressing the slaves? I guess the %IX100.0 would be the pi, but how do I address the mega2560's?

Is there docs on this somewhere becasue I cannot find it.

Thanks in advance,

Bob
Quote 0 0
thiagoralves
Check the table on the slave devices tab of the runtime. This table lists all your slave devices and where they are mapped to. Your Pi GPIO is always attached to the beginning of the address range (%IX0.0, %IX0.1...) as you can see from the picture here:  https://www.openplcproject.com/getting-started-rpi
Quote 0 0
bevins
Right.... Thank you, I knew there was an easy answer.

Magnificent job on this. Amazing stuff you did.
Quote 0 0
bevins
One other question. Can I change the .ino files of the the mega2560 to remove analog inputs to use digital inputs and change the outputs also?
OR is that hard coded?
Quote 0 0
bevins
Bascially I want to max out the DIN and DOUT and remove all AIN and AOUT.
Quote 0 0
thiagoralves
You can change the mappings on the .ino firmware, but then you won’t be able to use the device selection “Arduino Mega” on the slave devices configuration because that’s programmed to map exactly what is in the original .ino firmware. You will have to create a custom Modbus RTU device and map the registers accordingly to your changes on the .ino
Quote 0 0