3-10
KLR-DEV 060713
FIGURE 3-2. EXAMPLE OF USING A LIST, WRITTEN IN C# (SHEET 2 OF 2)
// Initialize driver
KLRdriver.Initialize("GPIB0::6::INSTR",
true,
true,
"Cache=true,InterchangeCheck=false,QueryInstrStatus=true,Simu-
late=false");//Optional ivi options
System.Console.WriteLine("Done.\n");
// get references to the needed interfaces
outputPtr = KLRdriver.Outputs.get_Item(driver.Outputs);
listPtr = KLRdriver.List.get_Item(driver.Lists);
//create arrays for the ListPoints method
double[] voltList = new double [6];
double[] currList = new double [6];
double[] dwellTime = new double [6];
voltList[0] = 10;
voltList[1] = 20;
voltList[2] = 30;
voltList[3] = 40;
voltList[4] = 50;
voltList[5] = 60;
currList[0] = 2; // select max current for each step
currList[1] = 2;
currList[2] = 2;
currList[3] = 2;
currList[4] = 2;
currList[5] = 2;
dwellTime[0] = 1;
dwellTime[1] = 2;
dwellTime[2] = 3;
dwellTime[3] = 4;
dwellTime[4] = 5;
dwellTime[5] = 0.01;
//' call ListPoints to set the list values and set the voltage and current modes to
LIST
listPtr.ListPoints(ref voltList, ref currList, ref dwellTime);
// enable the output
outputPtr.Enabled = true;
// Set the number of executions.
listPtr.count = 2;
// initiate the list in the output system
outputPtr.listInitiate();
KLRdriver.Systems.WaitForOperationComplete(10000);
//Read instrument errors
ReadInstrumentError(driver);
//' Close driver if initialized.
if (KLRdriver.Initialized == true ) KLRdriver.Close();
Console.WriteLine();
Console.Write("Press Enter to Exit ");
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine();
Console.WriteLine("Exception Error:");
Console.WriteLine(" " + e.Message );
KLRdriver.Close();
Console.WriteLine();
Console.Write("Press Enter to Exit ");
Console.ReadLine();
}
}
}
}
Содержание KLR SERIES
Страница 2: ......
Страница 10: ......
Страница 42: ......
Страница 58: ...4 16 KLR DEV 060713 FIGURE 4 10 FUNCTION GENERATOR PANEL FIGURE 4 11 CONFIGURE User Sequence vi BLOCK DIAGRAM ...
Страница 59: ......
Страница 60: ......
Страница 61: ...FIGURE 4 13 FUNCTION GE ...
Страница 62: ......
Страница 86: ......
Страница 90: ......