Template:Networking rutos manual modbus modbus tcp get parameters table: Difference between revisions

From Teltonika Networks Wiki
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
===Get Parameters===
===Get Parameters===
----
----
Modbus parameters are held within <b>registers</b>. Each register contains 2 bytes of information. For simplification, the number of registers for storing numbers is 2 (4 bytes), while the number of registers for storing text information is 16 (32 bytes). The register numbers and corresponding system values are described in the table below:
Modbus parameters are held within <b>registers</b>. Each register contains 2 bytes of information. For simplification, the number of registers for storing numbers is 2 (4 bytes), while the number of registers for storing text information is 16 (32 bytes).  
{{#ifeq:{{{name}}}|RUTX12|<br><br>To get data from the second modem, you need to execute this command:
 
$  modbus write -D {{#ifeq:{{{series}}}|TRB14X|192.168.2.1|192.168.1.1}} %MW328  12589 12590 12800
 
This command sets it to primary modem:
 
$ modbus write -D {{#ifeq:{{{series}}}|TRB14X|192.168.2.1|192.168.1.1}} %MW328  13101 12544
 
}}
The register numbers and corresponding system values are described in the table below:
<br> <br>
<br> <br>
<table class="nd-othertables">
<table class="nd-othertables">
Line 102: Line 112:
     </tr>
     </tr>
}}
}}
{{#ifeq:{{{name}}}|RUT955|
{{#switch:{{{name}}}
| RUT955|RUT956=
     <tr>
     <tr>
       <td>Digital input (DIN1) state</td>
       <td>Digital input (DIN1) state</td>
Line 126: Line 137:
{{#ifeq:{{{analog}}}| 1|
{{#ifeq:{{{analog}}}| 1|
     <tr>
     <tr>
       <td>Analog input (PIN {{#switch:{{{series}}}|TRB2=11|RUT9=9|TRB1=7}}) value</td>
       <td>Analog input (PIN {{#switch:{{{series}}}|TRB2=11|RUT9|RUT9M=9|TRB1=7}}) value</td>
       <td>141</td>
       <td>141</td>
         <td>142</td>   
         <td>142</td>   
Line 184: Line 195:
     </tr>
     </tr>
}}
}}
{{#ifeq:{{{mobile}}}| 1|
{{#ifeq:{{{mobile}}}|1|{{#ifeq:{{{series}}}|TRB5||
     <tr>
     <tr>
       <td>Mobile data received today (SIM1)</td>
       <td>Mobile data received today (SIM1)</td>
Line 200: Line 211:
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Mobile data received this week (SIM1)</td>
       <td>Mobile data received this week (SIM1)</td>
       <td>189</td>
       <td>189</td>
       <td>190</td>
       <td>190</td>
Line 207: Line 218:
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Mobile data sent this week (SIM1)</td>
       <td>Mobile data sent this week (SIM1)</td>
       <td>191</td>
       <td>191</td>
       <td>192</td>
       <td>192</td>
Line 214: Line 225:
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Mobile data received this month (SIM1)</td>
       <td>Mobile data received this month (SIM1)</td>
       <td>193</td>
       <td>193</td>
       <td>194</td>
       <td>194</td>
Line 221: Line 232:
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Mobile data sent this month (SIM1)</td>
       <td>Mobile data sent this month (SIM1)</td>
       <td>195</td>
       <td>195</td>
       <td>196</td>
       <td>196</td>
Line 228: Line 239:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Mobile data received last 24h (SIM1)</td>
         <td>Mobile data received last 24h (SIM1)</td>
         <td>197</td>
         <td>197</td>
         <td>198</td>
         <td>198</td>
Line 235: Line 246:
     </tr>
     </tr>
     <tr>
     <tr>
         <td>Mobile data sent last 24h (SIM1)</td>
         <td>Mobile data sent last 24h (SIM1)</td>
         <td>199</td>
         <td>199</td>
         <td>200</td>
         <td>200</td>
         <td>2</td>
         <td>2</td>
         <td>32 bit unsigned integer</td>
         <td>32 bit unsigned integer</td>
     </tr>
     </tr>}}|}}
{{#ifeq:{{{name}}}|RUT955|
{{#ifeq:{{{name}}}|RUT955|
       <tr>
       <tr>
Line 256: Line 267:
         <td>16 bit unsigned integer</td>
         <td>16 bit unsigned integer</td>
       </tr>|}}
       </tr>|}}
{{#ifeq:{{{dualsim}}}| 1|
{{#ifeq:{{{mobile}}}|1|{{#ifeq:{{{dualsim}}}| 1|
       <tr>
       <tr>
         <td>Active SIM card</td>
         <td>Active SIM card</td>
Line 264: Line 275:
         <td>16 bit unsigned integer</td>
         <td>16 bit unsigned integer</td>
       </tr>
       </tr>
}}
}}{{#ifeq:{{{series}}}|TRB5||
       <tr>
       <tr>
         <td>Mobile data received last week (SIM1)</td>
         <td>Mobile data received last week (SIM1)</td>
Line 292: Line 303:
         <td>2</td>
         <td>2</td>
         <td>32 bit unsigned integer</td>
         <td>32 bit unsigned integer</td>
       </tr>
       </tr>}}
{{#ifeq:{{{name}}}|RUTX12| |
{{#ifeq:{{{name}}}|RUTX12| |
{{#switch:{{{series}}}
{{#switch:{{{series}}}
| TRB1|RUT36X|RUT2=
| TRB1|TRB5=|RUT36X|RUT2=
| #default =
| #default =
       <tr>
       <tr>
Line 401: Line 412:
       <td>16 bit unsigned integer</td>
       <td>16 bit unsigned integer</td>
     </tr>
     </tr>
|TRB140|TRB141|TRB142|TRB145|RUT300|RUT360=
|TRB140|TRB141|TRB142|TRB143|TRB145|RUT300|RUT360|TRB500=
     <tr>
     <tr>
       <td>PIN 3 status (4 PIN connector)</td>
       <td>PIN 3 status (4 PIN connector)</td>
Line 418: Line 429:
|
|
     <tr>
     <tr>
       <td>Digital non-isolated input (4 PIN connector)</td>
       <td>Digital non-isolated input {{#ifeq:{{{name}}}|TRB141|(4 PIN connector)|}}</td>
       <td>324</td>
       <td>324</td>
       <td>325</td>
       <td>325</td>
Line 425: Line 436:
     </tr>
     </tr>
     <tr>
     <tr>
       <td>Digital open collector output (4 PIN connector)</td>
       <td>Digital open collector output {{#ifeq:{{{name}}}|TRB141|(4 PIN connector)|}}</td>
       <td>325</td>
       <td>325</td>
       <td>326</td>
       <td>326</td>
Line 434: Line 445:
{{#switch:{{{series}}}
{{#switch:{{{series}}}
|TCR1=
|TCR1=
|RUTX|TRB2|RUT9|RUT2|RUT2M=
|RUTX|TRB2|RUT9|RUT9M|RUT2|RUT2M=
|
|
     <tr>
     <tr>
       <td> PIN 3 direction {{#ifeq:{{{series}}}|TRB1|(4 PIN connector)}}</td>
       <td> PIN 3 direction {{#ifeq:{{{name}}}|TRB141|(4 PIN connector)|}}</td>
       <td>326</td>
       <td>326</td>
       <td>327</td>
       <td>327</td>
Line 444: Line 455:
     </tr>
     </tr>
     <tr>
     <tr>
       <td> PIN 4 direction {{#ifeq:{{{series}}}|TRB1|(4 PIN connector)}} </td>
       <td> PIN 4 direction {{#ifeq:{{{name}}}|TRB141|(4 PIN connector)|}}</td>
       <td>327</td>
       <td>327</td>
       <td>328</td>
       <td>328</td>
Line 569: Line 580:
       <td>Text</td>
       <td>Text</td>
   </tr>
   </tr>
    <tr>
      <td> LAN IP </td>
      <td>394</td>
      <td>395</td>
      <td>2</td>
      <td>8 bit unsigned integer</td>
  </tr>{{#ifeq:{{{mobile}}}|1|
    <tr>
      <td> Add SMS </td>
      <td>397</td>
      <td>398</td>
      <td>90</td>
      <td>Text</td>
  </tr>
}}
</table>
</table>

Revision as of 09:56, 27 January 2023

Get Parameters


Modbus parameters are held within registers. Each register contains 2 bytes of information. For simplification, the number of registers for storing numbers is 2 (4 bytes), while the number of registers for storing text information is 16 (32 bytes).

The register numbers and corresponding system values are described in the table below:

required value register address register number number of registers representation
System uptime 1 2 2 32 bit unsigned integer
System hostname 7 8 16 Text
Router serial number 39 40 16 Text
LAN MAC address 55 56 16 Text
Router name 71 72 16 Text
Current WAN IP address 139 140 2 8 bit unsigned integer
Digital non-isolated input 324 325 1 16 bit unsigned integer
Digital open collector output 325 326 1 16 bit unsigned integer
PIN 3 direction 326 327 1 16 bit unsigned integer
PIN 4 direction 327 328 1 16 bit unsigned integer
Modem ID 328 329 8 Text
Unix timestamp 364 365 2 32 bit unsigned integer
Local ISO time 366 367 12 Text
UTC time 378 389 12 Text
LAN IP 394 395 2 8 bit unsigned integer