0

Displaying Unit property in Axiom

I have various tags with the property "Units", like this calculated tag:

I'd like to show this in Axiom, and reading other posts it sounds like I need to create another Value symbol to show the units and add ".Units" to the Source path, like this:

SOLAR BEACON.Beacon_9.EnergySavingYesterday_calc.Units

 

This seems to work, at least for calculated tags. But I also have the same Units property on some non-calculated tags and for those it is saying Undefined. Any suggestions why?

Ideally, I'd much rather put it in the ValueFormat, something like this:

{Value:N2} {Property:Units}

 

But that doesn't work, presumably because it's a C# format string underneath. Is there a way to do this so I don't have to have a separate column in my grids just for the units?

5 replies

null
    • smason
    • 12 days ago
    • Reported - view

    If a tag does not have a Units property, it will return Undefined. Another option is to just include the unit value in the ValueBox itself after the value. So for the ValueFormat option you would use {Value:N2} £.

      • alistair_frith
      • 12 days ago
      • Reported - view

      @Steve Mason  thanks for the swift response.

       

      Hardcoding the UoM in the format string is what I have been doing, but it means the UoM is both attached to the tag and hardcoded into every display that shows it. That's not good, so I need to get these properties working (and as a learning exercise so I understand how it all fits together).

      I'm new to Canary and the whole views thing, but for a non-calculated tag, when I drill down the path to the tag in the Views explorer in Canary Administrator, I see there is no Units property, so that explains why it's not being found by Axiom:

      And the source item also doesn't have that property. But I thought I had loaded it in from this file:

      by selecting the 'MQTTData' dataset tile in the Historian part of Canary Administrator and choosing Import Properties from the Dataset Options

       

      but drilling into the dataset, the property is nowhere to be seen:

      So where was it imported to, why is it not visible in the dataset, and how do I get it into the view so Axiom can see it?

    • alistair_frith
    • 12 days ago
    • Reported - view

    I think I've found the problem:

    I was importing the properties into the MQTTData dataset. If I instead import into the SolarBeacon dataset (which I think is some kind of virtual dataset created by the SolarBeacon view?) then the Units property becomes visible in that view and also in Axiom.

    I'm still very unsure that I understand what is going on and how it works but I do now have access to the Units property in Axiom.
     

      • smason
      • 9 days ago
      • Reported - view

      If you import the properties into a DataSet, they would get stored in the latest file in that DataSet. Then as the Historian creates a new file at midnight, the properties would roll over into the new file. If the properties are in the latest file, you should be able to see them in Views and therefore in Axiom.

      I can see from your last screenshot that there was probably 2 files from Nov 8th??? That tells me something forced the Historian to create another for that day. Do you have the "Sync historian tags" option enabled within the Collector?

      This would cause the Historian to create a new file based upon the messages it was receiving from the publishing device. This type of a new file creation is a break from the previous file so only tags and their properties coming from the publishing device would get placed in the new file. It's not a "roll-over" as I described above. I'm curious if the properties from your import are in the first file from Nov 8th and not in the second one.

      Ideally, we would want to collect the properties from the source along with the data which the Collector supports, but maybe that's not possible.

    • alistair_frith
    • 9 days ago
    • Reported - view

    There were two files there because I forced a roll-over, thinking maybe that would prompt the properties to be added in the new file.

    Now I think maybe the Units attribute did go into the dataset: When I originally created it, all the tags had names starting with a number. Then I re-did it and added an SB1- or SB2- prefix. The original tags are still there, without the Units property, and those were the ones I was originally checking when I was trying to verify it. The ones with the DB1- and SB2- prefix have the property and maybe did from the start.

    I'd like to get rid of the non-prefixed ones. They haven't had any data since last month and just confuse things. But I can't see how to do that. I've figured out how to do that now.

Content aside

print this pagePrint this page
  • 9 days agoLast active
  • 5Replies
  • 12Views
  • 2 Following