Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5667

VISA viWrite() hangs and instrument locks up

$
0
0

Config:

NI USB-GPIB-HS on Win 7 SP1.  

VISA32.dll  

talking to an HP8164A

 

Issue:

Unpredictable timeouts and then lock up on a viWrite() call.  I had a large program that was stopping after various calls to viWrite() so I made a simple program that simply does the follwoing over and over again (NI I/O Trace shown):

 

viWrite (GPIB0::20 (0x020653F0), "*IDN?..", 7, 7)

viRead (GPIB0::20 (0x020653F0), "HEWLETT-PACKARD,HP816...", 20480, 48)

This will work for an unpredicatable number of times a then timeout on the viWrite() call with fewer than the 7 bytes returned.  Once it times out the instrument locks up and I can't get it to respond to further viWrites() (i.e. times out with 0 bytes returned).  The only way I can get the instrument back to operation is to restart it, which is very painful and basically makes the application unusable.

 

Does anyone know how to troubleshoot this problem?  Is there something I need to do after the viWrite() timeout to make the instrument responsive again?  I could handle the error condition in my code if I could get the instrument to respond again.

 

 

 


Viewing all articles
Browse latest Browse all 5667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>