08-08-2017 04:10 AM
Hello,
I have create a sub VI for a specific function, however, when I drag 2 of them on the block diagram it's like it is one. the controls have the same memory. How to make each one independent?
Regards,
Solved! Go to Solution.
08-08-2017 04:21 AM - edited 08-08-2017 04:22 AM
Hi idir,
to create two independent instances of the very same VI you need to make it reentrant in its VI settings!
08-14-2017 02:09 AM
Even if I make it prelocated clone reentrant execution, the subvis still share the same memory and act as if it is one.
Even with the PID vi that is proposed by NI, it is the same thing.
08-14-2017 02:18 AM
08-14-2017 02:28 AM
ok. here it is
08-14-2017 03:38 AM
Hi idir,
how do you check the different data spaces when your subVI doesn't use any in/outputs?
Why do you need reentrancy for such a subVI? This only makes sense when you use shift registers inside the subVI!
For me it looks fine after some editing:
(Well, in general I think it would be a good idea to name VIs like "Main" and "sub" instead of "iii" and "vii"…)
08-14-2017 05:12 AM
Thanks a lot for the help.
But I think you didn't get me well.
I want to be able to run the same subvi twice at the same time with access to two front panels of the subvi in order to be able to change some controls. I do not want them to be connectors like I/O.
Thanks
08-14-2017 05:29 AM - edited 08-14-2017 05:33 AM
Hi idir,
But I think you didn't get me well. I want to be able to run the same subvi twice at the same time with access to two front panels of the subvi
Did you say so before?
Just open the frontpanel of both VIs. What's the problem?
(I set your subVI to show it's frontpanel and run the main VI: I can change the control in each subVI independently from the other subVI.)
08-14-2017 05:50 AM
Thanks,
So you mean the use of shift registers is a must?
Regards,
08-14-2017 06:52 AM