AnsweredAssumed Answered

34980A SelfTest throws VI_ERROR_TMO

Question asked by blawry on Jan 12, 2012
Latest reply on Jan 13, 2012 by blawry
Using Visual Studio 2010 C++, IVI-COM drivers, 34980A connected on local isolated network:
I am new to IVI-COM and the 34908A, but have 10+ years experience with 34970A.

IIviDriverUtility interface SelfTest() throws a VI_ERROR_TMO _com_error exception after
45 seconds even if TimeoutMilliseconds is set as high as 120,000 msec.

Simplified code:

IAgilent34980A2Ptr lxi(__uuidof(Agilent34980A));
lxi->Initialize("TCPIP0::10.5.1.69::INSTR", VARIANT_TRUE, VARIANT_TRUE, "Cache=false, InterchangeCheck=false, QueryInstrStatus=true, RangeCheck=false, RecordCoercions=false, Simulate=false");
lxi->Status->Clear();
lxi->System->TimeoutMilliseconds = 120000;
long result = 0;
HRESULT hr;
BSTR tm = ::SysAllocString(L"");
try
{
     hr = util->SelfTest(&result, &tm);
}
catch(const _com_error & ex)     
{
       // decode exception and display
}

Output:
        Error code=0x80044215
        Meaning=IDispatch error #16405
        Source=Agilent34980A.Agilent34980A.1
        Description=Agilent34980A: IO timeout error: VI_ERROR_TMO: A timeout occurred.
        Result=0
// tm is uninitialized

If I rewrite using VISA viPrintf/viScanf functions explicitly, the *TST? command works normally.

Any idea what I'm doing wrong?

Thanks.  

Outcomes