如下图,
用 Property Node(Value) 和 Local Variable 有什么不同点?
已解决! 转到解答。
I performed a search with keywords "Property Node vs Local Variables". And here are the results... Please read them 🙂
Also this discussion thread might be worth to read too.
尽量少用或者不用,很多时候都可以通过数据流的方法解决值传递的问题。
http://www.eefocus.com/csxcs366/blog/08-04/148600_5afb7.html
csxcs_366 wrote:尽量少用或者不用,...
Agree that one should minimize the use of Property Nodes and or Local Variables.
csxcs_366 wrote:...很多时候都可以通过数据流的方法解决值传递的问题。
Nevertheless, unless your software program is gonna be very super small, bored as no friendly GUI/HMI and purely having data-flow, to totally eliminate the use of property nodes and or local variables is quite impossible...
Many times, property nodes have to be used for altering controls/ indicators properties in order to make them user-friendly and meaningful and presentable at runtime.
您是说少用 Property Node 还是 Local Variable ?
“数据流”是什么方法?我不太清楚这个词具体是什么意思。改属性也用数据流?
“数据流” is basically passing data/ information through "wires" within VI, and it is purely for data/ information passing.
Both Property Nodes and Local Variables should be minimized but Totally Eliminate them is Impossible especially for user-friendly programs.
那么“数据流”就是最普通的那种连线了?!
在并行的两个结构之间可以用“数据流”么?我不认为一定可以。
属性节点中的值属性和局部变量,目的都是为了使用控件的值,至于其他,比如外观属性,修改的并非是控件的值。由于外观属性不需要经常改变,而且主要用于顶层VI中,我们可以通过判断,减少它的运行次数,只有需要修改的时候,才调用一次,比如报警。
在使用属性节点值属性和局部变量时,由于需要的是控件的值,因此,精心设计通常都可以避免,比如使用LV2型全局变量、队列等等,在多个线程间传递数据,有多种方法,使用局部变量是方法之一。
早期的LV并没有局部变量,同样可以构建较大的程序,可见局部变量并非必须的,数据流编程方式才是LV的核心。
外观属性用多了对程序有什么影响?