LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executing subvi in parallel whithout interrupt the main VI

hello

 

inside my state machine application, I need to execute a popup menu that doesn't have to pause the execution of the principal VI.

this popup is using devices that must not be used by the two VI at the same time, so the popup VI must communicate peripheral allowances to the main VI.

 

I tried the available tools "open reference VI" and "call by reference". it executes correctly but still stop the principal VI despite the way it is called.

 

my last solution would be to "destroy" my state machine by adding a second parallel while loop. 😞

 

do you have any idea of what solution I can apply?

 

I would ideally like to keep state machine, but I'm open to any other suggestion.

 

thanks

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 1 of 5
(2,832 Views)
Hi,

use the second parallel loop!

Why should that destroy your state machine?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,826 Views)

Take a look at http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/acbr_call_and_collect/

 

You'll want to create a mechanism to talk between the two and I'm not entirely sure you care about the collect portion of this.  But, it's the general idea.

0 Kudos
Message 3 of 5
(2,822 Views)
What you need is a nonblocking dialog box -- one that opens while letting the rest of the application go on and then signals when the application when it closes.

http://www.notatamelion.com/2014/12/02/adding-a-non-blocking-dialog-box/

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 4 of 5
(2,813 Views)

If the state machine VI and the pop-up VI both need exclusive access to some device and yet the pop-up should not blcok the state machine, you need to do at least two things.

 

First, you need a non-blocking dialog as Mike suggested above.

Second, you need the state machine to be able to detect the fact that the pop-up has control of the device, AND it is designed to continue with other operations while awaiting access. You can probably use the Semaphore functions to implement this.

 

Your description raises a red flag (or at least a yellow cautionary flag) for me. Exclusive access to a resource (the devices) and continued operation without that access seems contradictory.  Perhaps you should take a closer look at the requirements for the performance of the system and at your implementation to see if an alternate approach might resovle the conflict.  You have not given us enough information to even begin to make an educated guess.

 

Lynn

0 Kudos
Message 5 of 5
(2,800 Views)