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

c# plc modibus 通信

于 2022-07-10 发布 文件大小:11.75 kB
0 220
下载积分: 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 个回复

  • procedures for the use of the VB programming language. Use Winsock Control to co...
    本程序使用VB语言编程,使用WinSock控件完成的点对点(P2P)聊天和文件传输程序。可以实现两台机器间互发消息,并且有聊天和文件传输记录,安全可靠。-procedures for the use of the VB programming language. Use Winsock Control to complete the peer-to-peer (P2P) file transfer and chat procedures. Can be achieved between the two machines each other copies, as well as chat and file transfer records, safe and reliable.
    2023-03-09 06:55:03下载
    积分:1
  • 在MATLAB的Gold序列的产生
    Gold sequence generation in matlab
    2022-08-22 18:18:40下载
    积分:1
  • 这是一个简单的软件开发包(SDK),你可以利用这个 GPSLIB 在自己的32位 Windows 应用程序中加入全球定位系统的支持。源代码压缩文件中包含有 GP...
    这是一个简单的软件开发包(SDK),你可以利用这个 GPSLIB 在自己的32位 Windows 应用程序中加入全球定位系统的支持。源代码压缩文件中包含有 GPSLIB 库的源代码和 Demo 程序。很多文件中都有详细的注释说明。为了保证可下载文件的体积尽量的小,压缩文件中不含任何二进制文件。请使用Visual C++ 5 以上的版本编译并生成 DLLs、控制面板程序和可执行文件。-This is a simple software development kit (SDK), you can take advantage of this GPSLIB in their own 32-bit Windows applications to join the Global Positioning System support. Source code compressed file contains GPSLIB library source code and Demo program. Many documents have detailed notes. Downloadable file in order to guarantee as much as possible the size of the small, compressed file does not contain any binary files. Please use the Visual C++ 5 or later to compile and generate DLLs, Control Panel procedures and executable file.
    2022-02-01 17:47:44下载
    积分:1
  • Read the voice encoding and voice recognition speech synthesis
    阅读语音编码与语音辩识语音合成-Read the voice encoding and voice recognition speech synthesis
    2022-06-03 11:44:02下载
    积分:1
  • SYMBIAN OS文件传输的源代码(C++ SDK: 为symbian s60 sdk 3rd)
    SYMBIAN OS文件传输的源代码(C++ SDK: 为symbian s60 sdk 3rd)-symbian os file application system
    2023-09-02 08:40:03下载
    积分:1
  • [源代码]QPSK OFDM 信号的误码率计算
    这段代码 MATLAB 计算误码率"BER"的正交相位 shift 键"QPSK"使用调制方案正交频分多路复用"OFDM"信号,它采取了只在 awgn 信道下的帐户。
    2022-04-09 02:08:56下载
    积分:1
  • adhoc网络dsr协议的matlab仿真
    Matlab实现Ad Hoc网络的DSR路由协议,30个节点,仿真区域大小100x100,通信范围15,位置随机生成(均匀分布),程序以图的形式输出随机生成的拓扑,输出最终路径选择(在图上以线段连接路径),没有实现RRER功能
    2022-01-21 04:57:59下载
    积分:1
  • MRCP V2版本的协议,mrcp2.0主要RTSP协议的修改协议…
    MRCP V2版协议,MRCP2.0主要将RTSP协议修改为SIP协议-MRCP V2 version of the agreement, MRCP2.0 mainly RTSP protocol amending the agreement for the SIP
    2022-02-06 06:49:39下载
    积分:1
  • 使用VB访问WINCC,可实现第三方软件控制S7200的PLC
    使用VB访问WINCC,可实现第三方软件控制S7200的PLC-use VB to visit WINCC, achieving third-party software control S7200 PLC
    2022-01-31 23:48:35下载
    积分:1
  • 集成线性编程接收机的 LDPC 编码 OFDM 信号
    这项研究工作联合检测和解码的 MIMO OFDM 信号。要么利用传统接收机不相交的串行探测器和解码器或需要涡轮增压的 消息检测的两个功能块之间传递和解码。我们提出一种新的方法,可以共同实现检测和解码的低密度奇偶校验 (LDPC) 码 多输入多输出 (MIMO) 正交频司-多路复用 (OFDM) 信号作为一种统一的优化算法。我们的接收机集成的 MIM
    2023-01-03 12:30:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载