Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA session duplicates every time I run the VI.

Solved!
Go to solution

Hi,

The visa session duplicates everytime I try to run the VI. I checked every possiblity to diagnose the error but I could'nt.

Please refer the attached image for clarity.

Has anybody faced the same problem.

What could be problem and the way to solve it.

TIA

 

Regards,

Aswin

0 Kudos
Message 1 of 7
(3,393 Views)

Are you closing your resource via VISA Close?  That is the only time I have seen that.


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 2 of 7
(3,367 Views)

Yes I do use a VISA Close.

But to explain my program better, it is framed under event case nested in whileloop. So I have two boolean functions to open and close the visa session. (i.e, boolean 'connect' to open VISA and boolean 'Disconnect' to close VISA. Refer the attachment). Here when I open and close the visa the duplicate session does not appear.

 

This error happens if I don't close the VISA and instead press 'Abort execution' button followed by 'Run'.

 

I hope my explanation is understandable. Kindly lemme know if not.

Thanks for your time again.

0 Kudos
Message 3 of 7
(3,356 Views)

Aswin.P wrote:

This error happens if I don't close the VISA and instead press 'Abort execution' button followed by 'Run'.


And there is your problem.  Abort Execution does not close any open references you might have (DAQmx, File, VISA, etc).  The Abort Execution should only be used while debugging and something goes horribly wrong.  You need to allow the VI to end (stop button, Panel Close event, etc) and close out these references as part of the shutdown.


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 7
(3,352 Views)
Solution
Accepted by topic author Aswin.P

While you are debugging VISA Drivers you can go to "Tools>>Options" and hit this checkbox.

Capture.png

Don't leave it on- You'll develop some really nasty habits.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(3,339 Views)

Cool. Your solution seems to solve my problem. 

Thanks for your time.

Cheers.

0 Kudos
Message 6 of 7
(3,328 Views)

@Aswin.P wrote:

Cool. Your solution seems to solve my problem. 

Thanks for your time.

Cheers.


Please, do not leave that checkbox checked after you have debugged your driver.  (Trust me on that OK?)  or, start another thread to discuss why it is a really bad idea to check that checkbox and leave it checked.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(3,317 Views)