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

PI SDK Codes Options · View
sarvu
#1 Posted : Thursday, May 27, 2010 2:06:32 AM
Rank: Newbie
Groups: Member

Joined: 3/16/2010
Posts: 5
Location: canada
My tag mask is in variable place and commodity.

I could not get the points from PI server with the below code.I don't know the reason for this.

If ConnectToPI() Then

pList = PIServer.GetPoints("tag='*" & place & "* " & Commodity & "*'")
For Each pPoint In pList
CommodityTag = pPoint
pVal = CommodityTag.Value(TimeStamp1)

If pVal Is Nothing Then
Else
Return CommodityTag
End If
Next
End If
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.
Michael
#2 Posted : Thursday, May 27, 2010 3:05:01 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania
There is a space in your statement. Is this correct?

Michael
zfima
#3 Posted : Wednesday, December 28, 2011 8:44:32 AM
Rank: Advanced Member

Groups: Member

Joined: 11/13/2011
Posts: 44
Location: Middle East
sarvu wrote:
My tag mask is in variable place and commodity.

I could not get the points from PI server with the below code.I don't know the reason for this.

If ConnectToPI() Then

pList = PIServer.GetPoints("tag='*" & place & "* " & Commodity & "*'")
For Each pPoint In pList
CommodityTag = pPoint
pVal = CommodityTag.Value(TimeStamp1)

If pVal Is Nothing Then
Else
Return CommodityTag
End If
Next
End If


I think your filter expression is not appropriate. Do you have point attribute "Commodity"??? or "Place"???
For example, you always have attribute "pointsource", and some points hahe pointsource 'Z'. So, You can set filter to "pointsource='Z*'"

In C# syntax it will look like:
Code:

PointList points = _piServer.GetPoints("pointsource = 'Z*'");
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.