• RE: [KXIC] Get error message from KXCI

    Sounds like you are making very robust error handling in your application.

    Looks like, right now, the only way for you to know the error detail is to look at tail of the KXCILogifile.txt in the C:\S4200\sys\kxci
    In KXCI window, be sure to enable logging.
    Can your application somehow map that drive location and do some file IO?

    From the KXCI command set, you can interrogate the state of a bit in the status byte to know if an error has occurred.
    But not aware of any way to query the error detail on this API.

    Python sample for interrogating status byte:
    ​​​​​​​import time
    import pyvisa
    import socket
    
    
    def main():
        rm = pyvisa.ResourceManager()
        dev_address = "TCPIP0::192.168.1.43::1225::SOCKET"
        my_4200A = rm.open_resource(dev_address)
        my_4200A.read_termination = "\0"
        my_4200A.write_termination = "\0"
        my_4200A.timeout = 1000
    
        # No Error in *IDN?
        print("Response to *IDN?: ", my_4200A.query("*IDN?"))
        status = my_4200A.query("SP")
    
        # Check bit B1 of status byte for previous command error
        if (int(status) & 0x02) != 0:  # Check bit B1 of SP response
            print("Error Detected. Bit B1 value: ", (int(status) & 0x02))
        else:
            print("No Error Detected. Bit B1 value: ", (int(status) & 0x02))
    
        # Error in *IDN?
        print("Response to *ID?: ", my_4200A.query("*ID?"))
        status = my_4200A.query("SP")
    
        # Check bit B1 of status byte for previous command error.
        if (int(status) & 0x02) != 0:  # Check bit B1 of SP response
            print("Error Detected. Bit B1 value: ", (int(status) & 0x02))
        else:
            print("No Error Detected. Bit B1 value: ", (int(status) & 0x02))
    
        my_4200A.close()
    
    
    if __name__ == "__main__":
        main()

     
  • RE: Triggered Sweep with 2182 and 2400 configured and controlled remotely

    You should not be needing to simulate front panel button pushes this way.

    Can you clarify:  do you have a digital triggering cable between the two instruments?  I'll put some code below that assumes you do.

    And you have two COM ports on your computer and have RS-232 to each instrument?

    Here are some SCPI commands to use 2400 as current source while 2182A does delta mode measurements.
    :syst:pres ‘ 2182 - System preset defaults.
    :trig:del 1 '2182 - 1sec delay.
    :sens:volt:delta on ‘ 2182 - Enable Delta.
    :syst:faz off ‘Disable Front Autozero to double Delta speed.
    :trig:sour ext ‘ 2182 - External triggering.
    :trac:poin 3 ‘ 2182 - Buffer size 3.
    :trac:feed:cont next ‘ 2182 - Enable buffer.
    *rst ‘ SM - RST defaults.
    :trig:sour tlin ‘ SM - Select trigger link.
    :trig:dir sour ' SM - Enable source bypass.
    :trig:outp sour ‘ SM - Output trigger after source.
    :trig:coun 6 ‘ SM - Trig count 6.
    :sour:func curr ‘ SM - Source current.
    :func ‘volt’ ‘ SM - Measure voltage
    :volt:nplc 0.01 ‘ SM - Fast measurements
    :sour:list:curr 10e-6, -10e-6,20e-6, -20e-6, 50e-6, -50e-6 ‘ SM - Current list values
    :outp on ‘ SM - Turn output on.
    :sour:curr:mode list ‘ SM - Enable list mode.
    :init ‘ SM - Start sweep.
    
    
  • RE: Device characterization tests with 4200A-SCS and Lakeshore probe station

    Short answer is yes.
    But a lot of details to manage including safety interlocks, common LO,  and over voltage protection for the 4200A from the 2657A.

    Is your Lakeshore capable of the HV and the current densities of the 50Amps?  Or you will have different probe station for the new high power IV tests.

    I suggest you get in contact with your local Keithley FAE for detailed discussion and configuration.
    Are you located in Nebraska?
  • RE: Keithley 6517A With Arduino

    Does C# run on Arduino?  Or is there also a Windows computer involved that is running C#?

    You 6517A can be command controlled over RS-232 or GPIB.

    I'd suggest the C# program will control the Arduino/16channel relay module to routing signal to the 6517A.
    Then C# can also obtain a reading from 6517A.

    Will the 6517A measure current or voltage or ?
  • RE: Trouble communicating with DAQ6510 using TSP and PyVISA

    You have it correct.
    Only commands that end in question mark will automatically cause a response to be put into the output queue.
    Your VISA read transfers the output queue.
    In conventional SCPI there are often query form of commands to interrogate instrument settings.
    In TSP, we rely on the print() or printbuffer() to place content in output queue.

    There is a status.condition register with a message available bit (MAV) that will be logic 1 if there is content in output queue.  Use VISA ReadSTB rather than a visa read after writing print(status.condition) command.
  • RE: Trouble communicating with DAQ6510 using TSP and PyVISA

    Hi Richard,

    I do not see anything wrong with that you are doing.
    Is the LAN connection from Test Script Builder closed?  The instrument can accept only one connection at a time.

    For future reference, when the LAN connection gets stranded, there is a dead socket recovery port.
    If you can connect on the dead socket and then close, it forces any open LXI LAN connection (port 5025) to close.
    If my theory about an open connection from Test Script Builder is why you are having troubles, the dead socket would let you take it away.
    import pyvisa
    import time
    
    
    resource_mgr = pyvisa.ResourceManager()
    #optional print available VISA resources on this computer
    resource_list = resource_mgr.list_resources()
    for resource in resource_list:
        print(resource)
    
    try:
         #get a session/handle for one resource
         instrument_resource_string = "TCPIP0::192.168.1.55::inst0::INSTR" 
         #resource_list[0]  #for me, resource_list[0] = 
         my_instr = resource_mgr.open_resource(instrument_resource_string)
    except(pyvisa.VisaIOError):
         #try connect on dead socket on port 5030
         print("Attempting Dead Socket recovery.....")
         my_instr = resource_mgr.open_resource("TCPIP0::192.168.1.55::5030::SOCKET")
         my_instr.close()
         time.sleep(0.5)
         #try again now on normal LXI port
         my_instr = resource_mgr.open_resource(instrument_resource_string)
         print("Done attempting Dead Socket recovery.....")
        
    
    
    my_instr.write("*IDN?\n")
    print("*****")
    print(my_instr.read())
    
  • RE: wrong current measurement keithley 2602B

    My hunch is that the SMU control loop is destabilized by your 100nF.

    And evidently the situation is worse for compliance setting of 10mA vs 5mA.

    What is the measure range in each case?  Is it auto ranging or set to fixed current measure range?

    Turning on high C mode should give you the consistent behavior of appx 1mA measured when forcing 5V regardless of current limit setting at 5mA or 10mA.

  • RE: wrong current measurement keithley 2602B

    From data sheet of 2602B:   Maximum Load Impedance Normal Mode: 10 nF (typical). High Capacitance Mode: 50 µF (typical).

    Since you have 100nF, try enabling the high capacitance mode.
  • RE: question about 6430

    Glad to hear you solved it.

    FYI for others, if you turn off auto range for current measure, and set a fixed range, the allowed values of current compliance limit must be within that selected measure range.  This is why too small for sense range error is raised.

    If auto range is on, then it is possible to have a much higher value for current compliance than the presently in use measure range by the auto range algorithm.
  • RE: Low Level GPIB Communication with 2611B

    Since your *IDN? query is working well, I'd say your communication is proved.

    You are getting a timeout on the other query because it is not a valid command for the 2611B.
    Therefore, that command will not cause any response message and your gpib read times out.

    I suggest you consider updating the firmware level.  You are at 3.0.3.  Version 3.4.2 is available for your unit.
    You need a login to the tek.com site, but otherwise is a free download.

    Also while there, download the reference manual which details the commands that the 2611B does understand.
    The user manual offers a subset of that info and some typical use case scenarios.

    If you want to know the line frequency you can write a command:  print(localnode.linefreq).
    Then read the response that is "printed" to the output queue.

    Downloads for the 2611B