登录
首页 » 通信 » c# plc modibus 通信

c# plc modibus 通信

于 2022-07-10 发布 文件大小:11.75 kB
0 194
下载积分: 2 下载次数: 1

代码说明:

c# 串口 以太网通信 modibus  连接 plc  从文本框输入负数 -2 补码=反+1=进位+原数 Vb 清除输入缓冲区 输出缓冲区 c#用不用清除??哪个函数?? //發送二進制數據 ?????????????? private void SendBytesData(SerialPort serialPort) { ////从 文本框取得数据 如果负数 -2 怎么办???? byte[] bytesSend = Encoding.Default.GetBytes(txtSend.Text); spcom.Write(bytesSend, 0, bytesSend.Length); } 通过MODBUS TCP读写PLC源码 功能模块一:读写PLC主模块 using System; using System.Net; using System.Net.Sockets; public static void WriteWord(int mwAddress,int mwValue) {写字到以太网 if (init_plc() == 0) { try { hi = mwAddress / 256; low = mwAddress - hi * 256; hi1 = mwValue / 256; ///////////16bit low1 = mwValue - hi * 256; sendBuf[7] = 6; sendBuf[8] = (byte)hi; sendBuf[9] = (byte)low; sendBuf[10]

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • GPRS数据传输,能够实现接收数据,发送数据。
    GPRS数据传输,能够实现接收数据,发送数据。-GPRS data transmission, to achieve receive data, send data.
    2022-02-15 23:45:01下载
    积分:1
  • 对线性均衡、判决反馈均衡和最大似然序列估计均衡等三种方法的实现和误码率的分析。...
    对线性均衡、判决反馈均衡和最大似然序列估计均衡等三种方法的实现和误码率的分析。-Of linear balanced, decision feedback equalizer and maximum likelihood sequence estimation of three methods such as balanced realization and BER analysis.
    2022-01-30 14:13:59下载
    积分:1
  • Mainly to receive and send messages to achieve functions. Pneumatic and other IP...
    主要实现接受和发送信息的功能。气动并属兔对方IP后单击连接按钮,来实现,能很好说明。NET在中Socket编程技术 -Mainly to receive and send messages to achieve functions. Pneumatic and other IP is a rabbit and click connect button, to achieve, can be a very good note. NET programming in Socket
    2022-05-05 12:55:56下载
    积分:1
  • 工程博士学位论文目前,EKF的初始对准和惯性的研究…
    工学博士学位论文 目前,扩展卡尔曼滤波是研究初始对准和惯性/GPS组合导航问题的一个主要手段。 但初始对准和惯性/GPS组合导航问题本质上是非线性的,对模型进行线性化的扩展卡 尔曼滤波在一定程度上影响了系统的性能。近年来,直接使用非线性模型的 UKF(Unscented Kalman Filtering, UKF)和粒子滤波,正在逐渐成为研究非线性估计问题 的热点和有效方法。 本文研究了UKF和粒子滤波两种非线性滤波方法,并将其应用于非线性静基座对 准和惯性/GPS组合导航,系统地研究了初始对准和惯性/GPS组合导航中各种非线性项-Engineering PhD thesis Currently, EKF is the initial alignment study and inertial/GPS navigation of a major means. However, initial alignment and inertial/GPS navigation on the nature of the problem is nonlinear. on the model of linear expansion of the Kalman filter certain extent affected the performance of the system. In recent years, direct use of the non-linear model (UKF Unscented Kalman Filtering. UKF) and the particle filter, is gradually becoming nonlinear estimation of the hot and effective method. This paper studies the UKF and particle filter both nonlinear filtering method, will be applied to nonlinear static Base Alignment and inertial/GPS navigation, systematic study of initial alignment a
    2022-07-12 11:49:48下载
    积分:1
  • 推出的短业务开发平台V1.1试用程序,支持移动CMPP协议和联SGIP协议...
    推出的短信业务开发平台V1.1试用程序,支持移动CMPP协议和联通SGIP协议-launched the SMS platform V1.1 trial procedures, support and mobile CMPP Unicom SGIP agreement
    2022-12-07 02:35:02下载
    积分:1
  • sip协议 UAC_UAS例子
    Windows下编译eXosip、osip,以及UAC和UAS的例子
    2022-07-19 18:11:09下载
    积分:1
  • 基于串口的上位机控制软件
    资源描述
    2022-02-20 00:25:49下载
    积分:1
  • WIN32API串口讯程序
    WIN32API串口通讯程序-WIN32API serial communication program
    2022-07-19 13:14:39下载
    积分:1
  • 这是一个封装得比较完整的串口类接口,支持同步、异步操作,使用简单高效,具有工业强度,我在BC, BCB, VC, BCBX, GCC下编译过。...
    这是一个封装得比较完整的串口类接口,支持同步、异步操作,使用简单高效,具有工业强度,我在BC, BCB, VC, BCBX, GCC下编译通过。 封装较完整的串口类库相关文档 封装较完整的串口类库 作者:llbird 本文介绍了一个封装得比较完整的串口类,支持同步、异步操作,使用简单高效,具有工业强度,我在BC, BCB, VC, BCBX, GCC下编译通过,足够应付大多数情况,而且还可以继承扩展。 串口类库的第二个版本 作者:llbird 上一回我发表第一版本的串口类库,收到了不少来信 ,提了不少意见和问题。我前一段时间又对这段代码作了修正,改动较大,主要思路没变,但更加规范并修改了几个错误。这次代码是完全按WIN32命名规范,适合用于VC++的开发,以前我一直用SDK,,用C风格的命名方式,将代码与VC程序整合看起来有点别扭,这次就不会了-err
    2022-06-18 06:03:58下载
    积分:1
  • communications, a similar MSN software, but no less powerful functions.
    通讯方面的,一个类似于MSN的软件,但是功能没有那么强大。-communications, a similar MSN software, but no less powerful functions.
    2023-04-07 09:00:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载