karthas Posted April 4, 2005 Report Share Posted April 4, 2005 Hi, 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. i have attached the subvi. please help me. bye karthik :headbang: Download File:post-870-1112632398.vi Quote Link to comment
Albert-Jan Brouwer Posted April 4, 2005 Report Share Posted April 4, 2005 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). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.