2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > s7300plc串口通信_实现S7-300 PLC与PC机的普通串口通信毕业论文

s7300plc串口通信_实现S7-300 PLC与PC机的普通串口通信毕业论文

时间:2020-11-13 21:20:53

相关推荐

s7300plc串口通信_实现S7-300 PLC与PC机的普通串口通信毕业论文

摘 要

现代工业控制系统通常以PC机为上位机,通过与现场工控设备如PLC等的数据交换与处理,实现对工业生产的过程控制。这就促进了上位机与现场工控设备通信手段的不断发展和完善。

西门子S7-300 PLC因其功能强、速度快、扩展灵活,在广大工业控制领域中占有重要地位。目前,S7-300PLC与PC的通信是通过专用接口卡5611卡和MPI电缆实现的。通信软件为STEP7、PRODAVE_S7_mini以及功能十分强大的WinCC。但是,对于较小的工业控制系统使用这样的软硬件,成本相对昂贵,同时对操作人员的技术要求也较高。本课题着重研究通过VB自编通信程序,使用普通串口,实现上位机与PLC的自由通信。

关键词:S7-300PLC;串口通信;vb

Abstract

Modern industrial control systems are generally in the PC for PC, the field of industrial equipment such as PLC data exchange and processing, the realization process of industrial production control. This will promote the continuous development of computer and the field of industrial equipment and improve the means of communication.

Siemens S7-300 PLC because of its strong function, high speed, flexible expansion, occupies an important position in the field of industrial control. At present, the communication between S7-300PLC and PC is realized by a special interface card 5611 card and MPI cable. Communication software for the STEP7, PRODAVE_S7_mini and powerful WinCC. However, for the industrial control system using the software and hardware that smaller, the cost is relatively expensive, at the same time, the technical requirements of the operator is also higher. This paper focuses on the research on self communication program by VB, using the common serial port, free communication between PC and PLC.

Keywords: S7-300PLC; serial communication; VB

目 录

摘 要1

Abstract2

目 录3

1 绪论4

1.1 引言4

1.2 Visual Basic串口通信技术的研究背景与前景4

2 串口通信6

2.1 串口通信的基本概念6

2.1.1 并行通信与串行通信6

2.1.2 串行通信工作模式7

2.1.3 异步传输与同步传输7

2.1.4 握手信号7

2.1.5 通信参数8

2.2 RS-232串口通信标准9

2.2.1 电气特性9

2.2.2 接口连接器9

2.2.3 近距离通信线路连接10

2.3 计算机中的串行端口11

2.3.1 查看串行端口信息11

2.3.2 串行端口的中断13

2.3.3 串行端口的地址15

2.4 串口通信测试15

2.4.1 系统连接15

2.4.2 温度测量与控制16

2.4.3 计算机串口设置16

2.4.4 串口程序的使用17

3 Visual Basic与串口通信18

3.1 MSComm控件18

3.1.1 MSComm控件处理通信的方式18

3.1.2 MSComm控件的引用18

3.1.3 MSComm控件的常用属性19

3.1.4 MSComm控件的事件20

3.1.5 MSComm控件通信步骤20

3.2 API函数20

3.2.1 动态链接库与API函数20

3.2.2 Visual Basic与动态链接库21

3.2.3 用API文本浏览器声明API函数21

3.2.4 与串口通信有关的API函数23

3.3 直接访问端口23

4 利用MSComm控件实现PC双串口互通信25

4.1 硬件连接25

4.2 软件实现25

4.2.1 MSComm简介25

4.2.2数据监测程序25

4.2.3监测结果26

总 结28

参考文献29

致 谢30

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。