论文部分内容阅读
针对控制系统的建模和仿真中Simulink和VisualC++(VC)不能直接互用、传统的设计阶段和实现阶段被断开的问题,该文通过利用实时代码生成工具箱(RTW)将Simulink模块图自动转换为C代码、经过少量改写和加入实时控制机制,提供了一种从Simulink模块图平滑过渡到VC集成开发环境的途径,从而实现了设计阶段和实现阶段的无缝连接,省去了在VC中编写模型代码和仿真控制代码的繁琐工作,而且大大便利了系统的二次开发和整合。该文给出了利用此方法开发系统的具体步骤和系统框架,并详细讨论了实时控制系统开发中的定时和资源分配问题。
Aiming at the problem that Simulink and Visual C ++ (VC) can not be directly interoperable with each other in the modeling and simulation of control system, the traditional design phase and implementation phase are disconnected. This paper analyzes the Simulink block diagram automatically by using real-time code generation toolbox (RTW) Converted to C code, after a small amount of rewriting and adding real-time control mechanism, provides a smooth transition from the Simulink block diagram to the VC integrated development environment, in order to achieve the design phase and the realization of the seamless connection, eliminating the need for VC In the preparation of model code and simulation control code tedious work, but also greatly facilitate the secondary development and integration of the system. In this paper, the specific steps and system framework for the development of this system are given, and the timing and resource allocation in the development of real-time control system are discussed in detail.