carlz0r
I would like to use a mega with more coils and less digital inputs than are set up by default. I noticed that for the Arduino slaves one is not able to change the size of the registers. I instead tried setting it up as a generic MODBUS RTU device and it works about 95% correctly, however a couple of the output coils do not activate, and one of them for some reason now activates two coils. I have confirmed that it's not a hardware problem (multiple Megas were tried) and I have tested with a blank program using ScadaBR to toggle the coils individually.

Just wondering where I would look in the code if I wanted to modify the default Arduino parameters to match my configuration?
Quote 0 0
thiagoralves
You also need to modify the firmware that goes in the Arduino, otherwise it won't work properly. That's why you can't change the settings when you select "Arduino" from the list, as those settings match the firmware that is available for them.
Quote 0 0
carlz0r
I should have clarified, I did modify the Arduino firmware to decrease the input bits and increase the output bits (both in the pinmasks and the defines) however a couple of coils did not work at all, and one of the coils, when activated, caused a second coil to be activated at the same time. 

For now I am going to use the analog outs by moving 255 or 0 into the registers to turn them off and on but it would be nice to keep all the coils as boolean operations.
Quote 0 0