AnsweredAssumed Answered

C U2741A DCVoltage.Measure?

Question asked by jackn on May 25, 2011
Latest reply on Mar 27, 2012 by agarcia
Is

AgilentU2741A u2741a = new AgilentU2741AClass();
u2741a.Initialize("U2741A", false, true, "QueryInstrStatus=true,Simulate=false,DriverSetup= Model=,Trace=false");
double volts = u2741a.DCVoltage.Measure(20.0, 0.1);

the correct way to use C# to get a voltage measurment from the U2741A?
I get this timeout exception when I try:
"
System.Runtime.InteropServices.COMException (0x80044215): AgilentU2741A: IO timeout error: VI_ERROR_TMO: A timeout occurred.
at Agilent.AgilentU2741A.Interop.AgilentU2741AClass.IAgilentU2741ADCVoltage_Measure(Double Range, Double Resolution)
"

I have installed the following on my PC
"
1. Agilent IO Libraries Suite 15.5 (CD provided with U2741A).
2. Hardware Driver for Agilent USB Modular DAQ and U2781A USB Modular Chassis Version 1.06.
3. Agilent Measurement Manager (AMM) v2.2.0.0 Software Download (with pre-requisites)
"

and have the following references in my C# project
"
Agilent.AgilentU2741A.Interop
Ivi.Dmm.Interop
Ivi.Driver.Interop
Ivi.Visa.Interop
"

Also: the following works so I believe it is properly connected:
Console.WriteLine(@"Identifier: {0}",
     u2741a.Identity.Identifier);
Console.WriteLine(@"Revision: {0}",
     u2741a.Identity.Revision);
Console.WriteLine(@"Vendor: {0}",
     u2741a.Identity.Vendor);
Console.WriteLine(@"InstrumentModel: {0}",
     u2741a.Identity.InstrumentModel);
Console.WriteLine(@"InstrumentFirmwareRevision: {0}",
     u2741a.Identity.InstrumentFirmwareRevision);
Console.WriteLine(@"InstrumentManufacturer: {0}",
     u2741a.Identity.InstrumentManufacturer);

Outcomes