• RE: 4200A-SCS command "GD" and "EX" cannot find user library

    IP address is controlled in the "normal" way for a Windows computer (Network settings).
    Good question about if it uses the upper or lower port.  I find that it uses the one that is connected to my network.
    If I have LAN cable connected to both of them, I'm finding that KXCI will attach the IP address of the upper port.

    I did a little experiment with the commands.
    In KULT, build a simple Library and Module for the the system beep to play a tone.
    I'm able to remotely execute it with the UL and EX commands.
    The GD command brings back the info about the parameters of the library.
    See the attached images.

    I've got version 1.11 of Clarius on the 4200A-SCS
  • RE: AFG31000 Series - Sample Code for using optional SEQuencer

    If the optional SEQ license is not there, then the SEQ feature of Advanced mode can still be used, but only in run mode = continuous.
    Continuous also limits you to one waveform entry with infinite repeat.
    Wait, jump are disabled too.

    Both channels can have a waveform (but need same number of points in each).

    Right now, it seems the only means to present a single waveform file that contains more than 131K entries to the SEQ is to bring it on a thumb drive (*.tfwx).

    How to get it onto a thumb drive?  I used ArbExpress (3.6).  Use the File>Open to open a saved scope waveform or a csv file of the waveform.  Then use File>Save As to save the tfwx file for the AFG to use.
    Hopefully in near future we will have an API for creating the large sequence directly onto the AFG storage.
  • RE: AFG31022 downloading waveforms

    Here is a Python sample for loading a custom waveform to the standard ARB mode.
    It was targeting generation of double pulse test waveform type.
    It is easy matter to save the EMEM memory to a tfwx file on the M: or U: drive for use in the SEQ.
     
    '''
    Create waveform and send to AFG31102
    
    Double Pulse Test Waveform
    
                  --- A1----                ---A2--- 
                 |          |              |        |
                |            |            |          |
    -----------|              |----------|            |------------
    
    <--  t1 -->|<--- t2 --->|<-----t3---->|<---t4---->|<---t5---->|
    
    
    Pulse Heights, A1 and A2 , correspond to the Vgs applied to the FET
    and therefore control the Ids current level.
    
    rise/fall times = don't care yet
    
    duration of other time segements = important
    
    '''
    
    import pyvisa
    import numpy as np # for test wave
    import matplotlib.pyplot as plt # for plotting, not required
    
    #time durations for our waveform
    t1 = 1e-6
    t2 = 1e-6    #duration of A1
    t3 = 1e-6  # off time in between two pulses
    t4 = 1e-6   #duration of A2
    t5 = 1e-6
    #voltage amplitudes of the pulses
    A1 = 1.25    #volts
    A2 = 3    #volts
    AFG_SampleRate = 250e6
    
    
    
    total_time = t1 + t2 + t3 + t4 + t5
    t_axis = np.arange(0, total_time, 1/AFG_SampleRate)
    wave = np.multiply(0, t_axis)      # populate with zeros
    
    ARB_SRC_FREQ = int (AFG_SampleRate / len(t_axis))
    
    
    print('********************')
    print('ARB_SRC_FREQ: ' + str(ARB_SRC_FREQ))
    print('without option, limit size of ARB to 131K entries')
    print('Num Pts per ARB Waveform: ' + str(len(t_axis)))
    print(len(wave))
    
    #overwrite some of the zeros with our pulse height values
    
    #first pulse
    start_index=int(t1 * AFG_SampleRate)
    stop_index = start_index + int(t2 * AFG_SampleRate)
    print('start index pulse1: ' + str(start_index))
    print('stop index pulse1: ' + str(stop_index))
    for i in range(start_index, stop_index):    #pulse top
        wave[i] = A1
    
    # second pulse
    start_index=int((t1+ t2+ t3) * AFG_SampleRate)
    stop_index = start_index + int(t4* AFG_SampleRate)
    print('start index pulse2: ' + str(start_index))
    print('stop index pulse2: ' + str(stop_index))
    for i in range(start_index, stop_index):    #pulse top
        wave[i] = A2
        
    #build normalized array
    # normalize to dac values
    m = 16382 / (wave.max() - wave.min())
    b = -m * wave.min()
    dac_values = (m * wave + b)
    np.around(dac_values, out=dac_values)
    dac_values = dac_values.astype(np.uint16)
    
    
    # plot (optional)
    plt.plot(dac_values)
    plt.show()
    
    #Get the this from NI-MAX
    instrumentdescriptor = 'USB0::0x0699::0x035A::C013392::INSTR'
    #instrumentdescriptor = 'GPIB0::11::INSTR'
    
        
        
    print('****************************************')
    debug = 0
    if debug:
        for item in wave:
            print(item)
        
    
    #Write the waveform to a text file 
    debug = 0
    if debug:
        fid = open('waveform.txt', 'w')
        for j in wave:
            fid.write(str(j) + '\n')
        fid.close()
    
    
    print('Sending waveform to AFG')
    
    
    #Next sending to the AFG
    resource_mgr = pyvisa.ResourceManager()
    AFG = resource_mgr.open_resource(instrumentdescriptor)
    AFG.read_termination = '\n'
    AFG.encoding = 'latin_1'
    
    def halt_on_msg():
        e = int(AFG.query('*esr?'))
        if e != 0:
            raise Exception('non-zero esr')
    
    
    print(AFG.query('*IDN?'))
    #reset and clear the AFG status
    AFG.write('*rst')
    AFG.write('*cls')
    
    #configure the channel to play arbitrary waveform, burst mode, .2ms timer
    #on trigger, 0 - 5V output, 1 cycle of waveform per occurance.
    AFG.write('source1:function ememory')
    AFG.write('OUTP1:IMP INF')    #MAX=10Kohms, INF is >10K, MIN=1ohm
    AFG.write('source1:frequency ' + str(ARB_SRC_FREQ)  )
    AFG.write('source1:burst:mode trig')
    AFG.write('source1:burst:ncycles 1')
    AFG.write('source1:burst:state on')
    AFG.write('trigger:sequence:timer 0.005')
    AFG.write('source1:voltage:high ' + str(wave.max()))
    AFG.write('source1:voltage:low ' + str(wave.min()))
    #AFG.write('source1:voltage:offset 2.5')
    
    
    # ****************  send the ARB waveform ******************
    
    halt_on_msg()
    
    # datatype = "H" means unsigned short format
    AFG.write_binary_values(':TRAC:DATA EMEM1,',
                            dac_values,
                            datatype='h',                 
                            is_big_endian=True) 
    
    halt_on_msg()
    
    
    
    #finally, turn the output on
    AFG.write('output1 on')
    
  • AFG31000 Series - Sample Code for using optional SEQuencer

    On the AFG31K models, in the Advanced mode, the SEQ feature is separately licensed.
    Trial license can be obtained here:  Tek AMS Trial License for AFG

    Here is a Python simple demo program to use the SEQ feature from the sample waveform files on the unit P: drive for predefined waveforms.
     
    import pyvisa
    import time
    
    #Get the this from NI-MAX
    instrumentdescriptor = 'USB0::0x0699::0x035A::C013392::INSTR'
    debug = 1
    # define a couple helper functions
    def error_check():
        e = int(AFG.query('*esr?'))
        if e != 0:
            err_msg = AFG.query("SYST:ERR?")
            print(err_msg)
            #raise Exception('non-zero esr: ' + err_msg)
    # some operations need a litte time
    # and if we send next command too soon, bad things happen.
    # so use the operation complete query to be kind to AFG.
    # if operation takes longer than our VISA timeout, that errow will occur
    def check_if_done():
        e = int(AFG.query('*opc?'))
        if e != 1:
            print("did we get visa timeout?")
    
    # ***************  Connect to AFG
    resource_mgr = pyvisa.ResourceManager()
    AFG = resource_mgr.open_resource(instrumentdescriptor)
    AFG.read_termination = '\n'
    AFG.encoding = 'latin_1'  #for any binary data, this is needed
    AFG.timeout = 10000   #number of msec before timeout error for VISA read
    print(AFG.query('*IDN?'))
    print("Do you have the SEQ license?")
    print(AFG.query("LIC:LIST?"))  # make sure you have SEQ license!!
    #reset and clear the AFG status
    AFG.write('*RST')
    AFG.write('*CLS')
    
    #put instrument into Advanced/SEQ mode
    AFG.write("SEQControl:STATe ON")
    check_if_done()
    AFG.write("SEQuence:NEW")  #this gives us "clean slate" in the SEQ setup
    check_if_done()
    AFG.write("SEQControl:RMODe SEQ")  # run node = SEQ
    check_if_done()
    AFG.write("SEQuence:LENGth 2")  #this example will load two index in our SEQ
    AFG.write("SEQControl:SRATe 5.0E6")
    AFG.write("SEQControl:SOURce1:SCALe 100")  # 1000 is max value = FS of your AFG model
    AFG.write("SEQControl:SOURce1:OFFSet 0")  #offset in volts
    # load files from predefined location (P:)
    # this gives our sequence two Waveforms to use
    AFG.write("WLISt:WAVeform:IMPort \"P:/Pulse1000.tfwx\"")
    check_if_done()
    if debug: error_check()
    AFG.write("WLISt:WAVeform:IMPort \"P:/Sine1000.tfwx\"")
    check_if_done()
    if debug: error_check()
    
    AFG.write("SEQuence:ELEM1:WAVeform1 \"P:/Pulse1000.tfwx\"")  # load first element
    check_if_done()
    if debug: error_check()
    AFG.write("SEQuence:ELEM2:WAVeform1 \"P:/Sine1000.tfwx\"")   # load second element
    check_if_done()
    if debug: error_check()
    # set Repeat values for each element
    AFG.write("SEQuence:ELEM1:LOOP:COUNt 5")  # up to 1E6
    check_if_done()
    if debug: error_check()
    AFG.write("SEQuence:ELEM2:LOOP:COUNt 3")
    check_if_done()
    if debug: error_check()
    # have last element GOTO index 1 element
    AFG.write("SEQuence:ELEM2:GOTO:STATe 1")  # enable GOTO index behavior
    AFG.write("SEQuence:ELEM2:GOTO:INDEX 1")  # have last index GOTO index 1
    check_if_done()
    if debug: error_check()
    #the SEQ is loaded...now run it
    AFG.write("OUTPut1:IMPedance INF")  # presently connected to Hi-Z scope channel
    AFG.write("OUTPut1:STATe ON")
    AFG.write("SEQControl:RUN:IMMediate")
    
    time.sleep(5)  # let it run for a few seconds
    
    AFG.write("SEQControl:STOP:IMMediate")
    check_if_done()   # this is one example where a little time needed
    AFG.write("OUTPut1:STATe OFF")   # if you want the output reliably turned off
    
    #clean up our VISA connection
    AFG.clear()
    AFG.close()
    resource_mgr.close()
    print("*** all done ****")
    
  • RE: 4200A-SCS command "GD" and "EX" cannot find user library

    Here I've managed to attach the document.

    As for the warning, I agree with you.  Once KXCI using GPIB is invoked, the GPIB interface can no longer be controller in charge.
    So if you had a KULT library that controlled an external item over GPIB bus, seems there would be prohibition to execute that KULT code from the UL and EX of KXCI.....if using KXCI over GPIB.
    Can you try LAN for KXCI?  If you use LAN, be sure to append null ('\0') onto your command strings.

    What version of Clarius software is on your 4200A-SCS?
  • RE: 4200A-SCS command "GD" and "EX" cannot find user library

    Here is an older forum post showing some success, but with different module:

    Successful Use of UL and EX with KXCI

    Is the external 707x matrix the item you need to control?  Or just using it as a sample?

     

  • RE: Interlock 6517b

    Because the 1000V supply poses a shock hazard, it makes use of an interlock signal.
    Ideally, you would have a physical barrier/test fixture with a door and door-switch.
    When door open, the open switch prohibits the high voltage operation.
    When door closed, the closed switch permits the high voltage operation.

    Figure 26 in the Reference manual, pg 314, illustrates this simple open vs. closed connection to the interlock connector.

    This is similar to how a microwave oven and the door state behaves.

    There is no means to turn interlock off.

     
  • RE: Counterparts for following keysight equipments

    The 34980A is a 6.5 digit measuring tool, but is full rack and 8 slots for cards to make it multi-channel tool.
    If you need the high number of slots for cards, consider our model 3706A and the various 37xx cards.
    The 3706A is a 7.5 digit measuring tool and has six slots for cards.

    If number of slots for cards is not important, consider the 6.5 digit DAQ6510 which has two slots for various 77xx cards.

     
  • RE: GPIB-to-USB connection of Keithley 2260B-800-1 via TEK-USB-488 GPIB to USB adapter

    Hello Abel,

    Use of the (now obsolete) 2260B-GPIB-USB was the only sanctioned way to accomplish a GPIB based connection to the 2260B power supply.

    The USB on rear of 2260B has to be configured via the F-21 setup.  Set it to value 2 to enable the USB-CDC mode.
    If you manage to obtain a 2260B-GPIB-USB, set it to 3 to interface with that adapter.

    It seems your options are boiling down to use the USB-CDC based connection or use LAN.
    When using the USB-CDC, the simple USB A-B cable can connect the power supply to the PC.
    On the PC side, it will look like a COM port (RS-232).
    You could use VISA with the ASRLx resource that the COM port will utilize.


    NOTE:  the TEK-USB-488 GPIB to USB adapter is expecting to be connected to a USB-TMC compliant instrument.
     
  • RE: running python code on SMU 2612 (through keithley2600-drivers.py package)

    Hi Sébastien,

    Unfortunately, it seems the keithley2600 driver posted to Univ of Cambridge github will not be compatible with the older 2612 that does not bear the A or B suffix.
    Some commands might work, but sweeps that use the trigger commands will not be understood by the older 2612 model and syntax error will result.

    I've attached a PDF document that was written about the time of the older 2612.  It has some sample scripts for FET and BJT tests.
    You'll just need to send these commands and read back the results into Python for file save, graphing, etc.

    Take a look at PySimpleGUI if you want a form with buttons and graphs and such.