alecjcook Posted February 15, 2017 Report Share Posted February 15, 2017 Hi. I have a vi I am calling time and time again. Sometimes I call the VI its self and sometimes I call a VI which loads a clone instance by reference of the vi. I need a single storage point for this vi, no matter where it is, how maybe threads deep it has got its self, I need a central repository for its data. Can I just use a normal vi as a Functional Global Variable, or do I run the risk of cloning the FGV, and therefor the data inside it? Do I need a single vi, that I call from disk once and talk to it by its queue, (and assign the queue a fixed name) Many thanks, Alec Quote Link to comment
Tim_S Posted February 15, 2017 Report Share Posted February 15, 2017 There's a bunch of ways to create a common storage point... functional globals, global variables, single-element queues, data value references... each one has it's pluses and minuses. A lot of what people use depends on personal preference. You can use a normal VI as a functional global in a cloned VI. The reentrant setting only applies to the VI it is set in (in this case the one you are cloning). All of the subVIs have their own execution state. I'm not clear on your item (2). It sounds like you're thinking of a single element queue, but there isn't a separate VI involved in that. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.