I need turn around time in processbook display as like below. Can we add an attribute in PI AF with some particular date and subtract with current date in processbook display?
Sebastien Raposo Gregor Beck
Any idea about my requirement please?
You can always create another formula data reference to add/subtract a current time attribute (%TIME%)
But interfacing with PB VBA is not something that we recommend. Please keep it inside the AF.
You can always create more attributes to do some date/time manipulations to get the nicely formated X d Y h D m Z s....
Your formula data reference would be something close to:A currentTime Attribute (%TIME%)
B set particular date Attribute
On the right-hand side, the formula for the turnaround time would be:
A - B
which I would think it would result in 64.98347478 like- days format.
Then additional methods can be used to create clean days, hours and minutes format.
Do we have possibility to create a simple AF analysis with target time - current time ? Please let me know calculation for this.
My target time is 31-Jan-2020 23:59:59
You can try something similar to what Ales outlined below:AF Analytics - Working with date-time arithmetic
I am not able to figure out how to give target date in attribute and also in required format. I want to add remaining time in PI Processbook as like below.
In my case, 'LastMaintenanceDate' is another attribute that I have set up. This can be your target date.
It is set up as a simple DateTime type attribute with a date.
Now I received required value but not in required format. How should I change it to days, hours, mins, secs as like below? Any solution?
Do we have an option to add Turnaroundtime variable to PI Processbook without mapping to PI tag? I can see option to add AF attributes in PI Processbook using "define value" but can't see an option to map AF analysis or variables.
What's the value type for output tag? I have tried all possible ways getting same error. .
u can try something like above, I am not sure on the hours side in my case I got 6 hours with respect to my local time, you can try something by using split and accessing that part of array.
Hope it helps
I created attribute and added into PI Processbook but getting no data with below error. I can see values in PI AF.
PI ProcessBook is not able to deal with object value type <Anything>.
Vinit Shah has suggested an option to break the time span into a days, a hours and minute portion. One next possible step would be to concatenate those again together with letter indicators for days, hours, minutes and seconds into a string similar to the one you've shared. Have you tried this approach?
In addition to Gregor's answer, don't use the data reference of <none> for values that change frequently in time. If you want to use Asset Analytics to generate the time, please use the Analysis data reference or a PI Point.
Hi Seb & Gregor,
I can't see Split expression in my pi AF (2018Sp1). I have figured out to calculate for days and hours but not mins and secs based on below calcualtions. Please help me to find calcualtion for mins and secs
Once have separate variables for days, hrs, min & sec how can concatenate with them? I thought to map with 4 tags in PI processbook. is it good approach?
The function, Split, was added in 2018 SP2 release along with array handling capability.
Looks like you may need to convert the fraction of the 'days' variable and keep using fractions to convert it to the remaining minutes and seconds.
Yesterday I have created mins and seconds logic as well
I have created calculations for days, hours, mins & secs with 1 sec frequency but display is refreshing with 25-30 secs frequency in processbook and 1 min frequency in PI vision page.
Any suggestions please?
Any suggestions to read particular attribute with high frequency to see the seconds value?
PI ProcessBook and PI Vision by default have an update rate of 5 seconds. Are you saying your Turnaround Attribute is holding off ProcessBook and Vision from updating the display or is the display just updating fine and it takes longer to see updates for the Turnaround?
Which controls are you using in your displays?
Is there any error(s) returned in either ProcessBook or Vision?
If the Analysis itself is not refreshing within the scheduled frequency, can you please share what you've created?
Retrieving data ...