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

How to perform a tag search in PI-API ? Options · View
Vana
#1 Posted : Friday, August 13, 2010 7:58:38 AM
Rank: Member
Groups: Member

Joined: 7/7/2010
Posts: 11
Location: France
Hello everyone !

I'm posting this topic because I would like to make a tag search using PI-API. What functions am I suppose to use (with parameters) and how I get a list of tags giving a key-word ?

Thanks a lot in advance for your answers and comments ! ThumbsUp

Vana
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 : Friday, August 13, 2010 9:34:50 AM
Rank: Administration

Groups: Administration

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

In PIAPI you would use the "pipt_wildcardsearch" function. First you pass 0 for the direction parameter with your tag mask and see how many tags you get returned. Then you pass 1 as the direction, for the number of tags that were found (the numfound parameter).

In PISDK you can use the "GetPoints" or "GetPointsSQL" of a PI Server object to search for tags, which is much simpler to implement.


Principal Consultant
Real-Time Data Management @ Wipro Technologies
Vana
#3 Posted : Monday, August 16, 2010 7:10:07 AM
Rank: Member
Groups: Member

Joined: 7/7/2010
Posts: 11
Location: France
Thanks a lot RJK Solutions ! I'll try this !!! BigGrin
Have a nice day !
Vana
#4 Posted : Monday, October 11, 2010 8:27:33 AM
Rank: Member
Groups: Member

Joined: 7/7/2010
Posts: 11
Location: France
Hi RJK Solutions !!!

Actually, I get in trouble with the function pipt_wildcardsearch.
As you told me, I passed 0 as direction to get the number of tags matching the tag mask. So that I got the first tag.
Then I passed 1 as direction with the numberfound previously so I got the second tag.
I didn't manage to find out how I can get the next tags from 3 until the numberfound.

Thanks a lot for helping or giving any clue !! d'oh!
RJK Solutions
#5 Posted : Wednesday, October 13, 2010 5:58:12 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
From memory (I would need to test) don't you just continue to pass "1" as the direction to cycle through to the end of the list?
Principal Consultant
Real-Time Data Management @ Wipro Technologies
Vana
#6 Posted : Tuesday, October 19, 2010 9:54:46 AM
Rank: Member
Groups: Member

Joined: 7/7/2010
Posts: 11
Location: France
Hi and thanks for the reply.

I had already tested it and I got a segmentation fault :(
I don't know what I am doing wrong... Bored
As you propose, it would be really helpfull if you could test it.
Have a nice day !

Vana
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.