10-16-2009 02:27 AM
hi,
can u clear my doubt with this attachment vi.... i read the message (2,3,5)... sorry for saying i 'm not able to understand to it... dont mistake me... if u its possible clear my doubt im waiting for the answer....
10-16-2009 02:38 AM
10-16-2009 04:53 AM
im trying for my answer.... i need from u ....
10-16-2009 05:05 AM
hi gerdz,
thanks a lot for post.... but i dont want to show front panel of the subvi... the data should select only from the main vi only.... the user should select the data or choose the data from the main vi... pls man...give some other idea...
im begineer of labview... i though subvi will helpful for my project that why i am lot of doubts and confusion....
10-16-2009 05:09 AM
hi,
The graph indicator in the main vi should update as soon as i select the signal from the enum control.... i think u'll understand my question and my doubts..???:mansad:
10-16-2009 05:31 AM
10-16-2009 06:07 AM
hi,
i dont want to open the front panel of the subvi....
i create the sub vi (3 terminal) which has two input(no_of_pins- it'll initiates the For loop and then Enumerator to select the signal to be display) and one output is Graph( it'll display according by the signal was selected)..
My request is pls run only subvi and give no of pin as more than 1 and select the enum for signal... u'll find the waveform in the graph....
And now my question is:
now i create new VI as name as MAIN_Prg.vi should have two control (ie one for the FOR loop and another one is Enumerator for the Signal) and only one indicator as Graph to show the waveform....
the problem after im selecting the signal from the enumerator the signal waveform is updatin in the subvi and the graph indicator is empty.....
i think my question is clear for u....
i begineer for the labview.... pls help me to finish this task....
10-16-2009 06:32 AM - edited 10-16-2009 06:35 AM
Hi srinivasan,
you have to think dataflow...
In the main.vi you select number of signals and kind of signal (enum). Those two values are wired to the sub.vi. The sub.vi receives those values and starts it's while loop. But as you don't want to show that sub.vi the user can't change the enum on the sub.vis frontpanel and so will the while loop run forever...
Solution (as said before):
- don't use loops in the subvi
or:
- show the frontpanel of the subvi
I haven't mentioned before:
- use references of main.vi frontpanel items to get their values in the subvi - but that is overkill in my opinion whit your simple vi
More problems:
You generate more than one signal when #pins is bigger than one. But you receive only one signal in the graph - the last one. Is this intentional?
The user can select a signal, but to leave the loop one has to choose "no signal". The the graph gets cleared too and information on the choosen signal is lost...
10-16-2009 08:20 AM
altenbach wrote:You should probably start with a few simple tutorials and familiarize yorself with the concept of dataflow.
The subVI will only output data to the main VI once the subVI has finished executing. So, once you stop the subvi, the data will go to the main VI.
Bo2008 wrote:Some suggested a delay in the while loop, which I tried but doesn't make a difference.
Who is "some"??? Never listen to "some". 😄 A delay will make a big difference in CPU use, but won't change the outcome. Any UI loop should have a small wait, it makes absolutely no sense to use 100% of the CPU to poll the controls every nanosecond. How fast can you possibly click? 😮
Never Listen to some. Always listen to Altenbach though. Now thats what I call good programming practice 🙂
10-19-2009 01:19 AM
i got the answer... here i attached my file.... i use Control refnum.. in the main_prg.vi and subvi. 🙂
because i want to learn more in labview ... i was post my question in 2 threads.. im sorry for that... after two days i was completed my first module... thank you u guide and then if i have further i'l contact u later...