Freemodbus 1.5
源:http://blog.sina.com.cn/s/blog_4935209001012eax.html
文档位置:http://www.freemodbus.org/api/index.html
- 读输入寄存器 (0x04)
- 读保持寄存器 (0x03)
- 写单个寄存器 (0x06)
- 写多个寄存器 (0x10)
- 读/写多个寄存器 (0x17)
- 读取线圈状态 (0x01)
- 写单个线圈 (0x05)
- 写多个线圈 (0x0F)
- 读输入状态 (0x02)
- 报告从机标识 (0x11)
- 一个异步串行接口,能够支持接收缓冲区满和发送缓存区空中断。
- 一个能够产生RTU传输所需要的t3.5 字符超时定时器的时钟。
对于软件部分,仅仅需要一个简单的事件队列。 The STR71X/FreeRTOS 移植使用 FreeRTOS 队列作为事件队列来减少 Modbus 任务所需要的时间。小点的微控制器往往不允许使用操作系统,在那种情况下,可以使用一个全局变量来实现该事件队列(The Atmel AVR 移植使用这种方式实现)。
实际的存储器需求决定于所使用的 Modbus 模块的多少。下表列出了所支持的功能编译后所需要的存储器。 ARM 项数值是使用 GNUARM 编译器 3.4.4 使用 -O1 选项得到的。 AVR项数值是使用 WinAVR 编译器 3.4.5 使用 -Os 选项编译得到的。
| Module | ARM Code | ARM RAM (static) | AVR Code | AVR RAM (static) |
| Modbus RTU (Required) | 1132Byte | 272Byte | 1456Byte | 266Byte |
| Modbus ASCII (Optional) | 1612Byte | 28Byte | 1222Byte | 16Byte |
| Modbus Functions [1] | 1180Byte | 34Byte | 1602Byte | 34Byte |
| Modbus Core (Required) | 924Byte | 180Byte | 608Byte | 75Byte |
| Porting Layer (Required [2]) | 1756Byte | 16Byte | 704Byte | 7Byte |
| Totals | 7304Byte | 530Byte | 5592Byte | 398Byte |
[1]: 实际大小决定于可支持的Modbus功能码的多少。功能码可以在头文件 mbconfig.h中进行配置。
[2]: 决定于硬件。
- Cortex M3 devices:
-
- Atmel AT91SAM3S.
- ARM devices:
-
- STR71X with FreeRTOS/GCC. See STR71X/simple2.c for an example.
- STR71TCP with FreeRTOS/lwIP/GCC. This port includes FreeRTOS, lwIP and a fully working PPP stack. The lwIP, PPP and FreeRTOS part is generic and therefore can be used for other ports ( or other projects ).
- LPC214X with Keil. See LPC214X/demo.c for an example. This port uses the Keil ARM Compiler 2.41.
- AT91SAM7X with FreeRTOS/Rowley. See AT91SAM7X_ROWLEY/demo.c for an example.
- AVR devices:
-
- ATMega8/16/32/128/168/169 with WinAVR. See AVR/demo.c for an example.
- Coldfire devices:
-
- MCF5235 with GCC. See MCF5235/demo.c for an example.
- MCF5235 with CodeWarrior and FreeRTOS port for ColdFire. See MCF5235CW/demo.c for an example.
- MCF5235/TCP with GCC. This port features FreeRTOS and the lwIP stack. The lwIP part is generic and therefore it should be used as a basis for other lwIP ports.
- MSP430 devices
-
- MSP430F169 with Rowley Crossworks. See MSP430/demo.c for an example.
- MSP430F169 with GCC. See MSP430/demo.c for an example.
- Z8Encore devices
-
- Z8F6422 and Z8F1622 port. See Z8ENCORE/demo.c for an example. The port uses ZDS II - Z8 Encore! 4.10.1 as development environment.
- Win32:
-
- A Win32 Modbus RTU/ASCII Port.
- A Win32 Modbus/TCP Port.
- Linux:
-
- A Linux (uCLinux or other distributions) Modbus RTU/ASCII Port.
Freemodbus 1.5的更多相关文章
- 移植FreeModbus+ModbusMaster+STM32至RT-Thread(初步)
一.项目描述 目前操作系统在嵌入式软件行业非常流行,在工控组网方面,以后可能会经常使用到Modbus主机+操作系统.Modbus从机+操作系统甚至Modbus主机+Modbus从机+操作系统.但是操作 ...
- FreeModbus 移植于STM32 实现Modbus RTU通信
http://ntn314.blog.163.com/blog/static/161743584201233084434579/ 毕业设计自己要做个基于STM32的PLC能直接跑语句表的,现在看来好像 ...
- FreeModbus for stm32(Keil工程)——精简Modbus slave协议【worlsing笔记】
FreeModbus For stm32:点击下载源码 1.测试环境Keil MDK 4.7a stm32f103c8, PB12为输出线圈, 可以通过Modbus Poll来控制线圈的输出状 ...
- FreeModbus Slave For AVR源代码 精简版2 【worldsing 笔记】
FreeModbus 源码:点击下载 线圈BUG解决(后来发现不一定是BUG) 1.eMBException eMBFuncWriteCoil( UCHAR * pucFrame, USHORT * ...
- FreeModbus 精简版本(Only RTU) for M128 (Modbus Slave)
1.硬件连接: M128 PD3 INT3/TXD1 ---> PC 232COM Pin 2 PD2 INT2/RXD1 ---> PC 232COM Pin 3 GND ...
- 移植FreeModbus+ModbusMaster+STM32至RT-Thread(3、4阶段)
一.简介及进展 经过一个多月的努力,目前项目开发已进入最后阶段.虽然比预期时间有些延迟,但也收获不少,边工作边开源的效率确实还有待提高. 简单说下目前的进展吧 1.目前项目已经在Github中开源,大 ...
- Freemodbus介绍及测试
Freemodbus 1.5 Freemodbus文档1:模块 Freemodbus文档2:寄存器 Freemodbus文档3:配置 Freemodbus文档4:工具函数 Freemodbus文档5: ...
- 【HAL库每天一例】freemodbus移植
例程下载:资料包括程序.相关说明资料以及软件使用截图 百度云盘:https://pan.baidu.com/s/1slN8rIt 密码:u6m1 360云盘:https://yunpan.cn/OcP ...
- freemodbus移植讲解 ZZ
一 为什么要移植Freemodbus 为什么要移植Freemodbus,这个问题需要从两个方面来回答.第一,modbus是一个非常好的应用层协议,它很简洁也相对完善.对于还没有接触过modbus的 ...
随机推荐
- Linux启动流程详解【转载】
在BIOS阶段,计算机的行为基本上被写死了,可以做的事情并不多:一般就是通电.BIOS.主引导记录.操作系统这四步.所以我们一般认为加载内核是linux启动流程的第一步. 第一步.加载内核 操作系统接 ...
- Spring.NET 中的 ADO.NET 数据访问的示例
Spring.NET 1.3.1 中提供了一个使用 AdoTemplate 的完整示例,包括使用泛型和使用非泛型技术进行数据访问,这个示例位于下载的压缩包中\Spring.NET-1.3.1\Spri ...
- 网站的性能优化与安全(高效C#编码优化)
1. Foreach 比 For 性能高30%2. 避免是使用ArrayList, 因为任何对象到ArrayList都有封装为Object,出来还要拆箱. 用泛型去掉3. HashTalbe取代 ...
- jetty访问jsp页面出现( PWC6345: There is an error in invoking javac)
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not ju ...
- 多说【最近访客】JS插件通用代码使用方法
多说[最近访客]JS插件可以显示近期访问过你的博客并且已经使用向多说授权过的社交网络账号登录的用户头像,效果如下图所示. 最近访客JS插件的添加步骤如下: 1. 添加多说公用JS代码,每个页面只需添加 ...
- SQL 合并列值和拆分列值
合并列值 表结构,数据如下: id value ----- ------ aa bb aaa bbb ccc 需要得到结果: id values ------ ----------- aa,bb aa ...
- WebRequest 对象的使用
// 待请求的地址 string url = "http://www.cnblogs.com"; // 创建 WebRequest 对象,WebRequest 是抽象类,定义了请求 ...
- asp发邮件控件
<% Set jmail = Server.CreateObject("JMAIL.SMTPMail") ’创建一个JMAIL对象 jmail.silent = true ’ ...
- MyBatis SQL配置文件中使用#{}取值为null时却不报错的解决方案。
原因是因为#{kh_id} 这个参数名为小写,我之前写成了大写{#KH_ID}所以取不到值
- sql server数据库中 INFORMATION_SCHEMA的用法
1.查询数据库的所有表: select * from INFORMATION_SCHEMA.TABLES 2.查询表名为xxx的所有列的信息 select * from INFORMATION_SCH ...