FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12676 questions

15061 answers

24126 comments

47071 members

+2 votes
159 views 1 comments
by
in the Teltonika manual i read how to get additional custom modbus registers with this script

---------------------------------------------------------------

#!/bin/ash

 while true

 do

 date > /tmp/regfile #where to store the data

 gsmctl -X >> /tmp/regfile

 gsmctl -E >> /tmp/regfile

 sleep 5

 ready

----------------------------------------------------

https://wiki.teltonika-networks.com/view/RUT955_modbus_custom_register_block

but they didn't choose a fixed register number, they automatically make it start at 1025 for 14 rigisterns.

Can I set a register number with this script? and what command should be used?

Thanks

1 Answer

0 votes
by
Hello,

You can set register number by navigating to the services > Modbus > Modbus TCP Slave > Enable custom register block > in the option field "register count" type the register number > click "SAVE & APPLY".

Regards,
by

thanks

I have defined a custom Modbus register that starts with 1025 for a length of 100 registers.

If I want to store two other values in the custom register block, the date should be automatically stored in register 1025, but the second and third values should be stored in which register number? or can I specify in the script that the second value should be stored in register 1050 and the third in register 1060?