Posted Mon, 06 Nov 2023 03:20:32 GMT by Gamboa, John Carlo
Hello, 

I am working on automation in our tests program and I am an encountering errors such as "ERROR -285" and "ERROR 42". In the Keithley this is defined as: "TSP Syntax error at line 1: unexpected symbol near "]"" something like this and "Query Unterminated" respectively. 

I have been working on this problem for several days. I have tried changing the hardware setup many times including the LAN, USB, and any sort of connections in the setup. And it still produces the same error. 

My suspicion is the MeasureMultiple function of the Keithley, makes a measurement and stores it in the buffer (I have set my buffer size as 10) and stores only in the first index of the buffer. The succeeding values of the buffer reads as "9.97 E36" I do not know where this came from. 

The same lines of codes are used in the 32-bit processor and does not produce and error like this. Can you please help me with this problem? 
 
Posted Tue, 07 Nov 2023 16:41:33 GMT by C, Andrea
Can you clarify what model number is the instrument?

From your attached image, you are using IVI driver.  I believe the IVI driver wants the touch screen SMU models such as 2450 to be in SCPI command set.
Your reported error about TSP Syntax tells me the instrument is in in TSP command set.  If this is touch screen model of SMU, that would be a problem.

Do I have it correct?
Posted Wed, 08 Nov 2023 00:02:51 GMT by Gamboa, John Carlo
Hello Andrea, 

I am using Keithley 2602B. 

No it is not touch screen
Posted Wed, 08 Nov 2023 14:51:19 GMT by C, Andrea
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!!";
            }

 

You must be signed in to post in this forum.