MATLAB和无VBA组态软件在喷头测试中的通信研究

    Communication between MATLAB and configuration software without VBA in nozzle property test

    • 摘要: 在喷头测试试验台的控制系统中,工控组态软件因其良好的人机界面等诸多优点被选为主控界面,运行在前台,为了弥补组态计算能力差的不足,选用具有强大工程计算和图像图形处理能力的MATLAB软件作为计算处理工具,运行在后台,以实现优势互补。因工程造价问题,开发中选用了无VBA的组态软件“世纪星”。因此无VBA组态软件和MATLAB间的通信问题成为关键。该文就是针对此问题探讨了4种方法:ActiveX技术、DDE技术、MATLAB引擎技术、MATLAB编译器技术。尤其提出了无VBA组态软件如何利用ActiveX技术与MATLAB通信的新思路和方法,即以Excel宏的VBA编辑器作为桥梁。通过试验结果比较了4种方法的优缺点,以此为依据,在实际开发中可根据实际情况选用不同的方法。在喷头测试试验台的控制系统中对M文件的可移植性要求不是很高,ActiveX技术因其简单、开发周期短等优点而被选用。

       

      Abstract: In the control system of the nozzle measurement test-bed, because of the good man-machine interface and many other merits, the configuration software used in industrial control was selected to be the master control interface and run on the stage. In order to make up the deficiencies of the configuration on computation abilities, MATLAB with the abilities of powerful engineering calculating and image processing was selected as the calculating and processing tool, and run background. Thus it had complementary advantages. The configuration software "Centurystar" without VBA was selected in system development because of the project costs. Therefore the communication between configuration software without VBA and MATLAB became the key issue. This paper discussed four solutions for communication: ActiveX technology, DDE technology, MATLAB engine technology, and MATLAB compiler technology. The paper especially proposed the new train of thought and method, by which the configuration without VBA can communicate with MATLAB taking advantage of ActiveX technology, namely taking the VBA editor in Excel macro as a bridge. And the advantages and disadvantages of the four methods were also compared according to the test results. Based on the results, different methods can be selected in the actual development according to the actual situation. In the nozzle test control system, the requested portability is not so high. ActiveX technology was used because of its simplicity and short developing cycle.

       

    /

    返回文章
    返回