Exemple #1
0
def pulse4(*args):
    ''' send pulse sweep generated by Keithley 2461 to the sample using 4 contact points via Synapse Switch Box.
    This command takes only 8 input parameters:
        The first 4 parameters defines the contact points in the Synapse Switch Box;
        The last 4 parameters defines pulse sweep to be generated by the Keithley 2461.
    Command syntax:
        pulse source_1_high  source_2_high source_1_low source_2_low current width timeDelay  numberOfPulses
    '''
    if len(args) == 8:
        if len(args[:4]) != len(set(args[:4])):
            raise Exception(
                "Cannot use the same Synapse terminal more than once in this command."
            )
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse
        synapseHigh1 = whichSynapseTerminal(args[0])
        synapseHigh1.rawAsynchronousMoveTo("Source high")
        synapseHigh2 = whichSynapseTerminal(args[1])
        synapseHigh2.rawAsynchronousMoveTo("Source high")
        synapseLow1 = whichSynapseTerminal(args[2])
        synapseLow1.rawAsynchronousMoveTo("Source low")
        synapseLow2 = whichSynapseTerminal(args[3])
        synapseLow2.rawAsynchronousMoveTo("Source low")
        sleep(1)  #ensure above finished before statement below

        generateCurrentPulseFromKeithley(args[4], args[5], args[6] / 2,
                                         args[7])

        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."

    else:
        raise Exception(
            "Number of parameters is wrong, require 6 or 8 arguments.")
Exemple #2
0
def probeRes2(*args):
    ''' measure resistance of the sample using Keithley 2461 using 2 contact points via Synapse Switch Box.
    This command takes only 7 input parameters:
        The first 2 defines the contact points in the Synapse Switch Box;
        The last 5 parameters defines applied current, measuring voltage limit, auto range (0 for OFF, 1 for ON), range value, and NPLC in Keithley 2461.
    Command syntax:
        probeRes source_high  source_low current complianceVoltage autoRange rangeValue nplc
    Note, that not all measurement ranges are allowed, for a forbidden value, it will choose the next higher value.
    '''
    if len(args) == 7:
        if args[0] == args[1]:
            raise Exception(
                "Cannot use the same Synapse terminal for both high and low.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        sleep(1)
        #configure synapse
        synapseHigh = whichSynapseTerminal(args[0])
        synapseHigh.rawAsynchronousMoveTo("Source high")
        synapseLow = whichSynapseTerminal(args[1])
        synapseLow.rawAsynchronousMoveTo("Source low")
        sleep(1)  #ensure above finished before statement below

        voltage = measureVoltage(args[2], args[3], args[4], args[5], 'OFF',
                                 args[6])
        print "2-point"
        print "measured voltage = " + str(float(
            voltage.split(",")[1])) + ", thus resistance = " + str(
                float(voltage.split(",")[1]) / float(args[2]))
        sleep(1)  #ensure above finished before statement below

        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Probe Resistance completed."

    else:
        raise Exception("Number of parameters is wrong, require 7 arguments.")
Exemple #3
0
def pulse2(*args):
    ''' send pulse sweep generated by Keithley 2461 to the sample using 2 contact points via Synapse Switch Box.
    This command takes only 6 input parameters:
        The first 2 parameters defines the contact points in the Synapse Switch Box;
        The last 4 parameters defines pulse sweep to be generated by the Keithley 2461.
    Command syntax:
        pulse source_high source_low current width timeDelay numberOfPulses
    '''
    if len(args) == 6:
        if args[0] == args[1]:
            raise Exception(
                "Cannot use the same Synapse terminal for both high and low.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse
        synapseHigh = whichSynapseTerminal(args[0])
        synapseHigh.rawAsynchronousMoveTo("Source high")
        synapseLow = whichSynapseTerminal(args[1])
        synapseLow.rawAsynchronousMoveTo("Source low")
        sleep(1)  #ensure above finished before statement below

        generateCurrentPulseFromKeithley(args[2], args[3], args[4] / 2,
                                         args[5])

        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."
    else:
        raise Exception("Number of parameters is wrong, require 6 arguments.")
Exemple #4
0
def pulse(*args, **kwargs):
    ''' send pulse sweep generated by Keithley 2461 to the sample via Synapse Switch Box.
    This command takes only 6 or 8 input parameters:
        The first 2 (in 6 parameters case) or 4 (in 8 parameters case) parameters defines the contact points in the Synapse Switch Box;
        The last 4 parameters defines pulse sweep to be generated by the Keithley 2461.
    Command syntax:
        pulse source_high source_low current width timeDelay numberOfPulses
            for 6 input parameters
        pulse source_1_high  source_2_high source_1_low source_2_low current width timeDelay  numberOfPulses
            for 8 input parameters
    '''
    if len(args) == 6:
        if args[0]==args[1]:
            raise Exception("Cannot use the same Synapse terminal for both high and low.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse    
        synapseHigh = whichSynapseTerminal(args[0])
        synapseHigh.rawAsynchronousMoveTo("Source high")
        synapseLow = whichSynapseTerminal(args[1])
        synapseLow.rawAsynchronousMoveTo("Source low")
        sleep(1) #ensure above finished before statement below 
        
        if kwargs.get('KEITHLEY_SOURCE_MODE', curr) == curr or str(JythonServerFacade.getInstance().getFromJythonNamespace('KEITHLEY_SOURCE_MODE')) == curr:
            generateCurrentPulseFromKeithley(args[2], args[3], args[4]/2, args[5])
        elif kwargs.get('KEITHLEY_SOURCE_MODE', curr) == volt or str(JythonServerFacade.getInstance().getFromJythonNamespace('KEITHLEY_SOURCE_MODE'))  == volt:
            generateVoltagePulseFromKeithley(args[2], args[3], args[4]/2, args[5])
        else:
            raise Exception("Keithley source mode %s is not supported" % KEITHLEY_SOURCE_MODE)
        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."
      
    elif len(args)== 8:
        if len(args[:4])!=len(set(args[:4])):
            raise Exception("Cannot use the same Synapse terminal more than once in this command.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse    
        synapseHigh1 = whichSynapseTerminal(args[0])
        synapseHigh1.rawAsynchronousMoveTo("Source high")
        synapseHigh2 = whichSynapseTerminal(args[1])
        synapseHigh2.rawAsynchronousMoveTo("Source high")
        synapseLow1 = whichSynapseTerminal(args[2])
        synapseLow1.rawAsynchronousMoveTo("Source low")
        synapseLow2 = whichSynapseTerminal(args[3])
        synapseLow2.rawAsynchronousMoveTo("Source low")
        sleep(1)#ensure above finished before statement below
        
        if kwargs.get('KEITHLEY_SOURCE_MODE', curr) == curr or str(JythonServerFacade.getInstance().getFromJythonNamespace('KEITHLEY_SOURCE_MODE'))  == curr:
            generateCurrentPulseFromKeithley(args[4], args[5], args[6]/2, args[7])
        elif kwargs.get('KEITHLEY_SOURCE_MODE', curr) == volt or str(JythonServerFacade.getInstance().getFromJythonNamespace('KEITHLEY_SOURCE_MODE'))  == volt:
            generateVoltagePulseFromKeithley(args[4], args[5], args[6]/2, args[7])
        else:
            raise Exception("Keithley source mode %s is not supported" % KEITHLEY_SOURCE_MODE)
       
        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."
    
    else:
        raise Exception("Number of parameters is wrong, require 6 or 8 arguments.")
Exemple #5
0
def pulseAndMeas(*args):
    ''' send pulse sweep generated by Keithley 2461 to the sample via Synapse Switch Box, and return the measured data.
    This command takes only 7 or 9 input parameters:
        The first 2 (in 7 parameters case) or 4 (in 9 parameters case) parameters defines the contact points in the Synapse Switch Box;
        The next 4 parameters defines pulse sweep to be generated by the Keithley 2461.
        The last parameter defines NPLC (must be between 0.01 and 10)
    Command syntax:
        pulseAndMeas source_high source_low current width timeDelay numberOfPulses nplc
            for 7 input parameters
        pulseAndMeas source_1_high  source_2_high source_1_low source_2_low current width timeDelay  numberOfPulses nplc
            for 9 input parameters
    '''
    if len(args) == 7:
        if args[0]==args[1]:
            raise Exception("Cannot use the same Synapse terminal for both high and low.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse    
        synapseHigh = whichSynapseTerminal(args[0])
        synapseHigh.rawAsynchronousMoveTo("Source high")
        synapseLow = whichSynapseTerminal(args[1])
        synapseLow.rawAsynchronousMoveTo("Source low")
        sleep(1) #ensure above finished before statement below 
        
        data=generatePulseAndMeasureFromKeithley(args[2], args[3], args[4]/2, args[5], args[6])
        print data
        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."
      
    elif len(args)== 9:
        if len(args[:4])!=len(set(args[:4])):
            raise Exception("Cannot use the same Synapse terminal more than once in this command.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse    
        synapseHigh1 = whichSynapseTerminal(args[0])
        synapseHigh1.rawAsynchronousMoveTo("Source high")
        synapseHigh2 = whichSynapseTerminal(args[1])
        synapseHigh2.rawAsynchronousMoveTo("Source high")
        synapseLow1 = whichSynapseTerminal(args[2])
        synapseLow1.rawAsynchronousMoveTo("Source low")
        synapseLow2 = whichSynapseTerminal(args[3])
        synapseLow2.rawAsynchronousMoveTo("Source low")
        sleep(1)#ensure above finished before statement below

        data=generatePulseAndMeasureFromKeithley(args[4], args[5], args[6]/2, args[7], args[8])
        print data
        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."
    
    else:
        raise Exception("Number of parameters is wrong, require 7 or 9 arguments.")
Exemple #6
0
def synapseOpen():
    '''set all the nodes to Open circuit
    '''
    synapse_setall.rawAsynchronousMoveTo("Open circuit")
Exemple #7
0
def synapseGround():
    '''set all the nodes to STV
    '''
    synapse_setall.rawAsynchronousMoveTo("STV")
Exemple #8
0
def pulse(*args):
    ''' send pulse sweep generated by Keithley 2461 to the sample via Synapse Switch Box.
    This command takes only 6 or 8 input parameters:
        The first 2 (in 6 parameters case) or 4 (in 8 parameters case) parameters defines the contact points in the Synapse Switch Box;
        The last 4 parameters defines pulse sweep to be generated by the Keithley 2461.
    Command syntax:
        pulse sc_kh sc_kl current width timeDelay numberOfPulses
            for 6 input parameters
        pulse sc_a_kh  sc_b_kh sc_a_kl sc_b_kl current width timeDelay  numberOfPulses
            for 8 input parameters
    '''
    if len(args) == 6:
        if args[0] == args[1]:
            raise Exception(
                "Cannot use the same Synapse terminal for both high and low.")
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse
        synapseHigh = whichSynapseTerminal(args[0])
        synapseHigh.rawAsynchronousMoveTo("Source high")
        synapseLow = whichSynapseTerminal(args[1])
        synapseLow.rawAsynchronousMoveTo("Source low")
        sleep(0.2)  #ensure above finished before statement below
        #configure keithley
        keithleyReset(kei2461)
        keithleySourceCurrentMode(kei2461)
        keithleySenseVoltageMode(kei2461)
        keithleyAutoRange(kei2461)
        keithleyConfigurePulse(kei2461, args[2], args[3], args[4], args[5])
        keithleyStartSweep(kei2461)
        keithleyWait(kei2461)
        sleep(0.2)  #ensure above finished before statement below

        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."

    elif len(args) == 8:
        if len(args[:4]) != len(set(args[:4])):
            raise Exception(
                "Cannot use the same Synapse terminal more than once in this command."
            )
        synapse_setall.rawAsynchronousMoveTo("Open circuit")
        #configure synapse
        synapseHigh1 = whichSynapseTerminal(args[0])
        synapseHigh1.rawAsynchronousMoveTo("Source high")
        synapseHigh2 = whichSynapseTerminal(args[1])
        synapseHigh2.rawAsynchronousMoveTo("Source high")
        synapseLow1 = whichSynapseTerminal(args[2])
        synapseLow1.rawAsynchronousMoveTo("Source low")
        synapseLow2 = whichSynapseTerminal(args[3])
        synapseLow2.rawAsynchronousMoveTo("Source low")
        sleep(0.2)  #ensure above finished before statement below
        #configure keithley
        keithleyReset(kei2461)
        keithleySourceCurrentMode(kei2461)
        keithleySenseVoltageMode(kei2461)
        keithleyAutoRange(kei2461)
        keithleyConfigurePulse(kei2461, args[4], args[5], args[6], args[7])
        keithleyStartSweep(kei2461)
        keithleyWait(kei2461)
        sleep(0.2)  #ensure above finished before statement below

        synapse_setall.rawAsynchronousMoveTo("STV")
        print "Pulse sweep completed."

    else:
        raise Exception(
            "Number of parameters is wrong, require 6 or 8 arguments.")