04-11-2016 07:56 AM
Hi ,
We are calling two VI's in Teststand, out of which one VI initializes the instrument and other VI does the measurement. After the initialize VI is called i am closing the reference for the initialize VI due to which instrument not found error is coming in measurement VI. If the reference is kept open the error is not coming, i want to ask does closing the VI reference has any effect on VISA resource also?
Thanks
04-12-2016 12:14 AM
Hi Choudary,
First of all you have to pass the instrument reference between the two code modules of TestStand i.e between the initialize vi and the measurement vi. Then only the measurement vi will have a reference to operate on.
In your question you have mentioned that you have closed the vi reference, can you explain what is that or share some vi's and seq's so that people can understand it clearly.
04-19-2016 09:14 AM
Hi parkalaae,
Thanks for the reply,
for passing Instrument reference we are using the Functional global variable, using FGV we are storing the VI reference in initialization step and using the same reference in measurement step. we are closing all the VI reference after every step, somehow after closing the VI reference the FGV is getting out of memory. Is there any relation between closing VI reference and FGV in teststand? i tried in labview and there doesn't seems to be any issue even if we are closing the VI reference but in teststand is the behavior different?
The code has lot of subvi's in hierarchy so it is difficult to attach here.
Thanks
Ritu
04-19-2016 02:10 PM
RChoudhary wrote: Is there any relation between closing VI reference and FGV in teststand? i tried in labview and there doesn't seems to be any issue even if we are closing the VI reference but in teststand is the behavior different?
Yes, the TestStand behavior is different. You need to have a VI in memory that references that FGV in order for the FGV to stay in memory. If you are closing the VI references, then you release that VI hierarchy, likely including the FGV.
04-19-2016 07:37 PM
Hi crossrulz,
Thanks for the reply,
since in our VI we need to close the VI reference as keeping VI reference open is causing memory leaks, is there any way to use use FGV in teststand as we need to pass the VISA session information from initialization step to measurement step which gets stored in FGV.
Thanks
Ritu
04-19-2016 08:01 PM
The dirt simple solution might just be to have another VI (like an Initialize.vi) that calls the FGV. Make sure that VI does not leave memory.