Jump to content

SubVI


Recommended Posts

  I want to run a continuous process. is it possible to put this vi as a sub vi in another VI, since i want to use 4 instances of this subvi at the same time.

4429[/snapback]

You want four instances that run asynchronously? One option

is to create a reentrant subVI and have four while loops,

each containing a call to the reentrant VI. Because it

is reentrant, each diagram reference will have its own

dataspace and can be called at the same time as any other

diagram reference. This is sort of like having four instances.

Another option is to place a static VI reference to a reentrant

VI, wire it to a VI property node that extracts the VI name,

wire that name into "Open VI reference" with the "prepare for

reentrant run" option mask bit set (mask value == 8) and call

the run VI method on the resulting VI instance reference. To

pass instantiation parameters you can call the "Set Control

Value" method on the VI instance before running it.

Neither of the above works when the front panel of the

instance must be visible/usable. For that, you must instantiate

a template (a VI with a .vit instead of .vi extension).

Templates may not be loaded in memory on instantiation,

so you will have to pass an appropriate path to the "Open VI

Reference" call (and call "run VI" on the resulting reference).

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
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.