Using Keithley2700 Trigger-Options

Hello everyone,

I have been working on the various trigger methods for the Keithley2700 as part of a test setup. There is currently a beta class that I have modified a bit in light of the trigger issue.

I noticed that the measure() function executes a READ command which, according to the instructions, calls an internal function call of ABORt, INIT, FETCh. However, the ABORt function resets the trigger system, which means that any default settings are also reset before each measurement. I have therefore replaced this function with the successive execution of INIT (initializes the preset trigger) and FETCh (retrieves the last measured values from the device buffer and returns them).
In our case, we are working with the external trigger function of the device and it is initially very variable how much time there can be between the triggers (about 20 - 300 seconds).
However, the Keithley only outputs measured values if there are any in the buffer. This can lead to timeout errors, as the SweepMe backend automatically calls the call() function after some time, which outputs the measured values and returns them as a table.
That’s why I’m currently working with a small workaround that uses the query TRAC:FREE? within the measure() function, which specifies how large the part of the internal memory is that is occupied by measurement data. Here, due to the initially variable time span, a while loop is used to query whether measured values are already available.
This is unfavorable without a suitable termination condition apart from the buffer being sufficiently full, such as an event triggered by the STOP button.
I have already seen in the wiki under Call() - SweepMe! Wiki in which order the device functions are called and have seen that there is a function called trigger_ready().

My question would therefore be whether this function is already provided/implemented and if so, which scheme it follows.
If the function is not yet available, my question would be about a suitable way to query the Keithley with different trigger possibilities via the call() function only when measured values are available in the buffer.

Many thanks and best regards!

Mirko Kirchhoff

1 Like

Hello Mirko,

Thanks for taking the deep dive into the Keithley 2700 manual and sharing your findings here!

Indeed, splitting the READ command into subcommands and distributing them across different steps of the sequence is the SweepMe! way to go.
You can find an overview of functions for a sequence here:
Sequencer Procedure Overview

Recommended Function Usage:

  • trigger_ready() is executed before measure() and should be used to check if the device is ready for a measurement when changes have been made in adapt().
  • Use measure() to trigger the measurement.
  • Integrate your while loop that checks if the data is available within the request_result() function, which is called after measure().
  • Retrieve the data either in read_results() or call()

If you share your updated driver version here or on our GitHub repository SweepMe! Instrument Drivers, we will review it and update our Keithley 2700 driver with your changes.

Best,
Franz

1 Like

Hello Franz,

thank you very much for the quick and detailed answer! I’ll do so. But is there any possibilty in the request_result() - function to break the while-loop other than the buffer is filled enough ? Otherwise the programm may still running in the loop when I want to stop the measurement.

Best regards,

Mirko

You can add a function that aborts the while loop if the measurement is stopped in SweepMe, as described in this post: Catching stopped measurements in custom drivers

Best,
Franz

Nice, thank you so much !

1 Like