From: Sneff on
What is the advantage of local variables versus property knots (value)?
They tell in the manual, that for every local variable there is always a copy made of the original
input/indicator. If i use the property knots (value) no copy is made.
So what is the use of local variables?
Which methods exits else to avoid too long wires?
 
Sneff
 
 
From: MikeS81 on
Sneff wrote:
...
Which methods exits else to avoid too long wires?
...


Hi Sneff,
"to long wires" doesn�t exists. To use wires is better then everything else! A good solution to have a clearly arranged block diagram is to use a state machine architecture.
Mike
Message Edited by MikeS81 on 05-06-2008 01:43 PM
From: Norbert B on
As Mike already told you, you should try to avoid variables (both locals and globals) just as usage of property nodes value. There are several reasons for this: - Bad diagram design with variables- Trying to work around a bad architecture by using variables instead of switching to a fitting one- race conditions (insecure datamanagement)- performanceissuesBesides that, using variables vs propety nodes (value) are the following:- property nodes are always executed in the UI thread => slow- variables as well as the property node copy the data of the control\indicator in case of reading => exposed, well, predestinated for race conditionshope this helps,Norbert
From: Sneff on
Thank you,
 
but what do you mean with state machine architecture and race conditions?
 
Greetz
 
Sneff
 
From: Norbert B on
<a href="http://en.wikipedia.org/wiki/Race_condition" target="_blank">http://en.wikipedia.org/wiki/Race_condition</a> <a href="http://en.wikipedia.org/wiki/State_machine" target="_blank">http://en.wikipedia.org/wiki/State_machine</a> If you want to know how a state machine in LabVIEW looks like, you should either try the example finder or the "design patterns" in the template browser (File-&gt;New).hope this helps,NorbertEDIT: Updated links for "link-behaviour"Message Edited by Norbert B on 05-06-2008 07:29 AM