07-22-2010 11:37 PM
Hello Every one,
Can any one please please help me out. Iam trying to display a 2-D array in a form of tree and latter split them in to 2- different 1-D arrays.
The 2-D array is of the following form, the first column is the group and the remaining other columns are the group elements. The tree should represent all the groups defined in the 2-D array. If we click the plus (+) sign it should display all the elements in side that group. As shown in the attached vi.
After displaying them in to a tree I need to split the group elements in to two different 1-D array's(because this two arrays is used for other part of my program)
A switch control is provided, which has 2- modes test-1 and test-2.
When the switch is in test-1 mode and if we double click a group element in the tree that element should be copied to test-1 array, similarly if the switch is in test-2 mode and if we double click a group element in the tree that element should be copied in to test-2 array.
Iam attching my vi, which only contains what controls and indicators Iam trying to use.
Thanxs in advance
07-23-2010 05:36 AM
07-23-2010 05:40 AM
@Raghu123 wrote:
[...]
A switch control is provided, which has 2- modes test-1 and test-2.
When the switch is in test-1 mode and if we double click a group element in the tree that element should be copied to test-1 array, similarly if the switch is in test-2 mode and if we double click a group element in the tree that element should be copied in to test-2 array.
What should be copied into the "test-1" and "test-2" arrays? Those are arrays of doubles and you'll get strings from the Tree Control. It will be easy enough once you help me understand the requirements.
07-23-2010 05:46 AM - edited 07-23-2010 05:48 AM
Here's what I'd do quickly if the arrays contained Strings. I'm thinking that the larger scope of the program should be written as a State Machine or some logical sequencer. I'd use the JKI State Machine, myself.
07-25-2010 10:56 PM
Jim,
Thank you for replying to my post. The idea of my work is to develope a user friendly GUI for a testing application.
Jim, I was working with this vi and added few more things like displaying additional data in the column's 2 & 3 and deleting a repeated word if it is double clicked twice etc.I could achieve to some extent, but have some issues with filling the data in the second column. Actually the values in the second column will be updated during run time, so I want to feed the run time data array to this column. If I place the array in the while loop then the program will have 2-while loops(one for double clicking logic, one for run time data logic) so Iam in a confusion what to do. Can you please fix my problem.
Also Jim can we display the tree in a additional front panel instead of my main vi? Like providing a button in the front panel for the user, if he clicks it, a window pops out and dispalys the tree which allows him to select the group elements by double clicking.
Thank you.
07-27-2010 05:59 AM
Hello Jim,
Can you please help me out in fixing this 2- issues.
1) Feeding a run time data array to column -1 and 2) Providing a push button in the front panel which allows the user to click on it, so that another front panel pops out, which has the tree logic.
-Thank you.
07-27-2010 09:52 AM
Using a subVI front panel might help you modularize this. You could call the subVI in an event structure and have it's front panel pop up when it is called. The LabVIEW help mentions how to do this here. I hope that helps you get started.