From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Marc Blumentritt

Add "fork VI" method to VI method nodes

Status: Duplicate

If you want to fork a VI (start a parallel running VI), you have to load the VI reference, use the set control elements values method to initialize the controls of the VI, and than start it with the run VI method without waiting to finish. Quite complicate, if you ask me.

 

It would be cool, if there would be a fork VI method, which you call inside the VI you want to fork. The method copies the VI to a new place in memory including its actual running state. The new copy just goes on as it would without the fork, while the calling VI would get back the values of the ouputs, which they have at the moment of the execution of the fork method. Of course this does only work with reentrant VIs.

 

I can think of a LOT of applications which can use this!

 

Regards,

Marc

CLD
4 Comments
tst
Knight of NI Knight of NI
Knight of NI

Isn't this suggestion simpler? The main difference I see in your suggestion is outputting values in the middle of the VI's run and I can't say I see the point, really.

If you're running a parallel process, you either don't need the outputs or you will need to send regular updates using any global means of communication. The situations where you need a single notification (e.g. successful initialization of the VI) are relatively rare.


___________________
Try to take over the world!
Marc Blumentritt
Member

The idea of using the ouputs was, that the VI to be forked checks first, if everything it needs to run can be accessed without error. If there is an error, just d'ont fork and give out the error. If everything is OK, it could give out e.g. a reference or port number for communicating with it before it forks. Otherwise you have to check all possible errors and create a way of communication before you actually run the VI which you want to fork.

 

Anyway, I like your suggestion about simpler forking, too (and I gave kudos to it last Monday). So I d'ont care, how it is done, when it is simpler then the method you have to use now. So hopefully your or my suggestion will be accepted.

CLD
Jim_Kring
Trusted Enthusiast
This is similar to an idea that I had.  I've posted that here:

Asyncronous Call By Reference

Todd S.
NI Employee (retired)
Status changed to: Duplicate
 
Todd S.
LabVIEW Community Manager
National Instruments