-
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.
-
RE: running python code on SMU 2612 (through keithley2600-drivers.py package)
Check the exact model of your SMU.
Is it the original 2612 release? Or does it have 2612A or 2612B letter suffix.
It is only the A or B versions of the 2600x series that have the trigger model and the smuX.trigger.X commands.
It seems the Python driver you are attempting to use made use of those commands, therefore a 2612 cannot use the driver.
You would need to directly call one of the sweep commands of the instrument API (reference manual) or use a for loop in Python to program each source level and single measurement. -
RE: Interface digital triggers of 2182A to 2600B
The TLINK connector on the 2182A is an 8 pin mini DIN style (google it).
The digital IO on the 2600B is on a DB25.
I'll upload some images for an obsolete accessory product that used to serve this purpose.
The one image has the pinout info for the mini DIN to DB25 connections.
-
RE: 2400 SMU range compliance
You still get the full precision of the instrument according to the range and NPLC settings, etc.
The reason you are encountering range compliance even if current auto range is enabled is because the range change that would occur to get out of range compliance will not commence until you ask for a measurement.
When not connected over the bus to PC, the instrument does continuous init of new measurements in local mode.
But once you go under remote operations, that stops and you have to manage all the details.
I am not 100% sure if this will work: After you source your new voltage value, you could query the value of the measurement condition register (read the value after this command: :stat:meas:cond?). Bit 14 will reflect in compliance or not state. I'm not sure if both range compliance and real compliance will cause this bit to go to logic 1. It might only be real compliance.
If using the more complex source-memory sweeps, there is the current range holdoff.
This feature sets the measure range = range needed for the current limit just before sourcing new voltage.
When creating the step change of voltage, there will be a displacement current (I = C * dV/dt) and the higher range gives best chance to not saturate due to current range.
Then it resumes use of the last used lower measure range for the measurement.