针对实时仿真器xPC传统界面单一;难操作;不友好和不能独立脱离Simulink运行问题,本文分析基于LabVIEW开发出一种能够解决以上问题的人机界面。探讨了xPC实时仿真平台界面的开发原理,分别对xPC的接口函数API、LabVIEW的调用库函数节点和界面实现过程及原理进行详细分析,并且在C语言环境开发编写加载和释放API的DLL文件。最后LabVIEW通过调用API构建xPC仿真平台实时控制功能的图形化界面,分析表明利用LabVIEW开发的界面与xPC自带的传统界面相比,更友好,美观,易操作并能脱离MATLAB/Simulink运行,具有一定的工程实践意义。%Because the traditional interface of real-time simulator xPC is single, difficult to operate, not friendly and cannot run without Simulink, the intention of this paper is to develop a Man-interface to solve the above problems based on LabVIEW. The paper discusses the development principle of the interface of xPC hardware simulation platform. The interface functions of API, library function node of LabVIEW, the process and principle of the interface are analyzed in detail, and the xPCInitAPI and xPCFreeAPI dynamic link library are developed to achieve the function of loading and unloading of .DLL files in C language environment. Finally, the graphical interface of real time control function of xPC simulation platform is constructed by calling API. The analysis show that the use of LabVIEW development of the interface is friendlier and more beautiful than the traditional interface of xPC, and easy to operate. Most importantly, it can run without MATLAB/Simulink and has a certain practical significance.
展开▼