- 1、本文档共69页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
PAGE
PAGE 63
基于VC++的伺服电机速度控制系统设计
摘 要
本设计完成是基于Visual C++6.0软件下实现伺服电机控制界面的编程,并完成PID控制算法。该控制界面不仅简洁实用,而且具有良好的人机交流部分。
上位机控制界面所实现的功能有电机的启动、停止、正传、反转、速度给定、实时曲线显示等,在完成PID算法后同时下发PID调节后的PWM占空比,实现转速控制。在完成串口通讯编程本文采用MSComm控件实现PC机与单片机通讯,数据的发送与接收采用统一通讯协议,这种方法不仅简单,而且实用。本文采用单片机作为下位机来验证上位机控制功能的实现,单片机作为下位机主要负责直流电机的各种参数数据的采集和模数转换,然后通过串行端口把数据发送给上位机,PC机作为上位机主要负责数据的分析处理和显示。
关键词:伺服电机;VC++;串口通讯;PWM调速;PID;
The servo motor speed control system design Based on VC++
Abstract
This designs core is under the software of Visual C++6.0, realizes the servo motor control contact surface programming, and completes the PID control algorithm. This control interface has not only succinct practical, but also has the good man-machine exchange part.
The superior machine control interface realizes the function has the electrical machinerys start, electrical machinerys stop, electrical machinerys main story, electrical machinerys reverse, the speed value assigns, Curve demonstration and so on. After completing the PID algorithm simultaneously after-crops PID the adjustment the PWM current output.In completing serial port communication programming this article to use MSComm to control to realize PC machine and the monolithic integrated circuit communication, the data transmission and the receive uses the unified communication protocol, in this method is not only simple but also practical. In this article uses the monolithic integrated circuit to confirm the superior machine control function as the lower position machine realization, Monolithic integrated circuit as lower position machine primary cognizance direct current machines each kind of parameter data gathering and with A/D conversion. Then through the serial port the data transmission for the superior machine, PC machine takes the superior machine primary cognizance data the analysis processing and the demonstration.
Key word: Servo electrical machinery; VC++; Serial port communication; PWM control speed; PID;
目 录
TOC \o 1-3 \h \z \u 摘 要
文档评论(0)