LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa timeout stuck at 0?

I have an application which uses ni-visa (version 4.2) USB raw bulk communications on Vista PC.  It works well most of the time.  Periodically I get a timeout error at VISA write (-1073807339) even though the visa resource is present, which I know because immediately before the Visa write I query lots of the visa properties.  I noticed that when this error occurs that the property: general settings>timeout value = 0, instead of 2000 msec  which it normally is.  So I added code to my app to explicity set the timeout to 2000 msec right before the visa write.  This DIDN'T fix the timeout on the visa write and when I read this property I see that my setting the timeout value to 2000 was ignored (no error), and that the timeout is still 0.  Note - all other USB status properties look good, the out pipe and its status are good.  The visa resource is not locked. When I rebooted the computer the problem goes away. 

 

So, my question is:  what could be changing the timeout to 0 (it's not my app doing this) and also not allowing me to programmatically change the value?? Does a timeout of 0 signify some special status of the visa driver?

0 Kudos
Message 1 of 2
(2,663 Views)

Hello DrMike,

 

Thank you for your post.  I have a few suggestions/questions.

 

First, have you tried handling the error, setting the timeout back to 2 seconds and trying the VISA write again?  It is possible that this is a strange USB issue that could be resolved by trying to write the data a second or third time.

 

Another suggestion I have would be to upgrade to NI-VISA 4.4.1.  Sometimes these issues are present in older versions of the device, but are fixed along with other issues in driver upgrades.

 

Let me know if this works or if you find another workaround.

Regards,
Dan King

0 Kudos
Message 2 of 2
(2,629 Views)