作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2010, Vol. 36 ›› Issue (14): 204-205. doi: 10.3969/j.issn.1000-3428.2010.14.074

• 工程应用技术与实现 • 上一篇    下一篇

基于线程局部存储技术的多通道数控系统仿真

王晓宇,陈吉红,唐小琦   

  1. (华中科技大学国家数控系统工程技术研究中心,武汉 430070)
  • 出版日期:2010-07-20 发布日期:2010-07-20
  • 作者简介:王晓宇(1972-),男,博士,主研方向:数控系统,红外图像处理;陈吉红、唐小琦,教授、博士生导师
  • 基金资助:
    国家 “十一五”重大专项基金资助项目“开放式全数字高档数控装置”(2009ZX04009-011-02)

Simulation of Multiple Channel Computer Numeric Control System Based on Thread Local Storage Technology

WANG Xiao-yu, CHEN Ji-hong, TANG Xiao-qi   

  1. (National Numeric Control System Engineering Research Center, Huazhong University of Science and Technology, Wuhan 430070)
  • Online:2010-07-20 Published:2010-07-20

摘要: 在多实例多线程情况下,ActiveX组件的不同实例共享同一全局数据缓冲区,在改造集成面向过程开发的传统代码时必须修改代码以消除全部全局变量。针对该情况,使用线程局部存储技术实现全局变量的局部化,采用具有大量全局变量的实体仿真代码实现ActiveX封装。该技术已成功应用于基于工业以太网的多通道数控系统中。

关键词: 数控系统, 线程局部存储, 组件对象模型, ActiveX组件

Abstract: In multiple instance and threads runtime system, global variables of the component are shared by each instance. When using ActiveX to integrate historical codes, such global variables must be removed by modifying source code. Aiming at this situation, this paper uses the Thread Local Storage(TLS) technology to realize the localization of global variables, and uses the entity simulation codes which have a large number of global variables to realize the encapsulation of ActiveX. The ActiveX implementation is successfully applied in a new generation of Ethernet based multiple channel Computer Numeric Control(CNC) system.

Key words: Computer Numeric Control(CNC) system, Thread Local Storage(TLS), Component Object Model(COM), ActiveX component

中图分类号: