Hello,
For your case, you would need to employ a script. An example script of reading device's time and writing it to data file every 10 seconds is below:
#!/bin/ash
while [ 1 ]; do
echo $(modbus_tcp_test 192.168.1.1 502 5 1 3 1 2 32bit_uint1234 1) >> /tmp/data.txt
sleep 10
done
Keep in mind that RUTX11 must have Services -> MODBUS- > MODBUS TCP slave service enabled.
You could also employ Crontabs for periodic data reading.
The syntx of modbus_tcp_test is the following: modbus_tcp_test IP PORT TIMEOUT SLAVE_ID FUNCTION REG_ADDRESS REG_COUNT/VALUE(S) DATA_TYPE NO_BRACKETS
Best regards,