• 大小: 0.45M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-27
  • 语言: C#
  • 标签: PLC  

资源简介


资源截图

代码片段和文件信息


using System.Collections.Generic;
using System;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Data;
using System.xml.Linq;
using Microsoft.VisualBasic;
using System.Collections;
using System.Windows.Forms;


using System.Net;
using System.Runtime.InteropServices;

namespace TcpClient
{
public partial class Form1
{
public Form1()
{
InitializeComponent();

//Added to support default instance behavour in C#
if (defaultInstance == null)
defaultInstance = this;
}

#region Default Instance

private static Form1 defaultInstance;

/// 
/// Added by the VB.Net to C# Converter to support default instance behavour in C#
/// 

public static Form1 Default
{
get
{
if (defaultInstance == null)
{
defaultInstance = new Form1();
defaultInstance.FormClosed += new FormClosedEventHandler(defaultInstance_FormClosed);
}

return defaultInstance;
}
set
{
defaultInstance = value;
}
}

static void defaultInstance_FormClosed(object sender FormClosedEventArgs e)
{
defaultInstance = null;
}

#endregion


EntFxPlc_ADP.PlcClient PLC = new EntFxPlc_ADP.PlcClient();
bool Entlink;
long ScanCount;
int PlcHand;
[DllImport(“winmm.dll“ ExactSpelling=true CharSet=CharSet.Ansi SetLastError=true)]
public static extern UInt32 timeGetTime();


public void Form1_Load(System.object sender System.EventArgs e)
{
this.CenterToScreen();
cmbReadMry.Items.Clear();
cmbReadMry.Items.Add(“X“);
cmbReadMry.Items.Add(“Y“);
cmbReadMry.Items.Add(“M“);
cmbReadMry.Items.Add(“S“);
cmbReadMry.Items.Add(“D“);
cmbWriteMry.Items.Clear();
cmbWriteMry.Items.Add(“X“);
cmbWriteMry.Items.Add(“Y“);
cmbWriteMry.Items.Add(“M“);
cmbWriteMry.Items.Add(“S“);
cmbWriteMry.Items.Add(“D“);
cmbBitMry.Items.Clear();
cmbBitMry.Items.Add(“X“);
cmbBitMry.Items.Add(“Y“);
cmbBitMry.Items.Add(“M“);
cmbBitMry.Items.Add(“S“);
cmbReadType.Items.Clear();
cmbReadType.Items.Add(“INT16“);
cmbReadType.Items.Add(“UINT16“);
cmbReadType.Items.Add(“DINT32“);
cmbReadType.Items.Add(“HEX32“);
cmbReadType.Items.Add(“REAL32“);
cmbReadType.Items.Add(“BIN16“);
cmbWriteType.Items.Clear();
cmbWriteType.Items.Add(“INT16“);
cmbWriteType.Items.Add(“UINT16“);
cmbWriteType.Items.Add(“DINT32“);
cmbWriteType.Items.Add(“HEX32“);
cmbWriteType.Items.Add(“REAL32“);
cmbWriteType.Items.Add(“BIN16“);

cmbReadMry.SelectedIndex = 4;
cmbWriteMry.SelectedIndex = 4;
cmbBitMry.SelectedIndex = 2;
cmbReadType.SelectedIndex = 0;
cmbWriteType.SelectedIndex = 0;
lstRead.Items.Clear();
txtWrite.Text = ““;

cmbCmdType.SelectedIndex = 0;
}


public void butlink_Click(System.object sender System.EventArgs e)
{
short re = 0;
string restr =

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      75776  2018-04-06 23:12  DLL Files\EntFxPlc_ADP.dll

     文件     377024  2018-03-28 10:47  DLL Files\PLC通讯组件使用说明V24.pdf

     文件         19  2017-10-19 20:54  DLL Files\Readme.txt

     文件       1641  2018-04-06 23:15  DLL Files\函数接口.txt

     文件      75776  2018-04-06 23:12  TcpClient C#2010\bin\Release\EntFxPlc_ADP.dll

     文件      24064  2018-04-05 22:53  TcpClient C#2010\bin\Release\TcpClient.exe

     文件      34304  2018-04-05 22:53  TcpClient C#2010\bin\Release\TcpClient.pdb

     文件      11600  2018-04-05 22:58  TcpClient C#2010\bin\Release\TcpClient.vshost.exe

     文件        490  2010-03-17 22:39  TcpClient C#2010\bin\Release\TcpClient.vshost.exe.manifest

     文件       1003  2018-04-05 22:53  TcpClient C#2010\bin\Release\TcpClient.xml

     文件       8320  2018-04-05 22:53  TcpClient C#2010\Form1.cs

     文件      30675  2018-04-05 22:53  TcpClient C#2010\Form1.Designer.cs

     文件       6008  2018-04-05 22:46  TcpClient C#2010\Form1.resx

     文件        510  2012-12-15 19:48  TcpClient C#2010\My Project\Application.myapp

     文件       5609  2018-04-05 22:46  TcpClient C#2010\My Project\Resources.resx

     文件        279  2010-05-04 06:45  TcpClient C#2010\My Project\Settings.settings

     文件       2867  2018-04-05 22:47  TcpClient C#2010\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6506  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        754  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.csproj.FileListAbsolute.txt

     文件        975  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.csproj.GenerateResource.Cache

     文件      25088  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.exe

     文件        180  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.Form1.resources

     文件      36352  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.pdb

     文件        180  2018-04-05 22:53  TcpClient C#2010\obj\x86\Debug\TcpClient.Properties.Resources.resources

     文件       5120  2018-04-05 22:47  TcpClient C#2010\obj\x86\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       5420  2018-04-05 22:58  TcpClient C#2010\obj\x86\Release\DesignTimeResolveAssemblyReferences.cache

     文件       6580  2018-04-05 22:54  TcpClient C#2010\obj\x86\Release\DesignTimeResolveAssemblyReferencesInput.cache

     文件        881  2018-04-05 22:58  TcpClient C#2010\obj\x86\Release\TcpClient.csproj.FileListAbsolute.txt

     文件        975  2018-04-05 22:53  TcpClient C#2010\obj\x86\Release\TcpClient.csproj.GenerateResource.Cache

     文件      24064  2018-04-05 22:53  TcpClient C#2010\obj\x86\Release\TcpClient.exe

............此处省略92个文件信息

评论

共有 条评论