欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

PISDK连接服务器

程序员文章站 2022-04-10 21:52:17
...

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

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

//connect to pi server
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);

}
}
}