-
MODBUS RTU 51与维纶触摸屏通信例程。
应用背景51和维纶触摸屏的通信。MODBUS RTU 51与维纶触摸屏通信例程。支持的功能码:位:01(读)、05(写),字:03(读)、06(写)还有与数码管显示输入的数据!注释的也比较详细。个人觉得移植性也比较好。各种的单片机上可以移植修改,关键技术51单片机与威纶通触摸屏通讯说明
本程序仅作为一个通信示例程序,实际使用需要根据需要修改。
请使用EB8000 V3.45以上软件打开触摸屏程序,程序为压缩后的触摸屏程序,请使用EB8000软件 工具——压缩/解压缩 菜单下的工具先进行解压缩;单片机使用Keil uVision3 V3.50编译
一、硬件连接
使用ATMEl 89S52单片机。
二、软件
1、通讯环境
触摸屏设置为主站,即PLC 类型 MODBUS RTU,通讯参数设为“9600,N,8,1”。
2、触摸屏程序,需要读取八个位,以及八个字,每次最少读取16个位,字可以一次读取一个也可以一次读取八个。
有0X1-0X8八个位切换开关,6X1-6X8八个字输入元件,支持的功能码:位:01(读)、05(写),字:03(读)、06(写)
当没有写操作时,屏不断的向单片机发送如下码(16进制显示):
01 01 00 00 00 10 3D C6 (位读取)
01 03 00 00 00 08 44 0C (字读取)
此时,如果不给屏发送相应返回值的话,屏就会提示“PLC no response”
3、51单片机程序思路及说明
- 2022-02-02 15:58:29下载
- 积分:1
-
uip协议,小型TCP/IP协议
uip协议,小型TCP/IP协议-East agreements, small TCP/IP protocol
- 2022-08-08 23:27:53下载
- 积分:1
-
线路编码Manchester源代码
线路编码的源代码(Manchester),用于数字通信自适应的源代码
- 2022-08-09 20:29:04下载
- 积分:1
-
中国的RFC3261文档版本,内容非常详细、准确…
中文版本的RFC3261文档,内容非常详细准确,如果觉得英文文档不容易理解,这个文档就比较合适了。-Chinese version of the RFC3261 document, the content is very detailed and accurate, if they feel the document is not easy to understand English, this document would be more appropriate in.
- 2023-08-16 16:45:08下载
- 积分:1
-
China Mobile, the latest message CMPP3.0 Gateway Interface using examples, SP de...
中国移动最新短信网关CMPP3.0的接口使用范例,SP开发必须-China Mobile, the latest message CMPP3.0 Gateway Interface using examples, SP development must
- 2022-04-28 14:33:11下载
- 积分:1
-
some code about 430_3
430_C的一些源代码2-some code about 430_3
- 2022-01-26 06:43:27下载
- 积分:1
-
TCP通信
基于 mobus协议通信的 ,弄个TCP的测试
1、测是
2、下载
- 2022-11-15 06:15:03下载
- 积分:1
-
AN2120,连接M68HC08系列单片机的一个互联网服务提供…
AN2120, Connecting an M68HC08 Family Microcontroller to an Internet Service Provider (ISP) Using the Point-to-Point Protocol (PPP).
- 2022-07-12 12:17:41下载
- 积分:1
-
从m.h.perrott博士论文,关于分数
Ph.D thesis from M.H.Perrott, about Fractional-N PLL design.
- 2023-08-29 02:55:04下载
- 积分:1
-
PCM编码的线性规律,μ律PCM编码的matlab实现
pcm编码 有关线性、A律、mu律的pcm编码的matlab实现-pcm encoded on the linear, A law, mu law encoded pcm achieve matlab
- 2023-03-30 12:55:03下载
- 积分:1