LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in writing to a property node of a cluster

Hello together!
 
I have a problem in writing to a property node of a cluster which contains several control elements, such as combo boxes or string controls.
I would like to set the options to choose for an array of such clusters.

I tried to do this by writing to property node --> value, but the the control element in the cluster does not remain a control, but instead an indicator. The can't choose one of
the options that I set. So I further set the property node --> indicator (of the cluster) to "False", with the purpose to keep the control as a control. This results in a comment from Labview,
that this is not possible as long as the Vi is not in edit mode. I don't understand this comment. If I look to Labviews toolbar "Operate", I see that I am obviously in edit mode.
 
If anybody could help me, or suggest a better solution to solve my problem I would be very glad.
 
Thanks a lot!
 
Woodi
 
An example of what I tried to do:
0 Kudos
Message 1 of 6
(3,135 Views)


woodi a écrit:
...So I further set the property node --> indicator (of the cluster) to "False", with the purpose to keep the control as a control. This results in a comment from Labview, that this is not possible as long as the Vi is not in edit mode. I don't understand this comment. If I look to Labviews toolbar "Operate", I see that I am obviously in edit mode.

Property nodes are used when you want to access the properties of an object while running, aren't they ?
And you get the error message after trying to run your vi ?
You should not be surprized... be logic ! 😉
 
There have been a number of discussions about acessing the properties of clusters, for instance here or here. I expect you'll find the answer !
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 6
(3,126 Views)
Hi Woodi
had a brief look at your VI.
Made a modification so that you can adjust transducer parameters.

It is not a perfect solution but the idea/ principle should get
you started in the right direction.

You could increase the case selector to accomodate all transducers involved.
Note that it is not essential to mod all values before you 'write' them to cluster
but that could cause a problem in future development.
Likewise if the default case is the orginal transducer cluster then it will overwrite
amended valves in its present setup !!!

Go for it

chow xseadog
0 Kudos
Message 3 of 6
(3,119 Views)

The post by xseadog shows how to use local variables, shift registers and (most important) bundle nodes to change the values of specific elements inside the cluster, but I would like to add something about the error you get.

First, a basic rule about clusters is that a cluster can either hold controls or indicators, but not both.

Second, if you want to set the property of a cluster element, you need to create the property node by right clicking that control and not the cluster itself.

Third, certain properties can only be set when the VI is in "edit mode". This means that the VI isn't running and is not waiting to run after being called from another VI. This is important because you can also access control properties from other VIs, while the VI you're accessing isn't running.
The reason for this is the way LV compiles the code - LV just can't manage with you changing a control to an indicator while the VI is running, because that would change the way the VI works.

To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(3,114 Views)

I took the liberty to modify your VI for an alternative approach (LabVIEW 7.1). You should keep your array of 32 clusters in a shift register and show only a single cluster as a front panel control.

  • Selecting a different transducer from the listbox on the left will load its settings into that control via a local variable.
  • Any changes to the settings will modify the currently selected array element
  • At any give time, a boolean array shows which transducers have changed settings
  • At any given time, a listbox summarizes all settings.

Let me know it this makes sense to you. These are just some ideas, modify as needed. Good luck! 🙂

0 Kudos
Message 5 of 6
(3,103 Views)
Hello together!
 
First of all, thank you all for your great help. As I am a Labview newbie I haven't a lot of experience in working with clusters & property nodes yet. However, there are always a lot of solutions for a given problem, and especially the solution of Altenbach is quite "kind of innovative to me" and I learnt how to go for a problem from an other point of view. I think I will adapt this solution to my problem. Thanks a lot again.
 
I will keep you guys up to date and will hopefully not forget to post my final version ot this problem to this forum.
 
Have a great day
 
Woodi
0 Kudos
Message 6 of 6
(3,089 Views)