【实例简介】
【实例截图】
【核心代码】
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using HslCommunication;
using HslCommunication.Profinet.Melsec;
namespace PLC_TestDemo
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
splitContainer1.Panel2.Enabled = false;
btnBreakConn.Enabled = false;
}
#region 建立通讯连接
MelsecMcNet melsec = new MelsecMcNet();
//建立通讯连接
private void btnConnect_Click(object sender, EventArgs e)
{
melsec.IpAddress = txtIPAddr.Text.Trim();
<