Heim  >  Artikel  >  Datenbank  >  PISDK连接服务器

PISDK连接服务器

WBOY
WBOYOriginal
2016-06-07 15:22:111675Durchsuche

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

}
}
}

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn