LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

show the front panel when its called

Hi,

 

I have a two subVI(Trail1 and Trail2) and one mani VI. i would like to show the front panel when its called(click event) and close afterwards if originally closed for these two subVI from mainVI. I selected the option in customize window apperance. so i used two button(switch1 and switch2) in mainVI. Trail1 subVI will show its front panel when i click switch1 button in the mainVI as like as switch2. 

 

I would like to show their respective front panel simultaneously before finish the execution of subVI.  I could not able to show the front panel of subvi whwn other one subvi before finish the execution from MainVI. 

Download All
0 Kudos
Message 1 of 9
(3,433 Views)

You must call the VI dyanmically and set the window appearance to be an Non-modal, so that you can access both the sub VI front panles parallely.

 

CallVIDynamic.png

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 9
(3,415 Views)

The way you are calling the VI, the event frame cannot finish until the subVI is finished. Basic dataflow!

 

There are many solutions to this. (e.g. 1. start asynchronous call, 2. place each subVI in its own while loop and event structure, 3. anand's suggestion above, etc.)

 

(It does not make a lot of sense to have the "stop" control on a connector to the subVI. What dod you have in mind?)

0 Kudos
Message 3 of 9
(3,395 Views)

Thank you 

 

 

0 Kudos
Message 4 of 9
(3,355 Views)

Statically: simple, but you must sit there and wait for the subVI to complete before your main VI's thread can continue

Dynamically: you can call whatever VI is out there, as long as it follows your template.  Super cool.  Takes a little extra time to call since it needs to be loaded.  You need to do some extra setup in the executable build to make sure those VIs are included.  If setup correctly, you can have it run off on its own while the thread that called it can continue.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 9
(3,341 Views)

Crossrulz,

"Statically: simple, but you must sit there and wait for the subVI to complete before your main VI's thread can continue"

 

Not exactly that.

 

Run Vi method with Wait until done = false does not care what kind of reference it is.

You can run statically linked VI, continue main VI execution and use queue, events, etc to get data from referenced Vi when it finishes.

 

The difference is:

 

Statically

The vi is inserted into main vi when you put a Static VI reference node. During the build (into executable for example), the VI is already there, you do not include it manually.

Static is a little faster response: VI is a part of main VI, everything is loaded in the beginning, no need to load it in runtime.

 

Dynamically

The vi is inserted into main vi only when it runs Open VI reference. It is not included in executable: compiler does not care if there is anything on Open VI reference file path during building exe. Powers of dynamic control: During run-time you can close this VI, change path, insert a different VI with the same connector pane. Open any number of reentrant VIs, control them independently. Very powerfull tool.

 

0 Kudos
Message 6 of 9
(3,319 Views)

@Alexander_Sobolev wrote:

Crossrulz,

"Statically: simple, but you must sit there and wait for the subVI to complete before your main VI's thread can continue"

 

Not exactly that.

 

Run Vi method with Wait until done = false does not care what kind of reference it is.

You can run statically linked VI, continue main VI execution and use queue, events, etc to get data from referenced Vi when it finishes.

 

The difference is:

 

Statically

The vi is inserted into main vi when you put a Static VI reference node. During the build (into executable for example), the VI is already there, you do not include it manually.

Static is a little faster response: VI is a part of main VI, everything is loaded in the beginning, no need to load it in runtime.

 


You are confused on terminology. What crossrulz said is absolutely correct. A statically linked VI is one you place on the block diagram and wire it into your program.

 

A VI that you run using VI Server is being called dynamically -- regardless of where you are the VI reference from.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 9
(3,286 Views)

Mikeporter, thanks for explanation, my bad in terminology.

 

I think that kumuch is asking about static - dynamic VI referencing difference, not about static - dynamic linkage.

 

0 Kudos
Message 8 of 9
(3,254 Views)
The trade-off then between static and dynamic referencing is one of flexibility vs convenience. With a static reference you don't have to worry about remembering to include it in your build, but you are tied to dynamically calling one specific VI. With a dynamic reference you can call any VI, at least in theory, but you have to make sure they get included in a build, and you have to know how to get to them so they can be loaded.

I will typically use static references for standard dialog boxes and the like. However for program plugins, I will use dynamic references. The "best" choice all depends on what you are doing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 9
(3,250 Views)