LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a Cluster

This is one of the differences between dataflow programming and traditional programming. In your example the shift register stores updated value and provides one from current to next iteration and so on. We do not know anything about memory where the original data is stored. It is just wires and only wires. Original front panel object stays independantly on the loop until we pass value to its terminal or local variable or control reference.

Message Edited by EVS on 08-26-2005 09:32 PM


Jack
Win XP
LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
Let us speek Russian 🙂
Message 11 of 14
(1,050 Views)
No, I see what you mean.  And that's something I probably should have realized myself...

However, does it stand that it's my mistake for not storing it back into a local variable of the cluster (As Dennis' example would do if the new cluster was replaced with a local), or is this something LabVIEW should know to do itself?  And I realize that having LabVIEW know to do this itself is a "memory" issue as it has to remember where the wire came from originally, but is that really much different than a programmatically triggered event (Value Change anyone?)


0 Kudos
Message 12 of 14
(1,048 Views)
It is not something that LabVIEW should dofor you automatically. What you've basically got is the statement b=a+1 when all you do is update the shift register and that is something you might legitimately want to do and not update a separate variable. The value in the wire is not the same thing as the value of the control unless you assign the value back to the control.
Message 13 of 14
(1,037 Views)
In LabVIEW, data flows from its source (outputs, controls, left shift registers,...) to its destination (inputs, indicators, right shift registers,...). The wire indicates where data comes from and where it is going to. The source, as you seem to think, is NOT updated when data  arrives at its destination.  The wire, unlike pointers in text based programming langages,  is not used to track the source to eventually update it when the computation is done.

When the node "+1" executes, it is not an instruction to increment the data source of the wire, like the statement a=a+1 or a+=1. The data from the source is incremented and then flows to its destination, always in the same direction.


LabVIEW, C'est LabVIEW

Message 14 of 14
(1,022 Views)