LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically know what controls in a cluster are modified?

I have a large cluster of controls that are available to the user. I am trying to develop a Labview program that can know what controls within the cluster were modified. I have test configurations saved on the hard drive that I want to modify using this cluster. The problem is that the control is a template of the saved data that I am trying to modify. So opening the file and writing the control values overwrites values that I do not want changed. So in short I want to change certain controls within a cluster. The next step is to open the file and change ONLY the control values that I had the user change on the front panel. I have been spinning my wheels trying to come up with a way to do this. I would appreciate any insight to this problem.

 

Thanks,

Troy

0 Kudos
Message 1 of 13
(3,747 Views)

Hi Troy,

you can use a property node to get all references of the controls in your cluster. You will get an array of references. You can go through the array and read all the values you need.

Mike

Message 2 of 13
(3,740 Views)
I am not sure I followed you but equals (=) is polymorphic and can compare two clusters returning a cluster of booleans determining if 2 cluster elements have the same value.  I have used this for comparing if a complex cluster has changed between itterations.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 13
(3,736 Views)

Mike - I have been trying to do what you have explained here. I am not getting the idea. Could you give me an example of what you are talking about? I want to find out which control in the cluster has changed and output that control to update the test configuration files.

 

Thanks,

Troy

0 Kudos
Message 4 of 13
(3,717 Views)

Paul - I have implemented the technique you have explained. Now I have to determine what value in the boolean cluster is false then output that control name to update my files with that control value only. Thanks in advance for any help.

 

Troy

0 Kudos
Message 5 of 13
(3,715 Views)

This code will reveal which value changed.

 

You can then use the property node to read the value.

 

Put the search in a loop to find more than one value that has changed.

 

Ben

Message Edited by Ben on 08-28-2008 08:54 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(3,711 Views)
Ben - This is working so far and I thank you for you efforts in helping me. I have the VI written so I can now see what controls have changes, the names of them anyway. Now the last part I am working on is how to change only the values in the original cluster that have changed with the new values. Again thank you in advance for you help.
0 Kudos
Message 7 of 13
(3,691 Views)

Please read through this Nugget on exploiting control references.

 

Don't worry if you get lost before you finish it. Just read far enought to get some idea on how to access the elements of the cluster you are after. You can always go back and read more after you are more comfortable with LabVIEW.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 13
(3,686 Views)
Ben - Once agan I appreciate your help. I am sure I can work through this from here using the nugget.
0 Kudos
Message 9 of 13
(3,670 Views)

Ben - Ok I thought I could work through this but there is something I am just not getting. I have attached an example of what I am trying to do with explanations both on the front panel and the block diagram. If you could take a look and comment that would be great. I appreciate your time.

 

Thanks,

Troy

0 Kudos
Message 10 of 13
(3,648 Views)