Hello,
Thank you for clarifying that.
The 2602B has only the TSP command set, so no need to worry about that setting on the instrument.
It is very odd that the instrument reports a TSP syntax error.
In my C# environment, I set build to x64 platform target. It is running fine for me.
try
{
//Instantiate driver class directly
driver = new Ke26XXA();
VISAResource = availableResourcesListBox.SelectedItem.ToString();
string options = "QueryInstrStatus=True";
driver.Initialize(VISAResource, true, true, options);
label1.Text = "Successful Driver Session";
//driver.System.DirectIO.WriteString("reset()", true);
driver.Sweep.set_SourceChangesEnabled("A", true);
driver.Sweep.set_MeasurementsEnabled("A", true);
string bufferName = "MyBuf";
int bufSize = 11;
driver.Measurement.Buffer.Create("A", bufferName, bufSize);
driver.Sweep.Source.ConfigureVoltageLinearSweep("A", 0, 1, 11);
driver.Sweep.Measure.ConfigureCurrentMeasurement("A", bufferName);
// Set the sweep count
driver.Trigger.set_Count("A", bufSize);
// Set the reading count (1 pt for each sweep value)
driver.Measurement.set_Count("A", 1);
// set other measurement related paramters
driver.Measurement.set_NPLC("A", 1.0);
driver.Measurement.set_Delay("A", 0.001);
driver.Source.set_OutputEnabled("A", true);
driver.Sweep.Initiate("A");
driver.System.WaitForOperationComplete(10000);
double[] readings = driver.Measurement.Buffer.MeasureData.GetAllReadings(bufferName);
foreach (double reading in readings)
{
resultsListBox.Items.Add(reading.ToString("E"));
}
driver.Source.set_OutputEnabled("A", false);
// close the driver
driver.Close();
}
catch
{
label1.Text = "Could not open driver session!!";
}