Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Instrument not found after closing the VI reference

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

0 Kudos
Message 1 of 6
(4,804 Views)

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.

Regards,
Yaskadeva
India AE
National Instruments, India

There are only two ways to tell somebody thanks: Kudos and Marked Solutions 😛
0 Kudos
Message 2 of 6
(4,780 Views)

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

0 Kudos
Message 3 of 6
(4,693 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(4,679 Views)

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

0 Kudos
Message 5 of 6
(4,669 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(4,664 Views)