01-30-2013 04:39 PM
The same one that was listed in [I think] the third post or so.
01-30-2013 04:40 PM
At what point is the error generated?
01-30-2013 04:45 PM
It comes in in the RunVI method. Like I said before it is fine with highlight execution on but not off...
01-30-2013 04:54 PM
@joedowdle wrote:
[...] Then as you can see below in the code I have been using to call it - I close the references. Now I can't figure out why it is still running after doing this. The front panel of the subVI will not close until it gets out of the while loop and the only things after that are a close front panel method and a close reference. [...]
When setting "Auto Dispose Ref" to True, you will not stop the execution of the callee VI by closing the reference in the caller, see Run VI Method docu.
01-30-2013 05:05 PM
I modified it to say false now and I still get the same error. I guess I didn't quite understand exactly what the "Auto Dispose Ref" function did. So am I supposed to not close the reference inside the subVI? I open a reference to itself to alter properties and methods and then close it at the end.
01-30-2013 05:14 PM
@joedowdle wrote:
I modified it to say false now and I still get the same error.
Me too.
@joedowdle wrote:
I guess I didn't quite understand exactly what the "Auto Dispose Ref" function did. So am I supposed to not close the reference inside the subVI? I open a reference to itself to alter properties and methods and then close it at the end.
You do not have to close the VI reference in the subVI!
Closing the VI reference in the caller is always a good practice:
If AutoDisposeRef is true and the RunVI method produces an error (like you see it) closing the reference in the caller is appropriate and recommended.
If AutoDisposeRef is False closing the VI reference in the caller should stop the subVI. I am unsure why you observe a different behaviour.
01-31-2013 08:47 AM
If you go back to the previous page and look at the code I originally posted, do you think the problem could stem from closing the reference betfore it's done running? Because I call the subVI and set "Wait Until Done" to false so that the caller VI continues to run. This subVI that comes up is like a notifier to tell the user something is loading and to wait.
If this could be the problem - what could I do to close the reference at the appropriate time (i.e., after the subVI finishes running).
Note: I also removed the close reference VI from the subVI and still had the error. The only close reference VI's are now in the caller.
01-31-2013 09:10 AM
Well I got it to work.... I moved the second call to that subVI to a slightly different place in my code and it works just fine. I have no idea what the difference is but it's working now.