04-25-2017 04:06 AM
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
Solved! Go to Solution.
04-25-2017 07:39 AM
Are you closing your resource via VISA Close? That is the only time I have seen that.
04-25-2017 08:19 AM
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.
04-25-2017 10:06 AM
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.
04-26-2017 11:47 AM
While you are debugging VISA Drivers you can go to "Tools>>Options" and hit this checkbox.
Don't leave it on- You'll develop some really nasty habits.
04-27-2017 02:44 AM
Cool. Your solution seems to solve my problem.
Thanks for your time.
Cheers.
04-27-2017 09:37 PM
@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.