LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hi All,
 
I have a main vi that calls many subvis like real time display,graph...
 
Suppose i have to view the real time display and without closing the window i have to view graph also.
 
But when i am trying to do like that its not seems to be working.
 
I was able to open only one window at a time.
 
How to open multiple subvis at a time?
 
 
Thanx in advance
 
 
 
0 Kudos
Message 1 of 29
(5,554 Views)
A lot depends on how you have designed your application.
- you can configure your sub-vis to have their FP open when running. Click on the subVI FP icon and select VI Properties. Go to Window appearance, select Customize and then Show Front Panel when called. That way, the FP window will remain open during execution.
Of course, I suppose that this is not exactly what you are looking for.
You can use property nodes to open or close programmatically a subVI FP.
In the Application control subpalette, get Open VI reference, use it to call your subVI, wire the FP.Open property node and you should be almost done. See the attached diagram.

Message Edité par chilly charly le 10-26-2007 06:42 AM

Chilly Charly    (aka CC)
Message 2 of 29
(5,538 Views)
Using the method "Run VI" allows you to start the VI dynamiccaly and you don't have to wait untill the subVI is finished.

Have a look at the following example "examples\viserver\runvi.llb\DateServerUsingReentrantRun.vi".

André
Regards,
André (CLA, CLED)
Message 3 of 29
(5,523 Views)

Hi

Thanks for the replies.

I have a main vi which have 4 buttons...real time display,graph....

In the mouse down event of each button i have called the subvi's by enabling the options(sub vi node setup)-show fp when called and close afterwards if originally closed.

My problem is if i opened real time display and minimise it...then if i am going to click the graph button on the main vi ,the graph window is not opening...ie,can not clik the button for graph without closing the previously opened window(ie,real time display.)

I want to open more than one sub vis that is grap and real time display

How to achieve this?

 

0 Kudos
Message 4 of 29
(5,495 Views)

Like Andre had said, you will have to dynamically launch the VI's.  A normal subVI icon will cause whatever structure it is in to wait until the VI is finished before moving on.  So if you have a subVI icon don't put it in the stucture.  I think Chilly Charlie's diagram may be a bit misleading in this way.

Look at the example VI that Andre mentioned.Smiley Wink

Message 5 of 29
(5,485 Views)

user_1 a écrit: ... My problem is if i opened real time display and minimise it...then if i am going to click the graph button on the main vi ,the graph window is not opening...ie,can not clik the button for graph without closing the previously opened window(ie,real time display.)

You mean the real time display remains minimized ? If this is the case, why don't you use also the FP. State property node ?

Message Edité par chilly charly le 10-27-2007 04:05 AM

Chilly Charly    (aka CC)
Message 6 of 29
(5,488 Views)
Hi
 
Thanx again.
 
I was getting an error when i was doing in the manner i attached
 
the error is.............
 
Possible reason(s):
LabVIEW:  The VI is not in a state compatible with this operation.
Method Name: Run VI

How do i proceed?

 

 

0 Kudos
Message 7 of 29
(5,478 Views)
Quick question.  What is the purpose of setting the value of search to True on the mouse down event of search?  You are either already setting it to true by way of the mouse down, or if it is already down, setting to to false (depending on the way the latch action is set.)  In which case the property node would make it back to true again.
 
Perhaps you need to read the current state of operation for the VI and only do certain actions based on that.  For instance, if it is already running, just do the open of the front panel.  If it is not running, then you do the Run VI node.  I don't know if trying to run an already running VI would cause an error like you are seeing.  I'm sure Charly is much more experienced with these VI server methods than I am.
0 Kudos
Message 8 of 29
(5,476 Views)

Yes u r correct sir.

There was no need to set the value of search to True on the mouse down event of search.I have removed it.

And the ur guess also correct-i have placed the vi in another case also.when i removed it frm there it is ok.

In development mode it can run now.

But when i tried to open in after making exe on the mouse click event the window is not even being shown.

The path may be creating problems?Bs my vi path in another location and i created the exe in another path .Will it cause problems?

Thanks a lot

Message 9 of 29
(5,474 Views)
If you don't compile the subVIs into the executable, you'll have to adapt the path. You can use the application.kind property to determine whether your vi runs in development or run-time (exe) environment and adjust the subVI path accordingly. In an exe you will need to strip path twice to get in the directory where the exe resides.

Hope this helps.
Message 10 of 29
(5,452 Views)