资源简介
国外牛人编写的C#modbus协议解析,适合于下位机PLC等。方便您的快速开发
代码片段和文件信息
/****************************************************************************
Modbus - Free .NET Modbus Library
Author : Simone Assunti
License : Freeware open source
*****************************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.IO.Ports;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Reflection;
using System.Diagnostics;
namespace OilField
{
#region Custom Events Args
///
/// Event args for remote endpoint connection
///
public sealed class ModbusTCPUDPClientConnectedEventArgs : EventArgs
{
#region Global Variables
///
/// Remote endpoint
///
IPEndPoint remote_ep;
#endregion
#region Parameters
///
/// Remote EndPoint
///
public IPEndPoint RemoteEndPoint
{
get { return remote_ep; }
}
#endregion
#region Constructor
///
/// Constructor
///
/// Remote EndPoint
public ModbusTCPUDPClientConnectedEventArgs(IPEndPoint remote_ep)
{
this.remote_ep = remote_ep;
}
#endregion
}
#endregion
#region Enumerations
///
/// Connection types
///
public enum ConnectionType
{
///
/// Modbus serial RTU
///
SERIAL_RTU = 0
///
/// Modbus serial ASCII
///
SERIAL_ASCII = 1
///
/// Modbus TCP/IP
///
TCP_IP = 2
///
/// Modbus UDP
///
UDP_IP = 3
}
///
/// Type of modbus serial
///
public enum ModbusSerialType
{
///
/// Modbus RTU
///
RTU = 0
///
/// Modbus ASCII
///
ASCII = 1
}
///
/// Type of device
///
public enum DeviceType
{
///
/// Modbus master
///
MASTER = 0
///
/// Modbus slave
///
SLAVE = 1
}
///
/// Tabelle del database modbus
///
public enum ModbusDBTables
{
DISCRETE_INPUTS_REGISTERS = 0
COIL_REGISTERS = 1
INPUT_REGISTERS = 2
HOLDING_REGISTERS = 3
}
///
/// Modbus calling codes
///
enum
相关资源
- C# 基于Modbus TCP的西门子S7200PLC读写例
- ModBUS TCP C#源码实现
- C# modbus RTU 通信
- c#与485MODBUS串口通信源代码
- C#编成Modbus TCP连接PLC寄存器读取、写
- Nmodbus TCP 初版 实现 winform
- NModbus RTU 成果初版 C# WINFROM
- c#与485MODBUS串口通信源代码.rar
- c# 串口设置及发送接收MODBUS数据程序
- C#modbus rtu绝对好用,绝对能用
- libmodbus-3.0.6.tar.gz(modbus协议源码)
- C#IEEE754协议 modbus 4位byte转float
- MODBUS-CSharp socket测试小程序。MODBUS协议
- MODBUS C#串口通讯
- ModbusMonitor VS2010 winform Csharp 开发的一
- NModbus 用C#实现的modbus协议源码
- MODBUS C#写了一款上位机监控软件
- Modbus 用C#实现ModBus读写功能
- CSharp_Serial_Modbus C# 串口例子
- MODBUS(RTU)
- Modbus C# 写的串口通信程序源码
- NModbus4 Modbus是一个C#实现Modbus协议。
- Modbus 一个modbus访问包
- vb.netC#和PLC通过Modbus——TCP通讯代码
- MODBUS C# CRC16校验码计算工具 源码--看
- ModBus协议发送数据——从机和主机程
- C# 串口源码Modbus
- c# modbus tcp
- MODBUS/TCP 协议源代码 c#.net
- C#Modbus通讯帮助类库(串口下的Modbu
评论
共有 条评论