摘要
为实施诸如定时数据采集、数据处理、文件存盘等定时处理任务,以实现实时仿真和控制,程序必须能够完成定时和计时功能。介绍了优秀科学计算软件Matlab实现定时处理功能的几种方式,并着重给出了用C语言按照MEX格式编写动态链接库,在Matlab环境中使用系统定时器资源的方法。最后给出了定时采集某工业实际对象的温度,利用Mat-lab强大的数值计算与处理功能建立系统温度模型的应用实例。文中给出的方法可作为Matlab环境中编制数据采集与处理程序,以及开发Matlab与外部程序接口时参考。
Periodical tasks like data acquisition,data processing,file manipulation are preliminary requirements to carry out real time simulation and control,so that programs need timing functional for that purpose.Several methods on how to implement periodic processing functions in powerful scientific computing software Matlab are presented in this paper.Using a timer can extend greatly the periodic processing functions of Matlab.A practical sample of getting data from an industrial plant to build the temperature model in Matlab shows its practicability.The solutions are provided in this paper can help to develop data acquisition and processing programs or interfaces between Matlab and external programs.
出处
《现代电子技术》
2005年第15期76-78,共3页
Modern Electronics Technique