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.
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.
10-15-2012 05:43 AM
Hello all,
Can you please tell me how to open multiple instances of same SubVI. One standard method which i know is to convert the vi into vit, use open reference, for loop & convert the subvi exection to reentrant. which is described here.
But i cant use this because i need to pass data to subVI & based on this input only subVI will process the data. If using this method i can pass the data than its great
Problem ?
A subVI which i want in multiple instances will execute different task based on the passed value from the called VI but front panel will same.
10-15-2012 05:45 AM
10-15-2012 06:34 AM
I tried this also than also its not working.
I am sending you my code.
Please let me know.
Each time you press add button from the master.vi by entering the different value. Its creating only value
10-15-2012 07:14 AM
I'm not seeing what your problem is. With the VI set to reentrant, you can just call the VI directly in parallel. With the example you gave, you can only run 1 task at a time. Are you trying to get them to run in parallel?
10-15-2012 07:21 AM - edited 10-15-2012 07:22 AM
Hi Ranjeet,
your subVI can only produce one result from it's inputs as it is working with scalar in-/outputs. What else do you expect?
Right now your subVI will block the mainVI from execution as the mainVI has to wait for the subVI to finish...
10-15-2012 07:47 AM - edited 10-15-2012 07:48 AM
Hey,
Thanks for your time, I just want to call slave.vi from master.vi as soon as i press add from master.vi.
My slave.vi is reentrant. This is what multiple instances means.. am i right ?
i just want to acheive that as soon as user presses add from master.vi by entering different value from master front panel. The slave should add the value & present to output.
Just want multiple run slave.vi parallely.
10-15-2012 07:48 AM - edited 10-15-2012 07:49 AM
Hi Ranjeet,
your slave already does what you want it to do: as soon as you press the ADD button the slave is called and presents the result of the addition...
Oh, you edited your message:
To call the slave in parallel you have to program it in a parallel fashion. Right now there is only one instance...
10-15-2012 08:32 AM
Maybe you need the Asynchronous Call By Reference:
Wait On Asynchronous Call Node
10-15-2012 10:45 PM
Hi GerdW,
I want to run each slave.vi parallely.....tell me how can i program it
10-15-2012 10:47 PM
hi crossrulz,
Can u elobate how can i acheive this. How can i acheive the parallel using the solution