I have a VI which can be used as a standalone VI or a subVI. I'd like to determine which instance it is being used in by determining if there is a reference wire into the control or not. So if ref empty, use as a subVI, create a ref, run code , close ref, then stop. If ref is present, use existing ref, run, don't close ref and pass back to main VI, stop.
Starting from scratch it is easy, the ref is either zero, or not. But if if has been used in either state, I now run into a potential error of using an invalid reference. I found a post a few days ago recommending to check the validity of reference before using it, but couldn't find any VIs or prop nodes to do so.
Where can I find these or is there an other method to check for validity of a reference?