LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call and Execute Multiple Windows of the same VI

Hi,

 

I would like to call and execute multiple windows of the same VI.

 

Please take a look for my attached vi, and start from the 2x2.vi, i think you have to re-enter the file path to run (sorry for inconvenience).

 

If I click the start button in different sub panels, the sub vi(Temperature Analysis.vi..& etc) should be called out in multiple windows, hold it, and run simultaneously.

 

But now the problem is, the sub vi is called out 1 by 1 until it is finished prior the second sub vi is called.

 

May I know how to solve that?

 

Thanks.

0 Kudos
Message 1 of 7
(4,262 Views)

Check out the "options" for open vi ref. I tried briefly with 0x140. Looks like you'll need static refs, somewhere.

 

0x40 Enable simultaneous calls on reentrant VIs—Use this option flag when you want to use multiple Call By Reference or Start Asynchronous Call nodes to execute clones of a reentrant target VI in parallel, as when you use these nodes within a For Loop with parallel loop iterations. This option flag enables parallel execution because it gives each Call By Reference node access to the data spaces of the clone VIs. If you do not use this option flag, calls to the same target VI execute one at a time because they must wait for access to the same data space. Refer to the AsynchronousCallAndCollectUsingOption0x40 VI for an example of using this option flag.
The 0x40 option flag is valid only in the following situations:
  • The target VI is reentrant and shares clones.
  • The target VI is reentrant, and you also include either the 0x80 or the 0x100 option flag.
Note  LabVIEW returns error 1591 if the 0x40 option flag is not valid for the target VI or the other included option flags.
Message 2 of 7
(4,246 Views)

hi,

 

The reason for the behaviour is because your Sequencer.vi is has a subvi called Call VI.vi. Call VI.vi is set to Non Reentrant Execution. This setting is from your menu - File - VI Properties - Execution - Reentrancy. This is currently set to Non-reentrant execution. Change this to Shared clone reentrant execution or Preallocated clone reentrant execution. Save the Call VI.vi.

 

rando

0 Kudos
Message 3 of 7
(4,231 Views)

Hello TanTan

 

1. Open the PopUpmain.vi and select the path of PopUp.vi

2. Enter the number of popups and run the VI.

 

Hope this attached VI will work as per your expection. Please select the less number of instances Smiley Very HappySmiley Very Happy

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Download All
0 Kudos
Message 4 of 7
(4,225 Views)

hi ranjit.. can u please tell me how to call required vi one by one? 

0 Kudos
Message 5 of 7
(3,821 Views)

can u explain me the procedure for the call and execution work u have done? please? or any refference?

0 Kudos
Message 6 of 7
(3,796 Views)

Check "Call by reference" help and examples, they should explain it well.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(3,780 Views)