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

Compressed Data Options · View
kapilrakh
#1 Posted : Wednesday, October 21, 2009 2:40:38 PM
Rank: Advanced Member

Groups: Member

Joined: 9/3/2009
Posts: 36
Location: Massachusetts, USA
Hello there,

I use "Compressed Data (Start Time/End Time)" in PI Datalink to get the archived alarm statements.

=PICompDat($B$3,$B$1,$B$2, 9,"servername","inside")

B3: Tag Name B1: Start Time B2: End Time




Then I search for a particular word in the alarms (say high or low) and get the corresponding event. I want to do this automatically for a list of alarm tags. The macro will get the tag from a cell , get the archived data , do a word search , get the event and then go to the next tag.

My problem with this is when I change the tag name , the archived data columns don't update fully.It says "Resize to show all values" so I have to right click and select Recalculate (Resize) Function.
Is there any way to do this job without right clicking.

Please reply,

Kapil.
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.
kapilrakh
#2 Posted : Wednesday, October 21, 2009 2:44:30 PM
Rank: Advanced Member

Groups: Member

Joined: 9/3/2009
Posts: 36
Location: Massachusetts, USA





I want to eliminate this resize thing and get all the data.
RJK Solutions
#3 Posted : Wednesday, October 21, 2009 9:18:06 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 612
Location: Cheshire, United Kingdom.
Hi Kapil,

Depends on your version of Datalink.
Whatever version there is a method that you can call from VBA.... "dlresize".

Note that dlresize is not a normal method for Datalink 4.0 so it can give you unexpected behaviour but mostly should be fine. I believe OSI are planning to add a resize method for Datalink 4.0 in the future.

Cheers,

Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
kapilrakh
#4 Posted : Wednesday, October 21, 2009 10:13:00 PM
Rank: Advanced Member

Groups: Member

Joined: 9/3/2009
Posts: 36
Location: Massachusetts, USA
Hello RJK,

Can you tell me more about using "dlresize" method in vba ..

Thanks..

Kapil.
kapilrakh
#5 Posted : Thursday, October 22, 2009 5:08:36 PM
Rank: Advanced Member

Groups: Member

Joined: 9/3/2009
Posts: 36
Location: Massachusetts, USA
I used dlresize sub from pidildialogs.xla. It worked.Thanks for the hint.
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.