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的 ...
随机推荐
- Software Version
Software Version Time Limit : 3000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) To ...
- caffe卷积输入通道如何到输出通道
今天一个同学问 卷积过程好像是对 一个通道的图像进行卷积, 比如10个卷积核,得到10个feature map, 那么输入图像为RGB三个通道呢,输出就为 30个feature map 吗, 答案肯定 ...
- ORACLE里锁有以下几种模式,v$locked_object,locked_mode【转】
ORACLE里锁有以下几种模式:0:none1:null 空2:Row-S 行共享(RS):共享表锁,sub share 3:Row-X 行独占(RX):用于行的修改,sub exclusive 4: ...
- gnome3
http://askubuntu.com/questions/67753/how-do-i-add-an-application-to-the-dash https://wiki.gnome.org/ ...
- WPF之让ListView中的CheckBox居中显示
第一步:在资源中定义一个居中的样式: <Window.Resources> <Style x:Key="ListViewItemStyle" TargetType ...
- ExceL转PDF
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Excel = ...
- Android OpenGL 入门示例----绘制三角形和正方形
Android上对OpenGl的支持是无缝的,所以才有众多3D效果如此逼真的游戏,在Camera的一些流程中也有用到GLSurfaceView的情况.本文记录OpenGL在Android上的入门级示例 ...
- opencv基础知识------IplImage, CvMat, Mat 的关系和相互转换
Mat,cvMat和IplImage这三种类型都可以代表和显示图像,但是,Mat类型侧重于计算,数学性较高,openCV对Mat类型的计算也进行了优化.而CvMat和IplImage类型更侧重于“图像 ...
- About struct in C
something new: to set value in struct can be in case i cannot view picture.. i write the snippet her ...
- C --> OC with RunTime
前言 本来打算写一篇关于runtime的学习总结,无奈长篇大论不是我的风格,就像写申论一样痛苦,加之网上关于tuntime的文章多如牛毛,应该也够童子们学习的了,今天就随便聊聊我的理解吧. runti ...