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

When (date and time) did a digital state change in a week? Options · View
albertopalaci41
#1 Posted : Friday, November 12, 2010 4:22:17 AM
Rank: Newbie
Groups: Member

Joined: 9/27/2010
Posts: 7
Location: Peru
I need some directions to get a list of the datetimes when a digital state changed from false to true in a week
Just point me to the right PE or Datalink fonction.

Regards
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.
albertopalaci41
#2 Posted : Saturday, November 13, 2010 2:38:33 PM
Rank: Newbie
Groups: Member

Joined: 9/27/2010
Posts: 7
Location: Peru
I found the answer
PINCompFilDat() and PISampFilDat()

but every time I recalculate PISamFilDat() I have different values... Any hint?
RJK Solutions
#3 Posted : Monday, November 15, 2010 9:31:50 PM
Rank: Administration

Groups: Administration

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

In Excel/Datalink you could do something like the following:

Code:

=PICompFilDat("YOURPITAG","*-7d","*","'YOURPITAG' = ""True"" AND PrevVal('YOURPITAG','*') = ""False""",0,1,"YOURPISERVER","inside")


This will give the timestamp for when your PI tag = "True", but only if the previous archived value is "False over the last 7 days aka 1 week.

Enjoy.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
jgates1
#4 Posted : Wednesday, April 20, 2011 7:26:26 PM
Rank: Newbie
Groups: Member

Joined: 4/20/2011
Posts: 1
Location: The Woodlands, Tx
Can someone point to where I can get an explanation of the PICOMPFILDAT expression used above please. I would like to use this for the same reason but for a specific date range.
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.