Unit VAR is shown as VA
-
Greetings:
I gave up on using the built in Units in Mango. They seem to be.. Sort of broken and generally annoying, since there never seems to be the right M/k/u/m type for whatever I'm doing-- Megawatts, kilowatts, whatever. The Best Practice seems to be to just use the Text Renderer Properties, and set the Suffix to Whatever unit you want.
I tried using the built-in units a number of ways, but I got tired of dealing with the little "dot" for multiplied units which really aren't. I don't remember which unit, but it was something like kwh showing as kw<dot>h.. It's not kilowatt TIMES hours.. Anyways. I've run into trouble with import/export also using built-in units, where m^2 doesn't import right under some conditions (for example). Don't have these troubles using the "text renderer properties" Suffix box
Yeah. The general practice seems to be "use the text renderer properties"... Makes your life easier.
-
Hi @Turbo, you seem to have lots of experience with this issue! I find it odd that the IA team is not tackling these issues... but then again, with the suffixes it is easy enough to fix. Thanks a lot for your answer! Under these circumstances I will not pursue this further and go with the suffixes.
-
Hi Fleh
Using the unit as a suffix can have undesirable effects due to the 3rd party unit library that has been used. Its main use case is that it allows you to change the unit of a point without a meta point. for instance if your point is measured in MVA, you could make a custom unit as VA on the same point.
While VAR is always referred to as VAR in engineering. It is still a measurement of volts x amps which is probably why the library left it that way. IAS is aware of the issues with the units but at the moment fixing it is not a priority as using a suffix is an acceptable workaround.
-
Hi Craig,
in your first sentence you're saying that using the suffix can have undesirable side effects and in your last sentence you say that it is an acceptable workaround. Which one is it? Very likely, the side effects are not that important to me... but still.
Anyway. Today I learned, that the folks who use the dashboards are OK with showing VA instead of VAR, so I will leave it just as it is.
-
electrical power engineer here;
Apparent Power is a complex number, it has real and imaginary parts. The symbol for Apparent Power is S. The units for Apparent Power is VA.
S=V*I, where V and I are complex numbers which have real and imaginary components.The symbol for reactive power is Q. the units for reactive power is VAR.
Q=IV sin theta, where theta is the angle between the vectors for I and V.The symbol for real power is P. the units for real power is Watts (W).
P=IV cos thetaNobody should be OK using VA and VAR interchangeably, they are not the same thing. only the same thing in one specific case where theta = 90 degrees are S and Q equal.
I have also had issues with mango changing the units on me when dealing with real, reactive, and apparent power, which is often the case in any electrical power application.
-
@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.