11-21-2011 02:26 PM
I've been working on a master program that will call sub-vis based on input from the user. My sub vi's are excecuted multiple times throughout the program and all of them use shift registers and/or feedback nodes. In the past hooking up a blank constant to the initilizer terminal has worked for me in order to clear data between excecutions but for some reason in this larger program its not working. I think Labveiw may be treating each call of the sub vi as part of the same excecution. Is there a way around this?
11-21-2011 03:03 PM
If the shift registers are initialized, the will reset the shift regsiter data with each call. If you use a globally initialized feedback node, it will only be initialzed on first run and not between calls. That might be your problem. (In both cases it will still initialize between executions).
11-21-2011 03:11 PM
Thank you I'll give that a try... I also found an optionin the configuration of my Feedback node that says intialization and has two options: First call or compile or load. Any idea if that will also work?
11-21-2011 03:20 PM
Create a new input to your subVI called Initialize? (F). Boolean that is False by default. It controls a case structure which either uses the shift register as is (in False case), or has the initialized constants (true case).
Now if you need to Reinit your subVI, wire a True constant into that terminal of the subVI.