LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Read Hang (Not Timing Out!)

Solved!
Go to solution

Hey y'all, I've inherited a bit of code, and everything seems to be working fine except for a part of the code that seems to hang indefinitely.  I tracked it down to a Visa Read, but I'm a bit confused, as there was a timeout set when openned of 10 seconds, and it definitely hangs for longer than 10 seconds (I'd even prefer it to timeout honestly)

 

This is the connection VI that is run during initialization

EthanHenry_0-1712285287047.png

 

It also makes it impossible to shut down the software, and I can't even seem to abort the VI that's reading, leading to me having to task kill software, and eventually restart the computer to get the VISA connection back.  Any ideas would be greatly appreciated, as I'm kind of at a loss 😕

0 Kudos
Message 1 of 4
(229 Views)

There is no VISA read in your screenshot. Are you sure it's not blocking due to the semaphore subVI?

0 Kudos
Message 2 of 4
(199 Views)
Solution
Accepted by topic author EthanHenry

Assuming it is indeed a VISA Read that blocks (an Aquire Semaphore would be abortable when you try to abort the VI) the only thing that can cause this is either a borked VISA installation or a bug in the serial port driver.

What serial port is it? Most likely a virtual USB serial port? What make? Are you sure it’s a genuine one?

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 4
(184 Views)

Welp, was getting into the weeds of VISA, tried updating the VISA package, and of course that fixed the problem instantly.  Thanks for making me think of that, good reminder to always try updating!

0 Kudos
Message 4 of 4
(100 Views)