From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
|
.mlv
文件中的变量数据进入缓存中,那么是否有任何的LabVIEW文件I/O函数可以以.mlv
文件格式创建文件呢?MathScript .mlv
文件格式是二进制文件格式。没有任何的LabVIEW文件I/O函数直接以该形式写数据。然而,你可以在LabVIEW VI中使用MathScript节点保存.mlv
文件,然后以下方格式调用该节点中的save
函数:
save filename
filename
输入端不应该包含一个路径或是文件扩展名。LabVIEW保存文件至默认的数据路径。改变默认的数据路径,在LabVIEW MathScript 窗口中选择,文件 » MathScript。
在VI运行之后,你可以选择工具» MathScript窗口,来打开LabVIEW窗口,然后使用load
函数将输入变量从保存的文件中加载到缓存中。save
函数与load
函数使用的是相同的语法。在LabVIEW MathScript 窗口右上角的变量页面中检查目前在缓存中的变量,可以验证以上过程成功运行。
附件中的Save MathScript Data VI
包含了一个使用MathScript节点保存文件的例子。在图一中你可以看到,输入值被保存至文件,然后可以使用load
函数以相似的语法将输入值读回。带有感叹号的黄色三角表明这个指令的执行会非常缓慢。
I
图片1: Save MathScript Data VI程序面板
|