智能制造系统上位机软件设计与实现
2018-12-14李周利韩路平
李周利 韩路平
关键词: 智能制造; 线程同步; 实时处理; 软件设计; 数据存储; 程序阻塞
中图分类号: TN705?34 文献标识码: A 文章编号: 1004?373X(2018)24?0125?03
Design and realization of upper computer software for intelligent manufacturing system
LI Zhouli, HAN Luping
(School of Electronic Engineering, Xian Shiyou University, Xian 710065, China)
Abstract: In an intelligent manufacturing control system, the status data and process data need to be saved for analytical processing to obtain the real?time running status of each subsystem. In allusion to the problems of large amount of processing data, much more burst data, and the low processing speed of data storage and extraction, an upper computer software design is proposed for intelligent manufacturing system. Relevant drive and application programs are compiled for the Windows CE 7.0 operating system by using the Embedded Visual C++. The modes of multiple threads, thread synchronization and asynchronous threads are comprehensively adopted to design the software of the data processing system, so as to realize functions of real?time data reception, storage, processing and display of various communication networks. The test results show that the method can effectively resolve the data packet loss problem and the application program blocking problem occurring when there exist busy tasks, which perfectly achieves real?time processing and analysis functions.
Keywords: intelligent manufacturing; thread synchronization; real?time processing; software design; data storage; program blocking
某全自动智能制造的控制系统具有高度自动化和高智能化的优点,在劳动成本和资源节省上有很大优势。其在欧美和日本得到普遍认可,在国内正处于引进消化和研发测试阶段[1]。某全自动智能制造的控制系统由控制各个执行机构的下位机各系统和主要负责人机交互和数据处理的上位机系统两部分组成。其中上位机是一个实时系统,采集数据量和处理数据量比较大,系统中又需同时处理多个任务,需要设计多线程使得多个任务可以并行处理来完成要求的任务。在常见的多线程应用设计中,如GPRS终端虽然也使用多线程技术来接收数据,但是没有大数据的存储和处理的要求[2],有的专注于数据采集[3],有的专注于数据存储[4]。而上位机系统要完成数据采集和下发、数据存储、数据提取和处理、数据分析及结果显示和人机交互等环节的任务,同时在人机交互中要求对操作响应具有最优先处理权。系统任务多又有实时处理的要求,采用多线程技术能够避免某因一项任务长时间占用CPU时间而造成的数据丢失、人机交互界面反应迟钝等问题。
1 智能制造控制系统
某全自动智能制造控制系统框架如图1所示,其中上位机系统基于ARM处理器和Windows CE嵌入式操作系统[5?6]。上位机系统由CAN通信模块、RS 485通信模块、SQLite数据库模块[7]、数据处理模块和人机交互界面等功能模块组成。……
