AnsweredAssumed Answered

Issue in getting Time Range override to work in PI Vision

Question asked by Rob_Lyon on Apr 29, 2019

My goal is to show a series of bars with hourly averages (last 24 h) rather than showing it as a stepped line chart.

I want to display this in PI Vision.

I saw a similar but unresolved discussion here, but i thought I had my solution - its just not working.

https://pisquare.osisoft.com/message/122477-re-can-pi-vision-show-daily-averages-in-a-line-chart-or-table-instead-of-sho…

 

So I have:

  1. created a single historised tag (for hourly averages, simple AF analysis, it is working fine) and outputted it to the 'Metric Avg' attribute.
  2. created 24 attributes with the following style of data reference: |Metric Avg;TimeMethod=TimeRangeOverride;RelativeTime=%@.|timestring%;TimeRangeMethod=StartTime
    This references the averaged tag, specifies TimeRangeOverride, uses the relative time specified in a child attribute and specifies start time.
  3. This works fine and resolves in Pi System Explorer just fine as below
    TimeSeries - Copy.PNG
  4. My understanding is that using Time Range Override, I should see the same numbers in PI Vision (I have PSE set to Latest and Pi Vision display end time of now).
  5. That doesn't end up being the case unless I set the time range of PI Vision to start after the start of the current hour (my tag averages hourly). From the PI System Explorer help Create Ranges of Configurable Dimensions, I read that (using Time Range Override): "PI AF creates a time range based on the end time supplied by the client application and the offset defined by the relative time." I interpret that using Time Range Override along with Time Range Method=StartTime, I should get the data for that relative time.
    By the way, if I use a hard coded string that resolves to a simple "-7h" rather than a reference that resolves to "-25h+18h", it appears to make no difference.
  6. Here is a comparison between a table on Pi Vision and the PSE when Pi Vision is set to one day. By rights, hours 1-9 should match values and time stamps top and bottom. However the time stamps at the top of the picture from the pi vision table all read the timestamp of the archived value before the start time range of the display.
    PI Vision PSE.PNGWhen i set the Pi Vision display time range to 1 minute, we then get the correct values (the time stamps change - they are still all the same though).
    PI Vision PSE match_LI.jpg

  7. So I'm pretty sure I don't want to use a 1 minute display range and I want the display effect of using bars rather than a trend.

 

Am I missing something with using the use of Time Range Override and TimeRangeMethod=StartTime?

Outcomes