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.
|
我如何编程保存一个全局变量的默认值?
事实上没有直接的方法来完成这件事,这是因为一个全局变量就像一个VI,并且它在内部保存它的值。所以为了能修改一个VI,它必须要先被停止。
一个变通的方法是在主VI中添加额外的延时来等待所有的值被关闭,之后使用第二个VI来保存默认值。
下面是一个例子,打开 toplevel.vi 和reader.vi 可以看到对全局变量进行通讯
|