Hi
I have been developing a simple C# WindowsForm program by VS2010 for Agilent E3634A Power Supply.
I try to initialize driver here in Main function. I just get instance of the object and initialize the driver. With the button click, I want to open output and then read voltage. It gives me always "VISA error = timeout expired before operation completed" error.
I think I have to open a session and set all serial parameters same as instrument but I do not know how to open session by IVI COM. Any help? Thanks
using Ivi.Driver.Interop;
using Agilent.AgilentE36xx.Interop;
string resourceDesc = "ASRL5::INSTR"; //RS232 COM=5
public MainForm()
{
InitializeComponent();
try
{
driver = new AgilentE36xx();
driver.Initialize(resourceDesc, idquery, reset, "DriverSetup= Model=E3634A,Trace=false");
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
}
private void button3_Click(object sender, EventArgs e)
{
driver.Outputs.Enabled = true;
// Get Output1 object. get_Name(1) returns "Output1".
IAgilentE36xxOutput pOutput1 = driver.Outputs.get_Item(driver.Outputs.get_Name(1));
// Measure the output voltage
measuredvolt = pOutput1.Measure(AgilentE36xxMeasurementTypeEnum.AgilentE36xxMeasurementVoltage);
}