10-28-2007 10:53 PM
Hi...
Now almost all problems solved in my case except passing value to the subvi.
In one of y cases i have to pass value to the subvi.
I dont know how to pass the value when v r calling the sub vi dynamically.
Please give me a suggestion regarding this.
Thanks
10-29-2007 01:04 AM
10-29-2007 01:15 AM
Hi
Thanks 4 the reply.
I tried that method.
But it was giving me the following error message
Possible reason(s):
LabVIEW: An input parameter is invalid.
---
NI-488: Command requires GPIB Controller to be Controller in Charge.
Method Name: Control Value:Set [Variant]
"value1" not found
Am attaching a screen shot of my block diagram
Thanks once again.
10-29-2007 02:13 AM
10-29-2007 03:56 AM
Hi Parthabe,
Thanks 4 the reply.
I just fixed the problem.It was due to the fact that i havent given the control name,the name of the subvi's control.
Instead i gave the passing value's control name(instead of receiving control's).
One more doubt...
In the sub vi which is dynamically called from the main vi,i have a button to close the vi.On that button's mouse down event i have wired true constant to while loops conditional terminal.So on that button's mouse down event the subvi will be closed and can be back to main vi.
But now i can close the window only by close window button.
I can not close it by my applicatio's close button.
Why its like this?
10-29-2007 04:09 AM
@user_1 wrote:
One more doubt...
In the sub vi which is dynamically called from the main vi,i have a button to close the vi.On that button's mouse down event i have wired true constant to while loops conditional terminal.So on that button's mouse down event the subvi will be closed and can be back to main vi.
But now i can close the window only by close window button.
I can not close it by my applicatio's close button.
Why its like this?
Since you ve wired a constant to the while loop of the SubVI, the value of the Close button of your MainVI wont get passed to the SubVI at all.
What you ve to do is change the constant of the loop's conditional terminal of the SubVI into a Control & adapt the same method of Set Control Value to pass the value of the Close button of the MainVI into the SubVI. ![]()
Hope this helps...
I think you better change the architecture of your program from the Run Vi method to the VI Server-Call by Reference node method to call the SubVIs dynamically, because you seem to increase the parameter passage from hte MainVI to the SubVI one-by-one daily. So, it is going to be really more painful to establish the whole architecture of your program when it grows bigger n bigger.
Search the Example Finder in the title of VI Server to know more about calling VIs dynamically thro' the Call by Reference method. It is rather simple in the sense you ve to adapt a consistent Connector Pane pattern to call the VIs of your choice. ![]()
10-29-2007 04:30 AM
Hi Parthabe.
Thanks again 4 the suggestions to improve my program design.
I will try that method 2.
"Since you ve wired a constant to the while loop of the SubVI, the value of the Close button of your MainVI wont get passed to the SubVI at all."
But actually my close button is in my subvi only which tells the subi to close.
Still the same problem will be there.
Actually i was calling my vis statically so far.
But as the need arised i have to change to dynamic calls.
So i am making trials.
I thought there is no difference between call by reference and dynamic calls.
Thanks once again 4 the timely helps
10-29-2007 04:58 AM
@user_1 wrote:
But actually my close button is in my subvi only which tells the subi to close.
@user_1 wrote:
I thought there is no difference between call by reference and dynamic calls.
Ya, both are same. In fact, a dynamic call to a VI usually means thro' the VI Server-Call by Reference methodology. This is for strictly-typed VIs, meaning where all your dynamically loadable VIs' connector-pane patterns are clearly defined.
The Run VI method is a generic type to launch a VI dynamically without specifying a clearly defined connector-pane pattern. It is NOT a static method to invoke a VI, unlike what you ve mentioned. ![]()
10-30-2007 01:49 AM
Hi
Thank u so much for the info.
I finished every thing and made exe.
The structure of my appn is
mainvi having 4 options that calls different sub vi's by run vi method.And its having a quit button to quit frm the application. (unfortunately i forgot to inactivate the close window button of my main vi.
Then when executed in the server(not by me so i dont know exactly what is the scenario caused error),after closing the application can not open it again for the second time.Also tried to copy it again.Still can not open.What may be the reason for this?
I suspect that.... might have opened one of the child vis and withot closing the sub vi, might have closed the main vi by using close window button(instead of the application's quit button).
Now in the server can not run any labview exe.Its just showing as minimised in the task bar but on clicking its not appearing.Even tried to execute frm a pen drive that also can not in the server
Task manager showing as program not responding.
TRied to run a simple labview exe in the server...that also can not.
Only when running in the server problem occuring....other pcs no problem.
Please help me regarding this
10-30-2007 01:59 AM
Its not the problem with path.
After running the application on ther server for the first time could not run again .
Even simple exes not working on server now.
On other pcs its ok.