12-28-2024, 10:21 PM
I'm experimenting with Arduino IDE code (modbus server over TCP) with my A16 rev1.6 and I'm noticing something interesting.
The digital inputs do not latch to a value but constantly switch between 0 and the current value - 0 if they are grounded and 1 if they are not grounded.
Testing bench: I have inputs X01, X02 connected to the ground terminal - the rest are not connected to anything.
Those two inputs contansly stay at a value of 0 in the modbus coil. The rest however constantly hover between value of 0 and 1. I'm attaching a screenshot of a trend generated in the modbus simulator and the arduino code. I'm polling it at 100ms so 10 times a second so the graph is as real time as it gets.
What would be the cause of that? Polling time for the PCF8574 or just the I2C bus is switching between the 4 expanders and looses value while its talking to the rest?
Any tips are greatly appreciated!
The digital inputs do not latch to a value but constantly switch between 0 and the current value - 0 if they are grounded and 1 if they are not grounded.
Testing bench: I have inputs X01, X02 connected to the ground terminal - the rest are not connected to anything.
Those two inputs contansly stay at a value of 0 in the modbus coil. The rest however constantly hover between value of 0 and 1. I'm attaching a screenshot of a trend generated in the modbus simulator and the arduino code. I'm polling it at 100ms so 10 times a second so the graph is as real time as it gets.
What would be the cause of that? Polling time for the PCF8574 or just the I2C bus is switching between the 4 expanders and looses value while its talking to the rest?
Any tips are greatly appreciated!