Hi all,
I'm hoping you can help me. I have a main top-level VI (in the form of a template so it can be opened multiple times) which must execute one VI several times, so I made that VI reentrant. I need to both send and retrieve information back from that VI. I call this VI by invoking the "Run VI" method and I can easily send information to it by using "Send Control (varient)", but my problem comes when I try to retrieve information from it.
I know I can't use "Get Control (varient)" because all it would send back is a blank control (since the front panel on a reentrant vi is always blank). I thought my best option would be setting up a queue, but I tried creating a queue on the top-level VI and sending the queue name through to the VI, but it still doesn't work. I know everytime it tries to "obtain" the queue, it is creating a new one reference, but I'm not sure if this is part of the problem or not. Am I creating two queue with the same name? Is that possible? I was hoping it would be as simple as creating the queue in the top-level vi before entering a while loop, filling the queue in a timed loop in the reentrant VIs and dequeuing the elements in the top-level vi loop, but that doesn't seem to be the case.
Am I doing something wrong? I'm assuming it is possible to grab information from a reentrant VI, right?
I know a global would work perfectly here, but then information from the different template instances would end up overwriting or mising together. Plus I know that globals in Labview, in general, are bad. I would like to code this application as clean as possible (and being new to Labview coming from my C++ background is actually a little difficult for me! )
Sorry if this seems like a junior problem, but I really don't know how to get around it.
Oops - last minute information - I am using Labview 7.1, but I am currently upgrading to Labview 8.0 (literally actually, my computer is upgrading as I type!). I'm not sure if they have added anything new to help me, but I'm assuming not, but if so, let me know. I won't have much time to play and explore with unfortunately (deadlines!!).
Thanks so much in advance for any help you can provide me!