我是靠谱客的博主 辛勤云朵,这篇文章主要介绍PI SDK连接服务器和读取PI测点数据,现在分享给大家,希望可以做个参考。

见下面的例子,使用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值

        }
    }
}



最后

以上就是辛勤云朵最近收集整理的关于PI SDK连接服务器和读取PI测点数据的全部内容,更多相关PI内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(139)

评论列表共有 0 条评论

立即
投稿
返回
顶部