Template:Networking rut2 9 modbus custom register block: Difference between revisions
Template:Networking rut2 9 modbus custom register block (view source)
Revision as of 09:03, 29 September 2020
, 29 September 2020no edit summary
No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
do | do | ||
date > /tmp/regfile #where data will be stored | date > /tmp/regfile #where data will be stored | ||
{{#switch:{{{series}}} | |||
|RUT9XX = | |||
gsmctl -X >> /tmp/regfile | gsmctl -X >> /tmp/regfile | ||
gsmctl -E >> /tmp/regfile | gsmctl -E >> /tmp/regfile | ||
|RUT2XX = | |||
gsmctl -X >> /tmp/regfile | |||
gsmctl -E >> /tmp/regfile | |||
|RUTX = | |||
gsmctl -q >> /tmp/regfile | |||
gsmctl -c >> /tmp/regfile | |||
|TRB1 = | |||
gsmctl -q >> /tmp/regfile | |||
gsmctl -c >> /tmp/regfile | |||
|TRB2 = | |||
gsmctl -q >> /tmp/regfile | |||
gsmctl -c >> /tmp/regfile | |||
}} | |||
sleep 5 | sleep 5 | ||
done | done | ||
Line 71: | Line 86: | ||
With Modbus TCP master you can read data just by using ASCII data type and interactive test button. | With Modbus TCP master you can read data just by using ASCII data type and interactive test button. | ||
{{#switch:{{{series}}} | |||
|RUT9XX = [[File:Configuration examples modbus tcp master test.png|border|class=tlt-border]] | |||
|RUT2XX = [[File:Configuration examples modbus tcp master test.png|border|class=tlt-border]] | |||
|RUTX = [[File:Configuration examples rutx modbus tcp master test.png|border|class=tlt-border]] | |||
|TRB1 = [[File:Configuration examples trb1 modbus tcp master test.png|border|class=tlt-border]] | |||
|TRB2 = [[File:Configuration examples rutx modbus tcp master test.png|border|class=tlt-border]] | |||
}} | |||
To determine how many registers to specify in the '''Register count/Values''' field you should divide character count by two. For example, if you have 28 characters you should input 14 to '''Register count/Values''' field. | To determine how many registers to specify in the '''Register count/Values''' field you should divide character count by two. For example, if you have 28 characters you should input 14 to '''Register count/Values''' field. | ||
Line 81: | Line 102: | ||
<ul> | <ul> | ||
<li>Protocol: Modbus TCP;</li> | <li>Protocol: Modbus TCP;</li> | ||
<li>IP Address: 192.168. | <li>IP Address: 192.168.{{#ifeq:{{{series}}}|TRB1|2|1}}.1 (routers LAN or WAN IP);</li> | ||
<li>Port: 502 (port number on which Modbus TCP Slave is listening);</li> | <li>Port: 502 (port number on which Modbus TCP Slave is listening);</li> | ||
<li>Device: 1</li> | <li>Device: 1</li> |