Abstract:
To improve the development efficiency of CNC system, this paper proposes a development method of code automatic generation based on domain modeling. Based on the meta-model of CNC domain, a modeling environment for CNC system is created, and based on the mapping rules from model data to source code, model interpreter for target platform are developed. According to different system requirements, system function can be reconfigured at model-level, and source code or configuration file is generated automatically by model interpreter. The method is applied on the development of tow-axis and three-axis motion control systems, and result shows that it can shorten the development cycle and improve the development efficiency for CNC system.
Key words:
domain modeling,
meta-model,
CNC system,
code generation
摘要: 为提高数控软件系统开发效率,提出基于领域建模的代码自动生成开发方法。该方法在数控领域元模型的基础上建立了数控系统的建模环境,以模型数据到源代码的映射规则库为基础,开发了面向目标环境的模型解释器。根据数控产品不同的需求,能够从模型层次对系统功能进行重配置,并通过模型解释器自动生成源代码或相关配置文件。以二轴和三轴运动控制系统为开发对象进行验证,结果证明该方法能有效缩短数控系统开发周期,提高开发效率。
关键词:
领域建模,
元模型,
数控系统,
代码生成
CLC Number:
SHU Zhao-gang; LI Di; HU Yue-ming; XIAO Su-hua. Code Generation Technology for CNC System Based on Domain Modeling[J]. Computer Engineering, 2009, 35(1): 7-9.
舒兆港;李 迪;胡跃明;肖苏华. 基于领域建模的数控系统代码生成技术[J]. 计算机工程, 2009, 35(1): 7-9.