rdavin

How do I avoid showing Scientific notation in PI Vision (Coresight) display?

Discussion created by rdavin Employee on Aug 2, 2017

NOTE: this question was asked by a student enrolled in the Learning course Developing Applications in PI AF SDK in regards to his final project. 

 

A strong tip for all students is that PI Square Search can be your friend.  Granted the first search may not find the hits you want so you may have to try different words.  This is very true in with the former Coresight now known as PI Vision.  The name PI Vision is relatively new and won't necessarily find too many hits prior to 2017.  WIth that in mind, I issued a search on:

 

PI Square Search coresight format

 

And found these 2 threads:

 

Number formatting in Coresight

Formatting value precision in notifications.

 

The first one explains the issue rather well and one community member offers a possible workaround.  If your attribute uses the PIPoint DR, then the display digits of the PI point will be honored.  If it's not a PI point, you may get the unsightly scientific notation.  If you are using a Formula DR, then you may get scientific notation.  But if you are using a Formula DR to perform a units conversion on a PI point, there are better ways.  Consider this example:

 

2017-08-02 09_28_04-Scientific notation with numbers - Message (HTML).png

 

The top attribute uses a Formula DR to convert from megabytes to gigabytes.  But neither of the attributes are assigned a UOM!  My suggestion would be to create a new UOMClass to hold bytes, kilobytes, megabytes, gigabytes, etc. The Disk_D_Free_Megabytes attribute should read the PI point and assign the MB UOM.  The Disk_D_Free_Gigabytes should also use the PIPoint DR, by having a relative reference to Disk_D_Free_Megabytes.  And, this is the important part, the UOM for Disk_D_Free_Gigabytes should be GB.

 

The second link isn't very applicable here, but it does contain an interesting link itself.

 

Ability to Configure Display Digits of an Attribute in PI AF – Customer Feedback for OSIsoft & the PI System

 

That link is to our User Feedback site where you may vote on ideas.  Note that this idea is currently being worked on and is expected to be implemented sometime in 2018.

 

The big takeaway I hope students learn is that PI Square may already have the answer you are seeking.

Outcomes