Posted Thu, 02 Nov 2023 17:33:59 GMT by zabel, james
Hello,
I am trying to remotely configure and remotely control (via RS232) a triggered sweep using a Keithley 2182 and a Keithley 2400.  The configuration seems to work fine (though a few items I am configuring with button pushes).  I can provide the commands if warranted...

To start a triggered sweep by hand, I must first take both devices out of remote mode (press LOCAL), then turn on the output (press ON), and finally press TRIG followed by SWEEP.  I would like to do this through RS232 commands.

I have tried simulated button presses:
sourcemeter.write(":SYSTEM:KEY 24") # press the on/off output button
sourcemeter.write(":SYSTEM:KEY 20") # press the trigger button
sourcemeter.write(":SYSTEM:KEY 27") # press the sweep key button
sourcemeter.write(":SYSTEM:KEY 24") # press the on/off output button
but this does not start the triggered sweep and the 2400 no longer responds to remote commands.

If you switch the order:
sourcemeter.write(":SYSTEM:KEY 24") # press the on/off output button
sourcemeter.write(":SYSTEM:KEY 27") # press the sweep key button
sourcemeter.write(":SYSTEM:KEY 20") # press the trigger button
sourcemeter.write(":SYSTEM:KEY 24") # press the on/off output button
then the 2400 no longer responds to manual button presses and requires a reboot.

I have also tried the following commands:
sourcemeter.write(":OUTP:STAT ON") # turn on the output (press the on/off output button)
sourcemeter.write(":INIT")
sourcemeter.write(":SYSTEM:KEY 27") # press the sweep key button
sourcemeter.write(":OUTP:STAT OFF") # turn off the output (press the on/off output button)
Turning on and off the output works as expected.
If I send an INIT command between ON and OFF then the device seems to longer respond to remote commands.
If I send a SWEEP button press then the system locks up as before.

Is there a way to initiate a triggered sweep from remote commands?

Thanks.
Posted Thu, 02 Nov 2023 18:54:10 GMT by C, Andrea
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.

Posted Thu, 02 Nov 2023 20:01:56 GMT by zabel, james
Hello,
Yes, I do have a digital triggering cable between the two devices, and yes, I do have each device individually connected to my computer via an RS232 cable.

I am configuring the following trigger and sweep settings for the Source Meter found on page 5-12 from the 2182 Manual (Steps 3 & 5).
# Set up the Keithley 2400 (source meter)
sourcemeter.write("*CLS")            # clear errors
sourcemeter.write("*RST")            # reset
# configure trigger settings...
sourcemeter.write(":ARM:SOUR IMM")   # set Arm-Layer: Arm-In Event to IMMEDIATE
sourcemeter.write(":ARM:OLIN 3")     # set Arm-Layer: Arm-Out TLink Line to #3
# can't find the following control command...  seems to be fine with the default value
# sourcemeter.write(":ARM:")         # set Arm-Layer: Arm-Out Events to OFF
sourcemeter.write(":ARM:COUN INF")   # set Arm-Layer: Arm Count to INFINITE
sourcemeter.write(":TRIG:SOUR TLIN") # set Trig-Layer: Trigger-In Source to TRIGGER LINK
sourcemeter.write(":TRIG:ILIN 1")    # set Trig-Layer: Trigger-In TLink Line to #1
# can't find the following control command...  seems to be fine with the default value
# sourcemeter.write(":TRIG:")        # set Trig-Layer: Trigger-In Event Detect Bypass to NEVER
sourcemeter.write(":TRIG:INP SOUR")  # set Trig-Layer: Trigger-In Events to SOURCE=ON DELAY=OFF MEAS=OFF
sourcemeter.write(":TRIG:OLIN 2")    # set Trig-Layer: Trigger-Out TLink Line to #2
sourcemeter.write(":TRIG:OUTP SOUR") # set Trig-Layer: Trigger-Out Events to SOURCE=ON DELAY=OFF MEAS=OFF
sourcemeter.write(":TRIG:DEL 0")     # set Trig-Layer: Delay to 000.0000 s
sourcemeter.write(":TRIG:COUN 2")    # set Trig-Layer: Trig-Count to 0002
# configure sweep settings...
sourcemeter.write(":SOUR:FUNC CURR")          # set to a current source sweep
sourcemeter.write(":SOUR:CURR:MODE LIST")     # select current sweep mode (this is not set to custom)
sourcemeter.write(":SOUR:LIST:CURR .01,-.01") # sets the number of points to the number of values given
sourcemeter.write(":SENS:VOLT:PROT 21.0")     # set voltage compliance
I had to simulate button presses to set SWEEP TYPE to CUSTOM and to set SWEEP-COUNT to INFINITE.

I am also using the following settings for the Voltmeter:
# Set up the Keithley 2182 (voltmeter)
voltmeter.write("*CLS")               # clear errors
voltmeter.write("*RST")               # reset
voltmeter.write("SYST:CLE")           # Flush buffers
voltmeter.write("SYST:AZER:STAT OFF") # Turn off autozero
voltmeter.write(":SENS:CHAN 1")       # set up Ch1 as voltage
voltmeter.write(":TRIG:DEL 0")
voltmeter.write(":SENS:FUNC 'VOLT'")
voltmeter.write(":SENS:VOLT:DELTA ON") # set up Ch1 as differential voltage
voltmeter.write(":SENS:VOLT:NPLC 10")  # use signal averaging
voltmeter.write(":TRIG:SOUR EXT")      # external trigger

You must be signed in to post in this forum.