Changes

Line 162: Line 162:  
[[File:Configuration examples modbus higher uptime example.png]]
 
[[File:Configuration examples modbus higher uptime example.png]]
   −
When the value climbs over 65535 the counter resets and the value held by the first register increases by 1. So one way to interpret the results would be to multiply the value in the first register by 65535 and add the value of the second register: '''%MW1 * 65535 + %MW2'''. Which, following from the example above, would add up to '''1 * 65535 + 3067 = 68602 s''' or '''19 hours 3 minutes 22 seconds'''
+
When the value climbs over 65535 the counter resets and the value held by the first register increases by 1. So one way to interpret the results would be to multiply the value in the first register by 65535 and add the value of the second register: '''%MW1 * 65535 + %MW2'''. Which, following from the example above, would add up to '''1 * 65535 + 3067 = 68602 s''' or '''19 hours 3 minutes 22 seconds'''.
 +
 
 +
However, while this works when calculating uptime values, it will not work for all parameters. The correct way to calculate values would be to first convert them to '''binary'''.

Navigation menu