Converting IV Sweep code from compatibility with Keithley 2400 to 2450 SMU

I am very new to Igor Pro, but I am trying to modify code that performs a current voltage sweep by driving the Keithley 2400 source meter. I am in the process of ensuring that the SCPI commands that have changed from the 2400 model to the 2450 model are changed in my program. So far I have changed the code to allow the machine to 2450 to perform a sweep, but I am unable to read the data and display it on a graph because of a timeout (EABO) error from the GPIB to USB cable during an IBRD instruction. The original code for the 2400 could read and output an IV trace graph, but before initializing the sweep the SCPI command :TRAC:FEED:CONT NEXT was executed. This command no longer exists in the new 2450 SCPI library, but I was wondering if there is a replacement for it. My error occurs in Igor when I run the line GPIBReadWave2 responseString where responseString is declared earlier as follows:

Make/T/O/N=(numResponses) responseString
responseString=""

If anyone has any knowledge about how to read different data from a GPIB cable in this case, I would greatly appreciate it.

Thanks,
Eric
First, I presume that the 2400 send numeric values, not arbitrary text strings. If this is correct then I don't know why you have /T in the Make command. But I will set that issue aside.

There are three likely possibilities:


  1. The 2450 is sending nothing because it requires some command that you have not issued to tell it to send data.

  2. The 2450 is sending fewer than numResponses data points so a timeout occurs waiting for the extra data points.

  3. The 2450 is not sending a tab, comma or carriage-return after each point.



I would start by making sure that I know what command I need to send to the instrument to get it to send data and what character or characters it sends after each data point. Consult the manual or Keithley support.

Next, for purposes of troubleshooting, I would enter this function in the Igor procedure window and execute it:
Function Test(numPointsExpected)
    Variable numPointsExpected

    GPIB2 InterfaceClear        // Clear any garbage left from previous tests
    Sleep/S 3               // Give the instrument time to clear itself

    <<< Send the command that tells the 2450 to send the data here >>>
   
    Make/O/N=(numPointsExpected) testOutput = NaN
    CheckDisplayed testOutput
    if (V_Flag == 0)            // Create a table if it does not already exist
        Edit testOutput
    endif
   
    GPIBReadWave2 /Q testOutput     // /Q to suppress error in the event of a timeout
    numDataPointsReceived = V_Flag  // V_Flag is set even if there is an error
    Printf "Number of data points received: %d\r", numDataPointsReceived
End


Now both the Printf output and the table should show you how many data points, if any, were received.
Thanks for the help! The Keithley does in fact send strings as Data. I have a parser that translates this information. I ended up actually just switching away from the GPIB cable entirely to a simple USB connection. I used NI VISA to read and write and changed a lot of code, but it seems to work ... for now. Thanks again for the help because I just started programming in Igor and SCPI this Monday. There is a VISA.xop for Igor if you ever end up needing to use a USB cable to read and write data.