Modbus TCP slave registers getting reset without signal
Posted: 02 Jul 2024, 12:33
Hi,
I am experimenting with using a RevPi core as a Modbus TCP slave and am experiencing some unexpected behaviour which I was hoping someone could explain.
I can set up the virtual TCP slave adapter in PiCtory and when I run I get the following.
If I then set a register (I have named one Command) to a specific value using I get the expected result
Then when I poll the register with the register is set to zero after a short but seemingly random amount of time (around 30s) which I can see from the output of the above:
There are no modbus commands being sent to the unit so I would expect this register would stay at the setpoint indefinitely - is this correct?
Thanks very much!
I am experimenting with using a RevPi core as a Modbus TCP slave and am experiencing some unexpected behaviour which I was hoping someone could explain.
I can set up the virtual TCP slave adapter in PiCtory and when I run
Code: Select all
piTest -d
Code: Select all
Address: 64 module type: 24577 (0x6001) ModbusTCP Slave Adapter V0.0
Module is present
input offset: 124 length: 64
output offset: 188 length: 64
Code: Select all
piTest -w Command,5
Code: Select all
Write value 5 dez (=0005 hex) to offset 124.
Code: Select all
piTest -r Command
Code: Select all
...
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 5 dez (=0005 hex)
2 Byte-Value of Command: 0 dez (=0000 hex)
2 Byte-Value of Command: 0 dez (=0000 hex)
2 Byte-Value of Command: 0 dez (=0000 hex)
2 Byte-Value of Command: 0 dez (=0000 hex)
Thanks very much!