|
|
Rank: Newbie Groups: Member
Joined: 7/28/2010 Posts: 2
|
hi, I have a process book display, in which I need to alert the user by giving a message box when the change of value exceeds limits in 5 minutes. Now the question is how to get the ramp of the tag value. I tried using the "getvalue(date,status)" function in symbol class like val=value1.getvalue("*",true)-value1.getvalue("*-5 M",true) where value1 is symbol on my process book of type "Vlaue". but value1.getvalue("*-5 M",true) is just returning the current value only. Is there any other method to get an archived value through Process book VBA.
thanks in advance.
|
|
|
|
|
OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System. We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ or contact OSIsoft vCampus for more details.
|
|
|
Rank: Administration
 Groups: Administration
Joined: 6/20/2008 Posts: 612 Location: Cheshire, United Kingdom.
|
Hello, Take a look at this thread: http://www.rjksolutionsltd.co.uk/forum/yaf_postst223_Blinking-text.aspxYou could create a dataset and then use the range of performance equation functions to analyse the data e.g. stdev function. Principal Consultant Real-Time Data Management @ Wipro Technologies
|
|
|
Rank: Newbie Groups: Member
Joined: 7/28/2010 Posts: 2
|
thank you for the suggestion. But may be i was not clear in my first post. What i wanted was to show the archived value to the user on the process book along with the present value. A kind of replay system of my own developed screen. are there any function available for " Value" class to get the archived value from the PI historian. Thanks in advance.
|
|
|
Rank: Member Groups: Member
Joined: 7/19/2010 Posts: 20
|
Maybe this will help? http://www.rjksolutionsltd.co.uk/forum/yaf_postst163_Calling-DataLink-Functions-from-ProcessBook-using-VBA.aspxDisclaimer: Any code presented by myself might be unconventional because of the lack of formal training. Any corrections are welcome. =)
|
|
|
Rank: Member Groups: Member
Joined: 7/19/2010 Posts: 20
|
Add the a reference to PISDK in the VBA window, Replace sinusoid with your tag name, and the *-1d with your time you want to query. Code:'Replace MyServer with your own server name in quotes mySRV = PISDK.Servers("MyServer") If Not PISDK.Servers("MyServer").Connected Then PISDK.Servers("MyServer").Open MsgBox PISDK.Servers("MyServer").PIPoints("sinusoid").Data.ArcValue("*-1d", rtAuto) Disclaimer: Any code presented by myself might be unconventional because of the lack of formal training. Any corrections are welcome. =)
|
|
|
|
Guest
|