10-05-2010 08:08 PM
iam just learning programming in labview. some one help me. I want to develope a tree so that when ever a new element is detected in the input array(parent -> array name) a new node should be created in the tree, below the last node , also adding the child nodes in the tree taking corresponding elements form the child array.
But my vi is creating nodes once again taking elements from the starting of the array. can any one please fix this.
Solved! Go to Solution.
10-05-2010 08:48 PM
Because you have a while loop around the major part of your code that builds the tree that runs as quick as possible until someone presses the stop button.
Perhaps you want to use an event structure that detects changes in either of the two arrays, and when that happens the tree building executes one time, but starts at the delete tree again to blank it out.
What is the ultimate purpose for this tree? Is it going to be used as a control for some other critical part of your program?
10-05-2010 09:21 PM
Ravens Fan, this will be only as a indicator. Its not going to be a control for my other part of program.
10-06-2010 12:08 AM
Hi sulekha,
Can you post your code in Labview 8.5 ?
10-06-2010 12:08 AM - edited 10-06-2010 12:10 AM
I can not open your code as I am using labview 8.5. You can even post .JPG file of your Block diagram
10-06-2010 02:00 AM
Here is in labview 8.5 version.
10-06-2010 03:38 AM - edited 10-06-2010 03:38 AM
Hi sulekha,
You need to use an event structure. Use "Value Change event".
10-06-2010 08:15 AM
Gak, pls bare with me Iam new to labeview,even though Iam using the evnt structure with value change event in it, still seeing the same result and more over Iam unable to stop the vi when i hit the stop button. Can u pls let me know how to insert the event structure inside the while loop. I think Iam missing some thing because vi is not even allowing me to stop the execution.
10-06-2010 01:52 PM
10-06-2010 11:16 PM
Hi sulekha,
Check this example.