91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 433KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-16
  • 語言: C#
  • 標簽: C#??PLC??OPC??通訊統??

資源簡介

C# PLC OPC 通訊統一方式,支持 PC ACCESS , TOPSERVER, KEPSERVER ...

資源截圖

代碼片段和文件信息

///摘要
///程式使用C#.NET?2005?編寫
///引用類庫OPCDAAuto.dll
///OPCServer采用KEPWare
///在windows?xp?sp2、sp3、windows?2003上測試通過
///完成于:2008年12月31日
///測試于:2009年01月05日
///
///作者:瀟灑草
///Email:zhkai868@163.com
///QQ:44649029
///?
///如分發,請保留此摘要。
///鄙視那些拿代碼當寶貝的人,鄙視那些拿源碼換源碼的人,鄙視那些自私的人。
///別人看到你的代碼,你能死啊?對你有多大威脅啊?強烈鄙視~~~
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Net;
using?System.Collections;
using?OPCAutomation;

namespace?OPC測試通過
{
????public?partial?class?MainFrom?:?Form
????{
????????public?MainFrom()
????????{
????????????InitializeComponent();
????????}

????????#region?私有變量
????????///?
????????///?OPCServer?object
????????///?

????????OPCServer?KepServer;
????????///?
????????///?OPCGroups?object
????????///?

????????OPCGroups?KepGroups;
????????///?
????????///?OPCGroup?object
????????///?

????????OPCGroup?KepGroup;
????????///?
????????///?OPCItems?object
????????///?

????????OPCItems?KepItems;
????????///?
????????///?OPCItem?object
????????///?

????????OPCItem?KepItem;
????????///?
????????///?主機IP
????????///?

????????string?strHostIP?=?““;
????????///?
????????///?主機名稱
????????///?

????????string?strHostName?=?““;
????????///?
????????///?連接狀態
????????///?

????????bool?opc_connected?=?false;
????????///?
????????///?客戶端句柄
????????///?

????????int?itmHandleClient?=?0;
????????///?
????????///?服務端句柄
????????///?

????????int?itmHandleServer?=?0;
????????#endregion

????????#region?方法
????????///?
????????///?枚舉本地OPC服務器
????????///?

????????private?void?GetLocalServer()
????????{
????????????//獲取本地計算機IP計算機名稱
????????????IPHostEntry?IPHost?=?Dns.Resolve(Environment.MachineName);
????????????if?(IPHost.AddressList.Length?>?0)
????????????{
????????????????strHostIP?=?IPHost.AddressList[0].ToString();
????????????}
????????????else
????????????{
????????????????return;
????????????}
????????????//通過IP來獲取計算機名稱,可用在局域網內
????????????IPHostEntry?ipHostEntry?=?Dns.GetHostByAddress(strHostIP);
????????????strHostName=ipHostEntry.HostName.ToString();

????????????//獲取本地計算機上的OPCServerName
????????????try
????????????{
????????????????KepServer?=?new?OPCServer();
????????????????object?serverList?=?KepServer.GetOPCServers(strHostName);

????????????????foreach?(string?turn?in?(Array)serverList)
????????????????{
????????????????????cmbServerName.Items.Add(turn);
????????????????}

????????????????cmbServerName.SelectedIndex?=?0;
????????????????btnConnServer.Enabled?=?true;
????????????}
????????????catch(Exception?err)
????????????{
????????????????MessageBox.Show(“枚舉本地OPC服務器出錯:“+err.Message“提示信息“MessageBoxButtons.OKMe

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????????74??2009-01-06?11:00??OPC測試通過\Backup\OPC測試通過\app.config

?????文件??????13180??2009-01-13?15:14??OPC測試通過\Backup\OPC測試通過\MainFrom.cs

?????文件??????21665??2009-01-13?14:06??OPC測試通過\Backup\OPC測試通過\MainFrom.Designer.cs

?????文件???????6014??2009-01-13?14:06??OPC測試通過\Backup\OPC測試通過\MainFrom.resx

?????文件???????3918??2009-01-13?13:55??OPC測試通過\Backup\OPC測試通過\OPC測試通過.csproj

?????文件????????728??2009-01-05?14:04??OPC測試通過\Backup\OPC測試通過\OPC測試通過.csproj.user

?????文件????????477??2008-12-31?14:45??OPC測試通過\Backup\OPC測試通過\Program.cs

?????文件????????655??2009-01-05?14:55??OPC測試通過\Backup\OPC測試通過\Properties\app.manifest

?????文件???????1177??2009-01-05?13:37??OPC測試通過\Backup\OPC測試通過\Properties\AssemblyInfo.cs

?????文件???????2886??2008-12-31?14:03??OPC測試通過\Backup\OPC測試通過\Properties\Resources.Designer.cs

?????文件???????5612??2008-12-31?14:03??OPC測試通過\Backup\OPC測試通過\Properties\Resources.resx

?????文件???????1100??2008-12-31?14:03??OPC測試通過\Backup\OPC測試通過\Properties\Settings.Designer.cs

?????文件????????249??2008-12-31?14:03??OPC測試通過\Backup\OPC測試通過\Properties\Settings.settings

?????文件????????934??2009-01-07?13:24??OPC測試通過\Backup\OPC測試通過.sln

????..A..H.?????17408??2009-01-13?15:14??OPC測試通過\Backup\OPC測試通過.suo

?????文件????????144??2015-12-20?16:40??OPC測試通過\OPC測試通過\app.config

?????文件??????28672??2016-01-19?15:07??OPC測試通過\OPC測試通過\bin\Debug\Interop.OPCAutomation.dll

?????文件????1441792??2011-09-11?08:55??OPC測試通過\OPC測試通過\bin\Debug\Iocomp.Instrumentation.WF40.Common.dll

?????文件?????110592??2011-09-11?08:47??OPC測試通過\OPC測試通過\bin\Debug\Iocomp.WF40.OPC.dll

?????文件??????20480??2016-03-11?15:28??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.exe

?????文件????????144??2015-12-20?16:40??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.exe.config

?????文件??????36352??2016-03-11?15:28??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.pdb

?????文件??????11600??2016-03-11?15:40??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.vshost.exe

?????文件????????144??2015-12-20?16:40??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.vshost.exe.config

?????文件????????490??2012-06-06?18:06??OPC測試通過\OPC測試通過\bin\Debug\OPC測試通過.vshost.exe.manifest

?????文件??????40960??2009-01-05?15:06??OPC測試通過\OPC測試通過\bin\Release\Interop.OPCAutomation.dll

?????文件??????32768??2009-01-05?15:06??OPC測試通過\OPC測試通過\bin\Release\OPC測試通過.exe

?????文件??????32256??2009-01-05?15:06??OPC測試通過\OPC測試通過\bin\Release\OPC測試通過.pdb

?????文件???????5632??2005-12-08?14:51??OPC測試通過\OPC測試通過\bin\Release\OPC測試通過.vshost.exe

?????文件??????13180??2016-03-11?11:00??OPC測試通過\OPC測試通過\MainFrom.cs

............此處省略59個文件信息

評論

共有 條評論