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的 ...
随机推荐
- sql server基础学习之引号
create table #(code varchar(20),value int)declare @sql varchar(200) set @sql='insert into # select ' ...
- EntityFramework日志记录
首先在应用启动时执行:DbInterception.Add(new LogFormatter()); 然后加入如下类: #region [ EF的数据库执行日志记录 ] public class ...
- Java良葛格 学习笔记《二》
正则表达式 . 符合任一字符\d 符合0到9任一个数字字符\D 符合0-9以外的字符\s 符合'\t'.'\n'.'\x0B'.'\f'.'\r'等空格符\w 符合a到z.A到Z.0到9等字符,也就是 ...
- C++ 中Hello World的一种写法
/*C++ Hello World**/#include <stdio.h>#include <iostream>int main(){ printf("Hel ...
- Q_DISABLE_COPY
QObject 中没有提供一个拷贝构造函数和赋值操作符给外界使用,其实拷贝构造和赋值的操作都是已经声明了的,但是它们被使用了Q_DISABLE_COPY() 宏放在了private区域.因此所有继承自 ...
- Django urls常用匹配语法
url from django.conf.urls import url from . import views urlpatterns = [ url(r'^articles/2003/$', vi ...
- TextureView+SurfaceTexture+OpenGL ES来播放视频(三)
引自:http://www.jianshu.com/p/291ff6ddc164 做好的Demo截图 opengl-video 前言 讲了这么多,可能有人要问了,播放视频用个android封装的Vid ...
- HDU1171--Big Event in HDU(多重背包)
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Windows API 之 ReadProcessMemory
ReadProcessMemory: BOOL WINAPI ReadProcessMemory( _In_ HANDLE hProcess, _In_ LPCVOID lpBaseAddress, ...
- 剑指offer 整数中1 出现的次数
给定一个十进制正整数N,写下从1开始,到N的所有整数,然后数一下其中出现的所有"1"的个数. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 ...