为了能直观方便地实现对电机实时控制,采用STM32F103系列微处理器为主控芯片,以电阻式触摸屏为输入及显示终端,设计了基于嵌入式实时操作系统μC/OSⅡ和em Win图形库的电机控制系统。详细介绍了该系统硬件、软件组成及系统搭建。实验显示该系统能通过电阻触摸屏作为输入端实现对X和Y两路电机的加减速及电机的启停和正反转调控,同时能将电机转速及方向信息实时显示。系统显示界面友好、性能可靠、运行稳定且实时响应特性好。
In order to be more intuitive and convenient to realize real-time control of motor, the microprocessor STM32F103 series were used as the main control chip, a motor control system was designed based on embedded real-time operating system μC/OS Ⅱ and emWin graphic library with resistive touch screen as input and display terminal. The composition of the hardware, soft- ware and the construction of the system were designed in detail. The experiment shows the system can achieve the acceleration and deceleration of X and Y two motors and realize start-stop function and forward or backward control with resistive touch screen as in- put terminal and it can reflect motor speed and direction information real-time at the same time. The system interface is friendly, the performance is reliable, the operation is stable and it has good real-time response.