Unit VAR is shown as VA
-
@Craig can you be specific on how Mango changes the units. I suspect it is because of our aliases which I would consider taking a closer look at if I have a specific case to test against.
Just if anyone feel compelled to see some more of the history around what is going on.
https://github.com/infiniteautomation/ma-core-public/issues/309
And where the actual alias of
V * A = VAR
happens in the code is: -
This has been discussed a few times in the past:
https://forum.infiniteautomation.com/topic/3797/mango-changes-mvar-units-to-mva
https://github.com/infiniteautomation/ma-core-public/issues/1331The most comprehensive discussion would be this one however
https://github.com/infiniteautomation/ma-core-public/issues/309Basically the units are used to convey the physical dimensions of the property that you are measuring in order to facilitate conversion to other units or for displaying integrated values.
If you simply want your data points to display VAR after the value, use a plain text suffix.
-
Hi Jared,
thanks for digging up the relevant source.
Can lines 54,55,56 in UnitUtil.java be deleted:
addAlias(SI.VOLT.times(SI.AMPERE), "VAR"); addAlias(SI.KILO(SI.VOLT).times(SI.AMPERE), "kVAR"); addAlias(SI.MEGA(SI.VOLT).times(SI.AMPERE), "MVAR");
These would appear to be the culprits for displaying the units on my VAR tags as V·A.
VARh, kVARh, MVARh, VAh, kVAh, and MVAh are also units that are used for the integral of reactive power over an hour (VARh) and the integral of apparent power over an hour (VAh).
-
@fleh On the text rendering tab of a point, you have two options. To use the "unit" as the suffix or give a custom text suffix.
-
Thanks for your enlightening comments! The surprising element for me was that the unit was automatically changed and I did not know why.
But while playing around with units some more I encountered other bug-like behaviour: Tried to use a custom unit (kV) by entering "kV" in the respective field stopped updating my data point. So I changed everything back but the data point was not resurrected. In fact, all tags were gone. Retried with another unit ("Hz") and it showed the same behaviour. Is that intended (Mango 3.7.2)?
In the link @terrypacker and @CraigWeb posted (https://github.com/infiniteautomation/ma-core-public/issues/309) one user multiplies the unit with a number. I tried that, too ("Hz * 100"), but after saving the data point it would not update neither. Re-entering the datapoint dialogue the Unit was shown as "daHz". How do I get my frequency to be shown and calculated as kHz?
-
@fleh said in Unit VAR is shown as VA:
Tried to use a custom unit (kV) by entering "kV" in the respective field stopped updating my data point.
What field did you change? What type of data source is it? What version of the data source module are you running? How did you ascertain that it stopped updating? I cannot even begin to reproduce this without more information.
@fleh said in Unit VAR is shown as VA:
I tried that, too ("Hz * 100"), but after saving the data point it would not update neither. Re-entering the datapoint dialogue the Unit was shown as "daHz". How do I get my frequency to be shown and calculated as kHz?
I don't know where
daHz
comes from. If I enterHz*100
I gethHz
which is correct. If I enterHz*1000
I getkHz
which is also correct. I can enterkHz
just fine too. -
`What field did you change? What type of data source is it? What version of the data source module are you running? How did you ascertain that it stopped updating?
I changed Point Properties --> Unit --> from "V" to "kV". The data source is a MODBUS TCP device and the module version is 3.7.0. The point is marked as unreliable and does not receive new values. I poll multiple values from the same devices and the other data points keep updating, just not this one. I tried this for some other devices and data points as well and always got the same issue -- with one difference: after logging out and in again most of my changes were "healed". The data points kept updating again. But some are stuck as "unreliable".
I don't know where daHz comes from. If I enter Hz100 I get hHz which is correct. If I enter Hz1000 I get kHz which is also correct. I can enter kHz just fine too.
As embarrassing it is, I cannot reproduce this one. After saving the data point unit it is not automatically updated in the data sources screen but reloading the website triggers the change and then the correct unit is displayed.
-
Here is a screenshot of the trouble maker.
-
@fleh said in Unit VAR is shown as VA:
The data points kept updating again. But some are stuck as "unreliable".
If you disable then re-enable the data point that is unreliable does it come good? Is there anything in your log file or events about it?
-
Nope, this data point does not recover by activating / deactivating it. And there is also nothing in the events log. After deactivation the screen looks as shown below, but reloading the page makes it look like the screenshot posted previously.