YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

how to monitor Ramp of a pirticular tag value Options · View
ans1980
#1 Posted : Wednesday, July 28, 2010 10:20:59 AM
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.
Sponsor  
 

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.
RJK Solutions
#2 Posted : Wednesday, July 28, 2010 10:37:37 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hello,

Take a look at this thread: http://www.rjksolutionsltd.co.uk/forum/yaf_postst223_Blinking-text.aspx

You 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
ans1980
#3 Posted : Monday, August 02, 2010 5:18:39 AM
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.
Tommy
#4 Posted : Monday, August 02, 2010 6:37:30 PM
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.aspx
Disclaimer: Any code presented by myself might be unconventional because of the lack of formal training. Any corrections are welcome. =)
Tommy
#5 Posted : Wednesday, August 04, 2010 10:27:02 PM
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. =)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.