AnsweredAssumed Answered

FindPIPoints by Filtering

Question asked by Jben on Feb 1, 2019
Latest reply on Feb 2, 2019 by rdavin

Hi, I am really new to this type of programming. I was trying to get values out from certain PI points in a server as an array, so I used the FindPIPoints method. However, I still cannot get the output values as expected. Could someone please let me know where I made mistakes?

 

static void Main(string[] args)
 {
            PIServers piServers = new PIServers();
            foreach (var server in piServers)
            {
                Console.WriteLine("Server: {0}", server.Name);
            }

            PIServer piServer = piServers.DefaultPIServer;
            Console.WriteLine("Default Server: {0}", piServer.Name);
            piServer.Connect();

            var points=  PIPoint.FindPIPoints(piServer, "filter keyword");
            var values = points.ToArray();
            Console.WriteLine();
            Console.ReadKey();
}

Outcomes