8-ID
  8-ID Beamline logbook mirror  Not logged in ELOG logo
Message ID: 609     Entry time: Wed Dec 5 10:04:22 2018
Author: Joe Strzalka 
Type: 8-ID-E 
Category: Controls 
Subject: Keithley 2400 sourcemeter sweep scan support 
For description of use and EPICS support see entry 528/ mirror 528.

In October 2018, the Nie group (LANL) wanted to apply linear staircase sweep scans on their samples with in situ GIWAXS measurements (see the Keithley 2400 Series Sourcemeter manual, Chapter 10, Sweep Operation, especially Table 10-4, "Staircase sweep programming example"). Initial support and asyn communications were inadequate for sweep scan operations, because it limited readout of the output to 40 characters at a time. Max Wyman of BCDA modified the support on ioc8idd to support waveform output while continuing to support the existing GUI. Attachment 1 is Max's documentation of this effort and some description of how to use the new support. Max's comment in email (2018.12.04):
"I've updated my documentation -- the only thing to note is that when getting the data, you must wait until the scan is complete, i.e. you'll need a delay between setting the PV's PROC to 1 and the caget of the PV.
In your python script, you might be able to check PV's timestamp as an indicator of when the scan is complete.

"I also found another function for automatically turning on/off the output ("SOUR:CLE:AUTO ON"), I've added it to the script to replace the ":OUTP ON" command. I've attached an updated setup script."

Our operating mode for the sweep scans is to execute a shell script that executes a series of caput commands to the asyn communications to set the parameters of the sweep scan (attachment 2 -- slightly modified from the setup script Max mentioned in his comments). Then we execute a shell script (attachment 3 -- changed extension from .py to .txt for convenience) to execute python code to run the sweep scan and save the data as 2-column ascii data to the filename given as the command line argument.
Usage:
testnewsweep.py testfilename

When different resistors are applied as loads, the two scripts generate data plotted in Attachment 4.

Future work:
* User experiment will require signal averaging over many cycles of sweep scans -- see attachment 5, a shell script that sets parameters for the Keithely's built-in filtering capabilities for signal averaging
* Update script to check PV timestamp so that PV data read does not happen until sweep is complete -- see attachment 6
* Extend python code to plot the data
* Include some metadata into the file?
Attachment 1: ioc8idd_update_181203.pdf  52 kB
Attachment 2: sweepsetup_newer  1 kB  | Show | Show all
Attachment 3: testnewsweep_py.txt  1 kB  | Show | Show all
Attachment 4: Keithley2400output.png  29 kB  | Show | Show all
Attachment 5: sweepsetup_filter  760 Bytes  Uploaded Fri Dec 7 11:45:07 2018  | Show | Show all
Attachment 6: sweep_testdelay.py  1 kB  Uploaded Fri Dec 7 11:46:25 2018  | Show | Show all
ELOG V3.1.4-395e101