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的 ...
随机推荐
- easyui 动态渲染
$.parser.parse 这个 $("div[data-easyuisrc]").html(function () { var url = $(this).attr(&qu ...
- utf8 文件 错误保存为gbk 中文乱码 解决方法
用zend studio 将utf-8 格式的文件 保存为 gbk 了,之后无论怎么装换 中文都是乱码 用 beyond compare(文件比较工具 对编码支持的比较强大) 打开,改下编码,中文就 ...
- springmvc权限拦截器
配置文件spring-servlet.xml <?xml version="1.0" encoding="UTF-8"?> <beans xm ...
- 前台改变asp button控件的值,后台取值没有改变的问题
前台: <asp:Button ID="btnEdit" Style="margin-left: 600px;" runat="server&q ...
- UIImageView 在切图规范的情况下不用设置frame
UIImageView本身是没有frame的,所以UIImageView不用设置frame,UIImageView的fram由它内部的图片决定,所以当要更改UIImageView的大小显示的时候,更改 ...
- code.google.com
https://github.com/couchbase/sync_gateway/issues/492 This list shows the current base import paths, ...
- C++11 半同步半异步线程池的实现
#include <list> #include <mutex> #include <thread> #include <condition_variable ...
- JQuery Each循环遍历每个元素
输出每个 li 元素的文本: $("button").click(function(){ $("li").each(function(){ alert($(th ...
- PID控制学习笔记(一)
比例控制往往会存在稳态误差(该结论适用于0型对象) 由比例度的定义和意义,比例增益Kc越大,即直线的斜率越大,则,越快达到平衡,稳态误差越小,因此在保证系统相对稳定性一定的条件下,总是希望比例增益越大 ...
- popoverController(iPad)
一.设置尺寸 提示:不建议,像下面这样吧popover的宽度和高度写死. 1 //1.新建一个内容控制器 2 YYMenuViewController *menuVc=[[YYMenuViewCont ...