AlexH Posted January 10, 2009 Report Posted January 10, 2009 Hi, I have been having big problems sorting out some serial communications issues in a very large program with parts dating back to Labview 3. Some intermittent comms errors started occuring after upgrading from LV8.5 to 8.6. After much headscratching it seems that the issue is due to the way VISA refnums are cleaned up when a VI stops running (even if others are still running in parallel). As far as I can see, in 8.5 and below if a VISA reference is opened, and a VI which uses it finishes running, the reference remains valid. In 8.6 however, if ANY VI which uses a VISA reference finishes, then the refnum is closed automatically. However this appears to behave differently on different computers. I'd be grateful if people with both version 8.5 and 8.6 could test the attached files. The first VI opens a VISA reference, waits for 2 seconds, then stops (without closing it). The second runs in a loop checking if the reference is valid. (With the option to close it if it is already open). I have tried this on two computers, on one of them (where we are having the problem), there is a difference in behaviour between LV8.5 and LV8.6. On the other (a laptop with no serial port, only USB, so I can't check the exact same VISA resource), there is no difference. It would be really helpful if you could do the following in both 8.5 and 8.6 1. Run "Valid refnum check(8.5).vi", and close the reference if it is already open. If you have no ASRL1 port try something else. 2. Run "Open VISA refnum with delay (8.5).vi", (with the same visa resource), wait for it to finish. 3. Tell me what happened (and which VISA resource you used if it wasn't ASRL1). Thanks very much. Alex Quote
robijn Posted January 10, 2009 Report Posted January 10, 2009 Hi, I have checked with version 8.5. Depending on the option "Automatically close VISA sessions" the behaviour is as follows for me: Option off: The resource stays valid; Option on: The resource becomes invalid when the second VI stops (even though the first one still has this resource selected in its control). Regards, Joris Quote
AlexH Posted January 10, 2009 Author Report Posted January 10, 2009 I have just discovered the "Automatically close VISA sessions" option. That was at the source of my problems. Cheers! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.