- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
学习LabVIEW(四)——MATLAB script节点
录入:edatop.com 点击:

这个节点实际上对应了一个MATLAB Automation Server,该Server的Command Window在运行程序之后也会出现。

添加了端口之后需要指定名字,这个名字在MATLAB脚本中作为变量名来使用,如下图所示

但是这样还不能和LabVIEW其它节点的数据流对接。图形语言怎么分类我不太清楚,但LabVIEW给我的感觉比较像Static Type Language,想要让MATLAB script节点顺利接入到LabVIEW框图的数据流上,需要指定输入/输出端口的类型。在端口上点右键,选择类型即可,如下图所示:


程序界面如下:

值得注意的是,在界面上添加数组控件之后,还要往数组控件里放入一个数值控件,表明这个数组是一个数值数组。所以说LabVIEW G语言有种Static Type的感觉。

由于MATLAB script节点中的MATLAB代码都是在MATLAB的Automation Server中执行的,因此我们可以在Server的Command Window中查看各个变量的值:

上一篇:labview编程技巧-----xy
graph如何显示连续数据
下一篇:labview编程技巧-----利用.NET和回调函数实现托盘
标