Line 9: |
Line 9: |
| For this example we will be using script to store data into regfile from which then you can read data via Modbus. | | For this example we will be using script to store data into regfile from which then you can read data via Modbus. |
| To achieve follow this steps: | | To achieve follow this steps: |
| + | [[File:Modbus custom reg1.png|border|class=tlt-border|1100x700px]] |
| <ol> | | <ol> |
| <li><b>Enable</b> router to be as <b>Modbus TCP slave</b> (<b>Network -> Modbus -> Modbus TCP Slave</b>);</li> | | <li><b>Enable</b> router to be as <b>Modbus TCP slave</b> (<b>Network -> Modbus -> Modbus TCP Slave</b>);</li> |
| <li><b>Enable Custom Register Block</b> in the webUI (<b>Network -> Modbus -> Modbus TCP Slave</b>); | | <li><b>Enable Custom Register Block</b> in the webUI (<b>Network -> Modbus -> Modbus TCP Slave</b>); |
− | <ul>
| + | <li>Register file path: <b>tmp/regfile</b> (this is where new register will be stored);</li> |
− | <li>Register file path: <b>tmp/regfile</b> (this is where new register will be stored);</li>
| + | <li>First register number: <b>1025</b> (by default it is 1025 and recommend to keep it, if necessary it could be changed accordantly);</li> |
− | <li>First register number: <b>1025</b> (by default it is 1025 and recommend to keep it, if necessary it could be changed accordantly);</li>
| + | <li>Register count: <b>32</b> (how much "space" there is given for additional Modbus registers, the more register you want to bigger count should be used).</li> |
− | <li>Register count: <b>32</b> (how much "space" there is given for additional Modbus registers, the more register you want to bigger count should be used).</li></li>
| + | <li>Save & Apply</li> |
− | </ul>
| + | |
| </ol> | | </ol> |
| + | |
| ==Creating Custom Modbus Registers== | | ==Creating Custom Modbus Registers== |
| In order to create custom Modbus register which would allow you to read certain routers information via Modbus, you will need to create a script or any other method for putting certain information into <b>regfile</b>. | | In order to create custom Modbus register which would allow you to read certain routers information via Modbus, you will need to create a script or any other method for putting certain information into <b>regfile</b>. |