Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA timeout expired before operation completed

I have a VB.Net program that controls a function generator and a spectrum analyzer with the gpib.  I am able to configure, read, and write from the equipment, but I get a very intermitten timeout error that I have not been able to track down.  My program reads the the power level of a signal at various attenuation levels.  The programs begins fine, reading from the spec. An., but as mentioned it times out at different points in the test.   I do not understand how I am able to read values and all of the sudden it times out.  The error code is 1073807339(0xbfff0015).  Attached is the code for reading the power level from the spec analyzer and is where the time out error occurs.  The sleep lines were added to see if it helped but it did not, the system has the same symptoms with them in the code or with out them.  One thing I have not tried, is adjusting the timeout period. How is this done through VB??
If you can please help me, I would appreciate it tremendously.
Thanks
          

 

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

Hi,

First I would like to ask you a few question about your program. I see that you have declared your GPIB and ManualGPIB. What class is this declared as? Once I know what the class is I should be able to help you set the timeout.

Also, it seems like you are using VISA so you could run your program with NI-SPY running and this will help us narrow the code down to where the actuall issue is accruing. To do this go to Start>>Programs>>National Instruments>> NI SPY and select that program. Then select the blue arrow to make NI SPY run. With this running please run your program. Then save the NI SPY file and attach it to your next post.

The answers to both of these question will allow me to help you better. Thank you.

 


Regards
Krista S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,972 Views)