首页 | 本学科首页   官方微博 | 高级检索  
     检索      

控制算法动态连接库的实现与优化
引用本文:周立,张文渊,郑震宇,苏建锋.控制算法动态连接库的实现与优化[J].上海交通大学学报,1999,33(4):428-430.
作者姓名:周立  张文渊  郑震宇  苏建锋
作者单位:上海交通大学,自动化系,上海,200030
基金项目:国家“九五”计划重点科技攻关项目
摘    要:为在大型工业过程控制图形组态软件包(WindowsNT平台上)中有效加入各种控制算法模块,并改善算法与软件包性能,可将算法模块编成动态连接库(DLL)的形式.采用有效方式设置算法模块参数、实现算法模块DLL与主程序的接口统一化,在运行时动态载入DLL,利用WIN32的多线程技术优化软件包.可采用线程局部存储器为各线程创建私有数据存储区,保证各算法不互相干扰.对共亨资源利用互斥对象实现线程间的同步,防止死锁等错误.采用以上技术可使整个模块代码简洁、所占资源少,易于扩充、升级,同时,算法模块的效率与安全性提高,实时性增强.

关 键 词:控制算法  动态连接库  多线程  线程局部存储器  同步  互斥现象
修稿时间:1998-06-22

Realization and Optimization of Control Algorithm DLL
ZHOU Li,ZHANG Wen-yuan,ZHENG Zhen-yu,SU Jian-feng.Realization and Optimization of Control Algorithm DLL[J].Journal of Shanghai Jiaotong University,1999,33(4):428-430.
Authors:ZHOU Li  ZHANG Wen-yuan  ZHENG Zhen-yu  SU Jian-feng
Abstract:In order to add control algorithm modules to the Large Industry Process Control Graphical Configuration Software (on Windows NT platform) efficiently and ameliorate performance of the control algorithm and the software, the algorithm modules should be programmed as Dynamic Link Library (DLL) and be optimized with the multi thread technique of WIN32. An efficient way was used to set the parameters of the algorithm modules. The interface of DLL and main program were integrated and the DLL was loaded during runtime. The multi thread technology was applied to optimize the DLL. Thread Local Storage (TLS) was used to create private data segment memory for each thread and prevent the mutual influence between the threads. Mutes objects were used to realize synchronism of the threads and prevent errors such as the dead lock. By using the techniques above, the code would be more concise and cost less system resource and be easier to expand. The effciency, real time property and security of the algorithm module are ameliorated.
Keywords:control algorithm  dynamic link library  multi  thread  thread local storage  synchronism  mutex  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号