文章目标:
1.与昆仑通态触摸屏完成TCP连接
2.读写0区、3区、4区寄存
NModbus4使用手册
https://wenku.baidu.com/view/1d50bd321ed9ad51f01df2be.html
public static bool[] coil;
public static ModbusIpMaster master;
public static ushort[] holding;
public static float tex1,tex2;
using Modbus.Device;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
using System.IO;
using Modbus.Utility;
using System.Runtime.InteropServices;
using System.IO.Ports;
using System.Xml.Linq;
using System.Data;
namespace TCP连接测试
{
public partial cla