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

Need help with getting missing data Options · View
startrek
#1 Posted : Thursday, June 10, 2010 8:13:13 AM
Rank: Newbie
Groups: Member

Joined: 6/10/2010
Posts: 4
Hi

We have few performance equations that are calculated at every hour. Some times if the source tags miss data, PE tag also does not have data. Now, what we want it to retrieve the timestamps in excel when there is no data.

For example I have a tag BATOT that has data as follows:
05-Apr-10 21:00:00 0.911442816
05-Apr-10 22:00:00 -0.722654998
05-Apr-10 23:00:00 0.944743693
06-Apr-10 08:00:00 4.015343666
06-Apr-10 09:00:00 3.254813433
06-Apr-10 10:00:00 0.941049159

Now in the excel I need to the timestamps
06-Apr-10 00:00:00
06-Apr-10 01:00:00
...
...

06-Apr-10 07:00:00

Is there a way in excel to filter for null values or no data?

Thanks in advance for all the help
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 : Thursday, June 10, 2010 8:28:21 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Are you using PI-Datalink or do you want to do this in VBA/PISDK?
Principal Consultant
Real-Time Data Management @ Wipro Technologies
startrek
#3 Posted : Thursday, June 10, 2010 9:30:46 PM
Rank: Newbie
Groups: Member

Joined: 6/10/2010
Posts: 4
pi datalink
RJK Solutions
#4 Posted : Thursday, June 10, 2010 10:56:50 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Well in that case, what you can do is to list your timestamps for the time span you want and use the PI Datalink "Timed Data" function and select the retrieval mode as "exact time". Any hour of your PE that didn't run and store a value on the hour will return "No events found.". You can then use a simple Excel formula to set a value of 1 if you calc didn't run or 0 if it did and sum it up for the number of missing calculations.

e.g.
Code:

=IF(C2="No events found.",1,0)


The following screenshot shows what I mean...hope this helps.
RJK Solutions attached the following image(s):
Capture.JPG (100kb) downloaded 13 time(s).
Principal Consultant
Real-Time Data Management @ Wipro Technologies
startrek
#5 Posted : Friday, June 11, 2010 12:30:26 AM
Rank: Newbie
Groups: Member

Joined: 6/10/2010
Posts: 4
How do I download the attachment? I cannot click on the capture.jpg
RJK Solutions
#6 Posted : Friday, June 11, 2010 2:20:57 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Can you see the image now?
Principal Consultant
Real-Time Data Management @ Wipro Technologies
startrek
#7 Posted : Friday, June 11, 2010 4:55:45 PM
Rank: Newbie
Groups: Member

Joined: 6/10/2010
Posts: 4
No, but your post really helped me. I was able to get the missing timestamps on 1000 PE tags. You certainly rock and I really appreciate all your help. Thank you so much
RJK Solutions
#8 Posted : Friday, June 11, 2010 7:13:51 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
No problem, glad to be of service. Smile
Principal Consultant
Real-Time Data Management @ Wipro Technologies
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.