LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous execution of Sub.VIs

Hi
I know that it is possible to execute sub VIs simultaneously (Sub VIs carried out parallel). I have read previous posts, but have not fully understood the way to do it.
 
I have tried changing:  VI Properties -> Execution -> "Normal Priority" to Reentrant. This however seems not to help.
 
In my Main.VI , I call a Sub1.VI which does nothing more than just show values in a Table. (While loop which ends with STOP button). Later I would like to do a Limit_Checking_Sub.VI which monitors the Main.VI throughout the entire Main.VI
 
Is it possible that even though I dont close Sub1.VI, I can execute sub2.VI in the Main.VI??

Thank you in advance.
0 Kudos
Message 1 of 3
(4,423 Views)

Hi davincy here we have 2 different Issues, and that’s what I think caused the confusion.

Normally in LabVIEW when you have 3 instances of the same subVI, what it would do is create a single space VI in memory and it will become a shared resource, this will make that it can be only used by one of the calls at a time. When you make it reentrant what LabVIEW will do is create the 3 VIs, in memory allowing parallel access to this code, this doesn't mean that the dataflow will continue. This is useful to achieve higher processing speed but consumes more memory in the computer. 

 Now for making your VI running, and not stopping because of the while in the subVI, there are 2 options:

The first and easier one is just place the SubVI outside the main loop. As it has a loop in itself it will continue running, and won’t affect the dataflow in the main cycle.

The other option is using a dynamic call with VI Server trough property nodes, and configuring it to not wait until finished.

Best regards



Message Edited by BeCeGa on 12-20-2007 02:52 PM
Benjamin C
Principal Systems Engineer // CLA // CLED
Download All
0 Kudos
Message 2 of 3
(4,402 Views)
0 Kudos
Message 3 of 3
(4,382 Views)