LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to open multiple subvi's at the same time?

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

 

 

0 Kudos
Message 11 of 29
(1,644 Views)
You ve to use the Set Control Values method to pass values to the SubVI.
- Partha ( CLD until Oct 2027 🙂 )
Message 12 of 29
(1,636 Views)

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.

0 Kudos
Message 13 of 29
(1,633 Views)
Did you try it out with the simple Set Control Value method instead of the Variant one ?
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 14 of 29
(1,626 Views)

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?

 

0 Kudos
Message 15 of 29
(1,618 Views)


@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. Smiley Happy

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. Smiley Happy

- Partha ( CLD until Oct 2027 🙂 )
Message 16 of 29
(1,603 Views)

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

 

0 Kudos
Message 17 of 29
(1,597 Views)


@user_1 wrote:

But actually my close button is in my subvi only which tells the subi to close.



OK, now I understand... Smiley Happy Then simply wire the button to the loop's conditional terminal & pass value for it from the MainVI using the Set Control Value method as done earlier.

@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. Smiley Wink

- Partha ( CLD until Oct 2027 🙂 )
Message 18 of 29
(1,592 Views)

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

 

0 Kudos
Message 19 of 29
(1,569 Views)

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.

0 Kudos
Message 20 of 29
(1,568 Views)