MudBus modbusTCP

So I am trying to edit the mudbus example to transmit raw counts from the UNO to my opc server.

If I apply voltage to any of the 6 analog in pin it shows up on all 6 modbus registers with identical variables.

Am I missing some basic programming to make this work? Newbie here so that possible…

If I connect to any of the A/I pins it shows up on all 6 registers. I cant tell if they are just overwriting or if I messed something up. The attached PDF shows the original Mudbus sketch and the mod-bus tool I am using to view the data.

mudbus.pdf (156 KB)

Your program appears ok to me. How are you connecting all of your analogs, as it appears they are floating to me from the data values ? Do you have them pulled down by a weak pull-down resistor, say ~50kΩ to make sure they are at zero volt potential when there is no input at all ?


Paul I don't have anything pulling them down. I will try that and see if it fixes my problem. I should have checked with a Meter first.