LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating a Cluster

I just have a quick question about updating a cluster on the front panel.  The image attached shows what my problem is.

If you run this, it only updates the "output cluster" on the front panel.  I know that it has updated the original cluster, but I want to know why it doesn't show that it does.  My concern is that I have a larger cluster in a program that I pass through a state machine in a shift register, and I would like to update it on the front panel...  but it just doesn't show up.  This can be confusing to a user, who would expect a light to come on for an error, for example.  Is there something I'm missing here?


Message Edited by Novatron on 08-26-2005 11:42 AM

0 Kudos
Message 1 of 14
(4,862 Views)
But you're not updating the original cluster. You have two separate objects - one called "Cluster" and the other called "output cluster". All the original cluster is doing is defining the data types and names of the output cluster and you can do the same thing with a constant that you create from "output cluster". If you want to update the original cluster, write to a local variable of it.
0 Kudos
Message 2 of 14
(4,850 Views)
Hello!
 
How can we implement statement A=A+1 in LabVIEW ?
The only way to modify front panel object is to pass data through either terminal or local variable or control reference. We have no access to the "control memory" so we don't know that value has been changed. To do this we must look for the input wire (memory dump) after the node has completed. It's impossible.
 
 

Jack
Win XP
LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
Let us speek Russian 🙂
0 Kudos
Message 3 of 14
(4,851 Views)
How about a shift register? I meant to include that in my previous post as an alternative to writing to a local variable but hit the submit button too quickly.
0 Kudos
Message 4 of 14
(4,851 Views)
That's just the thing.

In the application in which I'm using this, I can access the elements of the cluster in another frame of the state machine (without having stored the cluster back into a local variable, but I did pass it through a shift register), and they have been updated. 

Updated accodring to their value, but not according to the front panel.  I know that the value has updated because I have things triggered by the value.
0 Kudos
Message 5 of 14
(4,852 Views)
Ahh, just saw your last post.  Yeah, it goes into a shift register, but still doesn't update the front panel.
0 Kudos
Message 6 of 14
(4,851 Views)
Dennis, I mean front panel object value.
When I teach my students they have been to develop seven manner of the factorial computing. Certainly shift register is one of them 🙂

Jack
Win XP
LabVIEW 6.1, 7.0, 7.1, LabWindows/ CVI 7.1
Let us speek Russian 🙂
0 Kudos
Message 7 of 14
(4,847 Views)
Try the attachment. Post your VI so we can see what the problem is.
0 Kudos
Message 8 of 14
(4,846 Views)
Sorry for the delay, I was eating my lunch!

I tried your attachment, and it works as I thought it should, because you're storing the value back into the cluster itself, not just a shift register.  The vi attached doesn't do that, it uses the cluster itself to initialize the shift register.  Ignoring the fact that that is probably not the right thing to do (although if it isn't, how come - aside from this reason), that's why I'm seeing the behaviour I am.

I didn't attach my real vi, as there's no sense in attaching a very large library when I can show the behaviour in a small on (attached).  Just run the vi, click on "Update Boolean", note that the indicator in the cluster does not change.  While it's still running, click the "Show Boolean Value" to pass the value of the boolean in the cluster to the indicator to the right of the button ("Boolean Value").

That shows that the value IS stored in the cluster, but it's just not updated in the cluster...

Thanks for taking the time to look at this!
0 Kudos
Message 9 of 14
(4,836 Views)
There are actually two or three different variables in your example. The Cluster is one. After it passes through the left terminal of the shift register it is another variable. The third is at the output of the while loop. The control and the wire only represent the same variable until you enter another node where the value can be modified. (One of the real LV Gurus can probably provide a more precise definition). See the attached modification of your VI. Further modifying it to use numerics with an Increment fucntion in the Update case might be more useful as an illustration.

Lynn
Message 10 of 14
(4,831 Views)