Line 139: |
Line 139: |
| [[File:Configuration_examples_modbus_register_count.png|border|class=tlt-border]] | | [[File:Configuration_examples_modbus_register_count.png|border|class=tlt-border]] |
| | | |
− | ==Reading Created Custom Modbus Registers with ComTestPro== | + | ==Reading Created Custom Modbus Registers with QModMaster== |
− | For this example we will be using <b>ComTestPro</b> program, which allows us to get Modbus data from device in <b>Hex</b>. So in order to get <b>date</b> from the router by reading <b>custom Modbus registers</b> we need to use following configuration: | + | For this example we will be using <b>QModMaster</b> program, which allows us to get Modbus data from device in <b>Hex</b>. So in order to get <b>date</b> from the router by reading <b>custom Modbus registers</b> we need to use following configuration: |
| <ul> | | <ul> |
| <li>Protocol: Modbus TCP;</li> | | <li>Protocol: Modbus TCP;</li> |
− | <li>IP Address: 192.168.{{#ifeq:{{{series}}}|TRB1|2|1}}.1 (routers LAN or WAN IP);</li> | + | <li>IP Address: 192.168.{{#ifeq:{{{series}}}|TRB1|2|1}}.1 (router's 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> |
− | <li>Register: 1024 (the register number from which <b>custom Modbus registers</b> are started, keep in mind you need to -1 from the register which you configured in the webUI, for example we used 1025 but here we need to use 1024);</li> | + | <li>Register: 1025;</li> |
− | <li>Registers: 14 (registers lenght).</li> | + | <li>Registers: 15 (register's length).</li> |
| </ul> | | </ul> |
| With this configuration you should get routers <b>date</b> in <b>hex</b>. Below is the example of configuration and what reply we get from the router: | | With this configuration you should get routers <b>date</b> in <b>hex</b>. Below is the example of configuration and what reply we get from the router: |
| | | |
− | {{#switch:{{{series}}}
| + | [[File:Modbus custom reg5.png|border|class=tlt-border]] |
− | |RUT9XX = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
| |
− | |RUT2XX = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
| |
− | |RUTX = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
| |
− | |TRB1 = [[File:Configuration examples trb1 modbus comtest pro.png|border|class=tlt-border]]
| |
− | |TRB2 = [[File:Configuration examples rutx modbus comtest pro.png|border|class=tlt-border]]
| |
− | }}
| |
| | | |
| And as you can see we received a reply in hex: | | And as you can see we received a reply in hex: |
| | | |
− | 5468 7520 4A75 6C20 3330 2031 313A 3539 3A30 3820 5554 4320 3230 3230
| + | 4672 6920 4F63 7420 3134 2031 313A 3437 3A31 3820 4545 5354 2032 3032 320A |
| | | |
| By using certain websites, like this: '''[https://www.scadacore.com/tools/programming-calculators/online-hex-converter/ hex converter]''' we can analyze the data by entering the received hex reply. After conversion we can see the routers date which in <b>ASCII</b> is: | | By using certain websites, like this: '''[https://www.scadacore.com/tools/programming-calculators/online-hex-converter/ hex converter]''' we can analyze the data by entering the received hex reply. After conversion we can see the routers date which in <b>ASCII</b> is: |
| | | |
− | Thu Jul 30 11:59:08 UTC 2020
| + | Fri Oct 14 11:47:18 EEST 2022 |
| | | |
− | [[File:Configuration examples modbus hex to ascii.png|border|class=tlt-border]] | + | [[File:Modbus custom reg6.png|border|class=tlt-border]]<br> |
− | [[Category:{{{name}}} Configuration Examples]]
| + | [[Category:{{{name}}} Configuration Examples]] |