Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Sporadic Visa Timeout errors ( 0xBFFF0015) with Agilent 34405A

Hallo, when running the following simple  test program it finishes after some time ( mightbe a few hundred cycles, mightbe some thousand cycles) with a 0xBFFF0015 error. Any ideas what would cause that ?

 

#include <userint.h>
#include <ag34405a.h>
#include <utility.h>
int main (void) {

static ViSession _tmp1;
static ViStatus _tmp2;
static ViStatus _tmp3;
static ViStatus _tmp4;
static ViReal64 _tmp5;
_tmp2 = ag34405a_init ("DMM_IBAT", VI_TRUE, VI_TRUE, &_tmp1);
_tmp3 = ag34405a_ConfigureMeasurement (_tmp1, AG34405A_VAL_DC_VOLTS, AG34405A_VAL_AUTO_RANGE_ON, 0.0001);
MessagePopup("","");
do {
 Delay(0.05);
 _tmp4 = ag34405a_Read (_tmp1, 10000, &_tmp5);
} while ( _tmp4 == 0);

MessagePopup("","Fehler");
_tmp2 = ag34405a_close( _tmp1);
}

0 Kudos
Message 1 of 9
(4,639 Views)

Hi,

 

take a look to the following link Why do I Receive Timeout Error -1073807339 on VISA Read or Write?

 

Though it describes Labview you can transfer the following statements to other VISA-programming:

 

"This error can occur when you read or write large amounts of data, as large data sets often take longer than the default timeout period of 2000ms to transfer across the serial port. Please first verify that the port communication settings are configured correctly, i.e. verify that the Baud Rate, Data Bits, Parity, Stop Bits, and Flow Control correctly correspond to your hardware requirements."

 

If the settings are correct, proceed with checking the other mentioned possibilities.

 

Best regards, Jan

 

 

0 Kudos
Message 2 of 9
(4,628 Views)

I don't think that this is the reason because I'am reading only one measurement value per cycle. That's 17 bytes per cycle and timeout is allready 10 seconds. That would be a speed less than 13 bps over a native USB connection ( so serial settings don't matter here) .

0 Kudos
Message 3 of 9
(4,614 Views)

Hi,

 

1. what VISA-Driver version are you using?

2. what IVI Compliance Package is installed?

3. what's your operating system?

 

Thanks for your answer!

 

0 Kudos
Message 4 of 9
(4,532 Views)

1. VISA 5.0.2

2. IVI Compliance Package 4.2

3. Windows XP SP3

The testprogramm was build with CVI 9.  ATM I think that it might be a USB problem ( data is corrupted when transported over USB) but don't have the equipment to verify that. Are there other solutions than a high end scope with additional uSB analyzer software to check what's arriving on/ leaving  the instruments USB connector ?  

 

 

0 Kudos
Message 5 of 9
(4,528 Views)

Unfortunately the Spy logs only shows that the viRead that follows the Fetc? query  times out. Despite is was successful in the prevous cycles. See attached Spy log. Lots of successful cycles and then the error.

0 Kudos
Message 7 of 9
(4,505 Views)

Hi,

 

how are you doing with your device? I have some more ideas.

 

1. Can you check the energy settings of your USB-Controller in the Windows Device Manager? Maybe the computer shuts down the USB-Port after a while.

 

2. Maybe an other USB device is interfering? So make sure nothing else is connected (even the mouse can be a problem)

 

3. As a last solution I would recommend a error handling. That means if the timeout occurs react on the error with closing the session and opening it again. That's more like a workaround but should help in any case.

 

Best Regards

0 Kudos
Message 8 of 9
(4,456 Views)

Sorry for reviving such an old thread, but I have the same problem.

 

Did you ever find a solution to the problem?


René

0 Kudos
Message 9 of 9
(4,187 Views)