Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Get all points

$
0
0

Hi All,

     I want to develop an .net (c#) application to get all point (with a criteria) from a server. I create the following code. But this only work if I have a timer object created, if not,  i dont receive any data. Do you know how to do it without use the timer object?

 

Thanks,

 

pointList =

new PISDK.PointList();

pointList = _piserver.GetPoints("Tag='*Service Hours'", status);

timer1.Enabled =true;

 

 

private void timer1_Tick(object sender, EventArgs e)

{

ShowResults();

}

 

 

private void fShowResults()

{

 

object sNada="";

 

string s = "";

 

if (status.Status == PISDKCommon.CallStatusConstants.csCancelCompleteWithErrors || status.Status == PISDKCommon.CallStatusConstants.csCompleteWithErrors)

{

s = status.Result.ToString();

}

 

else

{

 

 

foreach (PISDK.PIPoint pt in pointList)

{

sNada = pt.Name;

listBox1.Items.Add(sNada);

 

// MessageBox.Show("aa->" + pt.Name);

}

timer1.Enabled = false;

 

if (_piserver.Connected)

fCerrarPI();

}

}

 


Viewing all articles
Browse latest Browse all 1120

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>