Mod10K
-
Have you ever ran into a mod10K register?
-
All the time, predominantly with Powerlogic meters - it is how they typically store kWh and other energy values. They typically use 4 registers (let's call them A, B, C and D) and then they stitch them together with a formula that goes a bit like this:
(A) + (B)(10000) + (C)(10000^2) + (D)*(10000^3) = Total Value
It is a pretty common way of packing large values in Modbus land.
(edit - kicked the powers of 10 on those 10K values, should be good now)
-
So I would need to make a metapoint to do this?
-
Yep, you could do it with a scripted point and just build the math in by register. Read all 4 registers physically with the Modbus driver (if your particular example involves 4 registers), and then put them together with the Mod10K math in a scripted point.
-
Hello!
I am fairly certain you will not be able to do this with the current version of Modbus4J, but I confess I am not too familiar with mod10k (it's not in my protocol spec reference! some googling indicates it's a proprietary extension?). Some playing with our Modbus data source suggests you cannot exceed register offset 65535 in making requests, so you will not be able to request the registers at 10000^2 and 10000^3
-
You don't need to read any registers beyond 65535. Basically, you'd multiply the normal register reads by various powers of 10000 in order to create a 5 digit offset, and then add them all together to get the larger value.
-
Ah my mistake! That makes considerably more sense. So, they could be four contiguous registers and just storing the values of different magnitudes.
Thanks for answering his question mdh, and welcome to the forum!
-
It'd be great if you could make this an data type option in the future.
-
We have added Mod10k data types into the next release of the Modbus module, 3.4.1, which should be released sometime next week, most likely. It's currently in the store in the development channel.