以下是网学网为您推荐的自动化专业-基于工控机的PLC上位机软件开发,希望本篇文章对您学习有所帮助。
论文编号:ZD899 论文字数:11273,页数:41
摘 要
温度检测是现代检测技术的重要组成部分。一般工控现场,通常使用PLC(可编程序控制器)作为系统的控制核心,温度变量经温度传感器(热电偶或热电阻) 采集后,送入PLC的特殊功能单元——温度模块(变送器+模数转换)来实现温控,可是这样的控制不够直观,出现问题时,查找不便。
本次设计是基于工控机PLC来设计上位机的温度控制软件,通过串口通讯来实现上位机对工控机的控制,进而实现整个系统的温控。用VC++设计一个直观有好的用户界面,提供给用户,可以对温度控制进行实时监控,从而可以简单方便地实现对整个温度控制系统的操作控制。
设计中介绍了硬件电路的设计,松下PLC-FP∑及其模拟量输入模块的内部结构和运用,串口通讯协议,模糊控制的原理,以及整体程序的编写。
关键词:温度控制,VC++,模糊控制
Abstract
Temperature detection is an important component of the modern detection technology. In the general industrial scene, PLC(Programmable Logic Controller) is often used the control core of system. The temperature variable is collected by the temperature sensor, and then sent to the special function modules of PLC-- temperature module, which is made up with transmitter and AD conversion, so the process of temperature controlling can be implemented. However, this way of controlling is not intuitive. What’s more, it is not convenience to find matter when something occurs.
This design is a kind of software which is based on PLC. PC gets the control of PLC by serial communication, so that it can implement the control of the whole system.
I design a intuitive and friendly interface and apply it to the users. Real-time monitoring can be realized, and users can operate the system very easily.
In this design, I explain the hardware circuit, and the internal structure of PLC-FP∑ of Panasonic and the analog input module, and serial communication protocol, and the principle of the fuzzy control, and as well as the composing of the whole program.
Keywords: temperature control, VC++ ,fuzzy control
目 录
摘要 ……………………………………………………………………………………….…IV
Abstract ……………………………………………………………………………….………………IV
目录 ……………………………………………………………………………………….…IV
1 绪论 ………………………………………………………………………….…………..….1
1.1 背景及意义 ……………………………………………….………………….……….1
1.2 温度智能控制平台的总体概述 ……………………….………………….………….2
2 硬件系统设计………………………………………………………………………………2
2.1 松下PLC介绍 ……………………………………………………………….….……3
2.1.1 FP∑介绍 …………...………………….……………………………………3
2.1.2 FPX温度检测模块介绍 …………………………………………………….4
2.2 FPX与PC机的串口通讯 …………………………………………………. . .………8
2.2.1 RS232 介绍 ………………………………………………….……….………8
2.2.2 RS232电器特性 ………………………….……………………….……….…8
2.2.3 RS232引脚及设置 ……………………………….…………….……….……8
2.3 电热丝控制电路 ……………………………………………………………………10
2.3.1 温度采集电路 ………………………………………………………………10
2.3.2 外部电热丝控制电路 …………………………………………….…….…10
3 软件控制系统设计 ………………………. …………………………….…………11
3.1 VC软件介绍 ………………………………………………………………………...11
3.2 VC串口通讯控件 ………………………………..………………….………………11
3.2.1 插入MSComm控件 …………………………………………………………11
3.2.2 MSComm串口初始化 ……………………….………………………………12
3.2.3 串口读写 ………………….……………….………………………………12
3.3 PLC通讯协议MEWTOCL ………………………. …. ……………..…………………12
3.3.1写入单触点 ……………………………………….…………………………13
3.3.2读取数据寄存器值 ……………………………………….…………………13
3.4 模糊控制介绍 ………………………………………………………………………15
3.5 VC界面介绍 …………………………..……….……….……………………………19
3.6 程序流程介绍 ………………………………………….……………………………23
4 整体性能总结 …………………………..…………………….………………………22
4.1系统整体结构 …………………………..……….………….…………………………22
4.2整体性能介绍 ………………………….……….………….…………………….……24
5 总结 ………………………………………………………….……………...……………26
致谢 ………………………………………………………….………………. ..……………27
参考文献 ………………………………………………….………………. . .……………28
附录 ………………………………………………………….………………. ..……………29