• Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

    Unit VAR is shown as VA

    Mango feedback
    6
    16
    1285
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fleh
      fleh last edited by

      Hi guys,

      I might have found a bug. When I create a data point with the unit VAR, said unit is always shown as VA.

      How to reproduce? Edit a data point, change the unit to VAR, hit save and and check the unit again.

      Version of mango: 3.7.2

      Thanks for your attention & Have a nice weekend,
      Frank

      1 Reply Last reply Reply Quote 1
      • Turbo
        Turbo last edited by

        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.

        1 Reply Last reply Reply Quote 2
        • fleh
          fleh last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • CraigWeb
            CraigWeb last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • fleh
              fleh last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • C
                craig last edited by

                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 theta

                Nobody 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.

                1 Reply Last reply Reply Quote 1
                • terrypacker
                  terrypacker last edited by

                  @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:

                  https://github.com/infiniteautomation/ma-core-public/blob/3206661aec9f9ddc295b7147c93312479c365a3d/Core/src/com/serotonin/m2m2/util/UnitUtil.java#L54

                  1 Reply Last reply Reply Quote 0
                  • Jared Wiltshire
                    Jared Wiltshire last edited by Jared Wiltshire

                    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/1331

                    The most comprehensive discussion would be this one however
                    https://github.com/infiniteautomation/ma-core-public/issues/309

                    Basically 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.

                    Developer at Radix IoT

                    1 Reply Last reply Reply Quote 0
                    • C
                      craig last edited by

                      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).

                      1 Reply Last reply Reply Quote 0
                      • CraigWeb
                        CraigWeb last edited by

                        @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.

                        1 Reply Last reply Reply Quote 0
                        • fleh
                          fleh last edited by

                          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?

                          Jared Wiltshire 1 Reply Last reply Reply Quote 0
                          • Jared Wiltshire
                            Jared Wiltshire @fleh last edited by

                            @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 enter Hz*100 I get hHz which is correct. If I enter Hz*1000 I get kHz which is also correct. I can enter kHz just fine too.

                            Developer at Radix IoT

                            1 Reply Last reply Reply Quote 0
                            • fleh
                              fleh last edited by

                              `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.

                              1 Reply Last reply Reply Quote 0
                              • fleh
                                fleh last edited by

                                Here is a screenshot of the trouble maker.

                                0_1583151336043_PointDoesNotUpdateAfterChange.png

                                1 Reply Last reply Reply Quote 0
                                • Jared Wiltshire
                                  Jared Wiltshire last edited by

                                  @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?

                                  Developer at Radix IoT

                                  fleh 1 Reply Last reply Reply Quote 0
                                  • fleh
                                    fleh @Jared Wiltshire last edited by

                                    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.

                                    0_1583235502476_MangoDPResurrectionFail.png

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post