Skip navigationLog in to create and rate content, and to follow, bookmark, and share content with other members. 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);
double volts = u2741a.DCVoltage.Measure(10, 0.0000015);