PI SDK连接服务器和读取PI测点数据

  • Post author:
  • Post category:其他


见下面的例子,使用C#:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using PISDK;

using PISDKCommon;

namespace pisdk_t1

{


class Program

{


static void Main(string[] args)

{


PISDK.PISDK pisdk = new PISDK.PISDK();

//连接PI服务器

Server svr = pisdk.Servers[“192.168.55.220”];

//login

svr.Open(“UID=piadmin;PWD=”);

PIPoints points = svr.PIPoints;

PIPoint point = points[“DL_173”]; //tagname

PIData data = point.Data;

Console.WriteLine(data.Snapshot.Value); //输出snapshot值

}

}

}



版权声明:本文为sudaobo原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。