ntmarco
Hello, I use a Controllino, it's a industrial version of arduino uno. It works fine with your script for arduino slave. But if I well understood digital inputs and outputs as well as analogue inputs and outputs are fixed in number in the slave script. Is there a way to change this distribution, more digital less analogue or switch between inputs and outputs?
On the mini, with no Modbus interface, I have 6 analogue inputs where 4 can be configered as digital and 2 only digital outputs. On the other side I have 8 digital outputs where 3 can be configured in arduino IDE as analogue outputs to be used for PWM.
Reply 0 0
thiagoralves
Yes you can. All you have to do is change the pin definitions at the top of the sketch (script). The only catch is that you need to keep the same number of inputs and outputs (both analog and digital), otherwise the default Arduino “template” on OpenPLC slaves settings won’t work.

If you want to create a custom sized IO, you will have to modify the Arduino sketch slightly to include more Modbus coils/registers etc and you will also have to use a Generic Modbus RTU template on the slave devices settings adding the IO numbers manually yourself
Reply 1 0
Reply