Ethernet connection with Keithley devices

Hi everyone,

I am currently working on setting up part of a physics lab as my graduate work and have encountered multiple problems. As right now the biggest problem I am having is trying to interface a Keithley 2701 (with 7711 Switching Module). Previously we have established communication with a Keithley 2450 using the VISA XOP but in attempting to use a similar program we are unable to find the 2701. What is confusing is that I can ping the 2701 at its IP address and get a response, but when I search for it I am unable to locate it using Igor, I have thought about trying to use the SOCKIT XOP but wanted to see what advice if any you all might be able to give me.

Thanks,
Michael
I put together a system with a 3706 switch and a 2600 SMU to test multi-cell solar cells.

I used SOCKIT XOP to communicate to the switch which was the hub for the 2600. The communication was straight forward though the programming of the Keithley was a bit involved. I had to support multiple forma factors and tests routines which I crafted within Igor and sent them as text tot he Keithley. There was a second set of programming on the Keithey side to handle the necessary sweeps and loops and data arrangement before it was sent back to Igor.

I am rusty on the specifics since it was >6 years ago and I m no longer at that firm. I could try to get a copy of the code used (no guarantees).

Andy
According to http://digital.ni.com/public.nsf/allkb/80C28CC795611E4A86256AB100209521:
To use the INSTR resource type, the device must support the TCP/IP Instrument Protocol, also known as VXI-11. This protocol is, at present, used mostly by Agilent instruments.


Also, from http://digital.ni.com/public.nsf/allkb/92D475E7246846E786256ED700556D98, the Keithley 2701 is not a:
VXI-11 compliant instrument


This means that you can't control the 2701 using the VISA TCPIP::INSTR protocol. As the second link explains, you have to control it using the TCPIP::SOCKET protocol. This means you are programming it at a low level. You could use VISA XOP for this - it would similar to using the Sockit XOP.

I suspect that using TCPIP::SOCKET via VISA XOP or using the Sockit XOP is a lot more complicated than using the VISA TCPIP::INSTR protocol.

Here is a useful NI link entitled "Ethernet Instrument Control Tutorial" - http://www.ni.com/tutorial/3325/en/
hegedus wrote:
I put together a system with a 3706 switch and a 2600 SMU to test multi-cell solar cells.

I used SOCKIT XOP to communicate to the switch which was the hub for the 2600. The communication was straight forward though the programming of the Keithley was a bit involved. I had to support multiple forma factors and tests routines which I crafted within Igor and sent them as text tot he Keithley. There was a second set of programming on the Keithey side to handle the necessary sweeps and loops and data arrangement before it was sent back to Igor.

I am rusty on the specifics since it was >6 years ago and I m no longer at that firm. I could try to get a copy of the code used (no guarantees).

Andy


I appreciate the response, our setup is using a Keithley 2450 SMU and the 2701 with switching cards, we are using them to make measurement on solar cell devices so if you could get the code to me that might be greatly useful to us. I do not know much about the SOCKIT XOP, I have been able to connect to the device but I want to write SCPI instructions to the device using the SOCKITsendmsg but it does not reset when I send *RST. I must be making a mistake but do not know what.

Michael
Hi Michael,

Here is the Keithley communication code. We also use the Keithley to control the shutter to the light source. Hope this helps. If I recall once communication was set up, we just passed text back and forth.


#pragma rtGlobals=1     // Use modern global access method.


#IfDef Probe1
OVERRIDE STRCONSTANT IP = "192.168.75.211"
#EndIf
#IfDef RelTester
OVERRIDE STRCONSTANT IP = ""
#EndIf
#IfDef Probe2  
OVERRIDE STRCONSTANT IP = "10.2.1.225" //
#EndIf

STRCONSTANT IP = ""

Function InitializeKeithley([Quiet])
    Variable Quiet
    NVAR socknum = root:packages:Keithley:socknum
    KillWaves/Z root:Packages:Keithley:bufferwave
    make/O/t root:Packages:Keithley:bufferwave
    wave/t bw = root:Packages:Keithley:bufferwave
   
    if(SOCKITisitopen(socknum)) //Check if the connection is already open
        return 0
    endif
   
    If(ParamIsDefault(quiet) || quiet)
        sockitopenconnection/Q /TIME=10 sockNum,IP,23,bw
    else
        sockitopenconnection /TIME=10 sockNum,IP,23,bw
    endif
   
    sockitsendmsg socknum, "loadandrunscript\n"
    sockitsendmsg socknum, "errorqueue.clear()\n"
       #IfDef Probe2
            sockitsendmsg socknum, "tsplink.reset()\n"
        #EndIf
    sockitsendmsg socknum, "display.clear()\n"
    sockitsendmsg socknum, "display.settext ('Keithley Initialized')\n"
    sockitsendmsg socknum, "endscript\n"
End

Function CloseKeithley()
    NVAR socknum = root:packages:Keithley:socknum
    KillWaves/Z root:Packages:Keithley:bufferwave
    SOCKITcloseconnection(-1)   //This will close all open connections
End

Function ShutterOpen(ctrlName) : ButtonControl
    String ctrlName
    NVAR socknum =root:packages:Keithley:socknum
    if(!SOCKITisitopen(socknum))    //Check if the connection is open
        print "Connection is closed."
        return 0
    endif
    sockitsendmsg socknum, "loadandrunscript\n"
    sockitsendmsg socknum, "errorqueue.clear()\n"
#IfDef Probe2
    sockitsendmsg socknum, "tsplink.reset()\n"
#EndIf
    sockitsendmsg socknum, "display.clear()\n"
    sockitsendmsg socknum, "display.settext ('Shutter Open')\n"
    sockitsendmsg socknum, "digio.writebit(1,1)\n"
    sockitsendmsg socknum, "endscript\n"
End

Function ShutterClose(ctrlName) : ButtonControl
    String ctrlName
    NVAR socknum =root:packages:Keithley:socknum
    if(!SOCKITisitopen(socknum))    //Check if the connection is open
        print "Connection is closed."
        return 0
    endif
    sockitsendmsg socknum, "loadandrunscript\n"
    sockitsendmsg socknum, "errorqueue.clear()\n"
#IfDef Probe2
    sockitsendmsg socknum, "tsplink.reset()\n"
#EndIf
    sockitsendmsg socknum, "display.clear()\n"
    sockitsendmsg socknum, "display.settext ('Shutter Close')\n"
    sockitsendmsg socknum, "digio.writebit(1,0)\n"
    sockitsendmsg socknum, "endscript\n"
End

Function TestKeithley(str)
    String str
    NVAR socknum =root:packages:Keithley:socknum
    if(!SOCKITisitopen(socknum))    //Check if the connection is open
        print "Connection is closed."
        return 0
    endif
    print ("Testing Keithley")
    sockitsendmsg socknum, "loadandrunscript\n"
    sockitsendmsg socknum, "errorqueue.clear()\n"
#IfDef Probe2
    sockitsendmsg socknum, "tsplink.reset()\n"
#EndIf
    sockitsendmsg socknum, "display.clear()\n"
    sockitsendmsg socknum, "display.settext ('" + str + "')\n"
    sockitsendmsg socknum, "endscript\n"
End

Function Out(str)
    string str
    NVAR socknum = root:packages:Keithley:socknum
    sockitsendmsg socknum, str + "\n"
    return 0
End

Menu "Keithley"
    "Initialize/1", /Q, InitializeKeithley()
    "Close Connection/2", /Q, CloseKeithley()
    "Open Shutter/3", /Q, ShutterOpen("")
    "Close Shutter/4", /Q, ShutterClose("")
End