Jump to content

Running a sub-VI twice (or more) at once


Recommended Posts

Here is a simple test case describing my problem. In the first image I've attached, I have a parent VI which calls a child VI twice. The task of the child VI is trivial. It waits 10 seconds, then turns on a boolean switch.

The trouble is that when the child VI is called twice at the same time, the program will run a single call at a time, putting the other call(s) on hold until the first finishes execution. This is shown in the second and third image, and the end result is shown in the fourth.

If I have a subVI that performs a single task, and it is used in many locations across a large program, it seems very limiting to only allow it to run once at a time. Is there a way to enable a VI to be accessed and executed simultaneously in different areas of a circuit? This seems like a fairly basic feature to me, yet I cannot find any information on this problem.

post-17594-12750707548_thumb.jpg

post-17594-127507076653_thumb.jpg

post-17594-127507077352_thumb.jpg

post-17594-127507078056_thumb.jpg

Link to comment

Here is a simple test case describing my problem. In the first image I've attached, I have a parent VI which calls a child VI twice. The task of the child VI is trivial. It waits 10 seconds, then turns on a boolean switch.

The trouble is that when the child VI is called twice at the same time, the program will run a single call at a time, putting the other call(s) on hold until the first finishes execution. This is shown in the second and third image, and the end result is shown in the fourth.

If I have a subVI that performs a single task, and it is used in many locations across a large program, it seems very limiting to only allow it to run once at a time. Is there a way to enable a VI to be accessed and executed simultaneously in different areas of a circuit? This seems like a fairly basic feature to me, yet I cannot find any information on this problem.

Go into VI settings (File->VI Properties) and in there select the Execution section. In there enable reentrant Execution and read some online help to understand the effects and possibilities of the two options in there.

Link to comment

Go into VI settings (File->VI Properties) and in there select the Execution section. In there enable reentrant Execution and read some online help to understand the effects and possibilities of the two options in there.

Excellent. Thanks for the quick response. Often I find the hardest part of solving a problem is knowing the right terminology to describe it.

I think I have enough info now to research the repercussions of concurrent VI instances. Thanks again!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.