public class KeithleyDevice extends org.lsst.ccs.monitor.Device implements BiasDevice, PhotoDiodeDevice
| Modifier and Type | Field and Description |
|---|---|
static int |
CHAN_CURRENT |
static int |
CHAN_VOLTAGE |
static int |
NUM_CHANS |
| Constructor and Description |
|---|
KeithleyDevice() |
| Modifier and Type | Method and Description |
|---|---|
double |
accumBuffer(int nreads,
double nplc)
Start the accumulation of readings into the device's internal buffer
|
double |
accumBuffer(int nreads,
double nplc,
boolean wait)
Start the accumulation of readings into the device's internal buffer
|
double |
accumBufferEx(int nreads,
double nplc,
int nextrig,
double pause)
Start the accumulation of readings into the device's internal buffer
|
protected int[] |
checkChannel(String name,
int hwChan,
String type,
String subtype)
Checks a channel's parameters for validity.
|
void |
clearBuffer()
Clears the data buffer
|
protected void |
close()
Closes the connection.
|
String |
getAvgState()
Sets the
|
String |
getCurrentLimit()
Shows the soft current limit.
|
double |
getLast_curr()
Deprecated.
|
double |
getLast_volt()
Deprecated.
|
double |
getLastCurrent()
Gets the last current measurement
|
double |
getLastVoltage()
Gets the last voltage measurement
|
double |
getRunBias(int cfgstate)
Returns the bias value for acquisition
|
int |
getState()
Gets the state
|
double |
getVoltage()
Shows the set voltage.
|
protected void |
initDevice()
Performs initial configuration.
|
protected void |
initialize()
Performs full initialization - opens the connection
|
boolean |
isAccumInProgress()
Tells whether PD accumulation is in progress
|
boolean |
isDoPDPlot()
Gets whether PD plots are produced
|
String |
query(String str)
Writes a command to the Keithley and returns response
|
String |
query(String str1,
String str2)
Writes a command to the Keithley and returns response
|
void |
rampVolts(double duration,
double value)
Ramps to the desired voltage
|
void |
rampVolts(double duration,
double value,
int nsteps)
Ramps to the desired voltage over a given time and for nsteps
|
double[][] |
readBuffer()
Reads the data buffer
|
double[][] |
readBuffer(String filename)
Reads buffer and dumps it to a file
|
double[][] |
readBuffer(String filename,
String host)
Reads buffer and dumps it to a remote file
|
String |
readBufferStr()
Reads buffered data and returns it as a string
|
protected double |
readChannel(int chan,
int type)
Reads a channel.
|
double |
readCurrent()
Reads the actual current.
|
double[][] |
readCurrents(int nreads,
double nplc)
Gets a set of current readings
|
double |
readVoltage()
Reads the actual voltage.
|
void |
reset()
Resets the Keithley to a known default state
|
void |
send(String str)
Writes a command to the Keithley
|
void |
send(String str1,
String str2)
Writes a command to the Keithley
|
void |
setAbort(boolean state)
Sets the abort state
|
void |
setArmCount(int count)
Sets ARM count
|
void |
setAvgOn(boolean doAvg)
Sets the
|
void |
setBuffSize(int value)
Sets the buffer size
|
void |
setCfg(TSConfig cfg)
Sets the configuration
|
void |
setChannel(int value)
Sets the channel.
|
void |
setCurrentLimit(double value)
Sets the soft current limit.
|
void |
setCurrentRange(double value)
Sets the current range
|
void |
setDisplay(boolean dstate)
Sets the Display ON(true)/OFF(false)
|
void |
setDoPDPlot(boolean doPDPlot)
Sets whether PD plots are produced
|
void |
setDPSF(hep.aida.IDataPointSetFactory dpsf)
Sets the data point set factory address.
|
void |
setNAvg(int nAvg)
Sets the
|
void |
setOutput(int state)
Turns the output on or off.
|
void |
setRate(double rate)
Sets the read rate in PLC
|
void |
setRunBias(double runBias,
int cfgstate)
Sets the bias value for acquisition
|
void |
setState(int istate)
Sets the state
|
void |
setTimeout(double nsec)
Sets the timeout
|
void |
setTrigCount(int value)
Sets TRIGger count
|
void |
setVoltage(double value)
Sets the voltage.
|
void |
setVoltageAcq(int cfgstate)
Sets the voltage to the value needed for acquisition.
|
void |
setVoltageRange(double value)
Sets the voltage range
|
boolean |
showOutput()
Shows the output state.
|
void |
softReset()
Resets the Keithley to a known default state w/o initializing all settings
|
void |
waitAccum(double timeout)
Waits for accumulation to finish.
|
void |
zeroCorrectCurrent()
Zero correct the current
|
addLine, checkChannel, checkHwLine, checkLine, checkOnline, checkTimeout, configure, disable, dropChannel, dropChannel, enable, getDeviceMonitorUpdateTasks, getFullName, getGroupForChannel, getMonitorUpdateTasksForChannels, getName, getOutputLines, getPath, init, initChannel, initChannel, initChannel, initSensors, isEnabled, isHwLineSet, isLineSet, isOnline, isTimeout, readChannel, readChannelGroup, readChannelGroup, readChannelNow, setDisabled, setHwLine, setLine, setLineWarm, setOnline, setOutputLines, start, testOnlineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOnlineisOnlinepublic static final int CHAN_VOLTAGE
public static final int CHAN_CURRENT
public static final int NUM_CHANS
protected void initDevice()
initDevice in class org.lsst.ccs.monitor.Deviceprotected void initialize()
initialize in class org.lsst.ccs.monitor.Deviceprotected void close()
close in class org.lsst.ccs.monitor.Deviceprotected int[] checkChannel(String name, int hwChan, String type, String subtype) throws Exception
checkChannel in class org.lsst.ccs.monitor.Devicename - Channel namehwChan - Hardware channel numbertype - Channel typesubtype - Channel subtypeException - if parameter invalidprotected double readChannel(int chan,
int type)
readChannel in class org.lsst.ccs.monitor.Devicechan - type - public void setCfg(TSConfig cfg)
setCfg in interface BiasDevicesetCfg in interface PhotoDiodeDevicecfg - public void setDPSF(hep.aida.IDataPointSetFactory dpsf)
setDPSF in interface BiasDevicesetDPSF in interface PhotoDiodeDevicedpsf - The data point set factory@Command(name="setarmcount", description="Set the ARM count") public void setArmCount(@Argument(name="count",description="ARM count") int count) throws org.lsst.ccs.drivers.commons.DriverException
count - The arm countorg.lsst.ccs.drivers.commons.DriverException@Command(name="settrigcount", description="Set the trigger count") public void setTrigCount(@Argument(name="value",description="trigger count") int value) throws org.lsst.ccs.drivers.commons.DriverException
value - The count valueorg.lsst.ccs.drivers.commons.DriverException@Command(name="setdisplay", description="Set the display") public void setDisplay(@Argument(name="OnOff",description="true(ON)/false(OFF)") boolean dstate) throws org.lsst.ccs.drivers.commons.DriverException
setDisplay in interface PhotoDiodeDevicedstate - org.lsst.ccs.drivers.commons.DriverException@Command(name="clrbuff", description="Clears the Keithley read buffer") public void clearBuffer() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="readCurrents", description="Read a set of currents") public double[][] readCurrents(@Argument(name="nreads",description="#reads (armcount)") int nreads, @Argument(name="nplc",description="#Pulse Line Counts btwn reads (0.01->60.)") double nplc) throws org.lsst.ccs.drivers.commons.DriverException
nreads - nplc - org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="accumBuffer", description="start the buffer accumulation") public double accumBuffer(@Argument(name="nreads",description="#reads (armcount)") int nreads, @Argument(name="nplc",description="#Pulse Line Counts btwn reads (0.01->60.)") double nplc)
accumBuffer in interface PhotoDiodeDevicenreads - nplc - @Command(type=QUERY, name="accumBuffer", description="start the buffer accumulation") public double accumBuffer(@Argument(name="nreads",description="#reads (armcount)") int nreads, @Argument(name="nplc",description="#Pulse Line Counts btwn reads (0.01->60.)") double nplc, @Argument(name="wait",description="to wait (true) or not to (false)") boolean wait)
accumBuffer in interface PhotoDiodeDevicenreads - nplc - wait - @Command(type=QUERY, name="accumBuffer", description="start the buffer accumulation") public double accumBufferEx(@Argument(name="nreads",description="#reads (armcount)") int nreads, @Argument(name="nplc",description="#Pulse Line Counts btwn reads (0.01->60.)") double nplc, @Argument(name="nextrig",description="the number of extra triggers") int nextrig, @Argument(name="pause",description="pause in seconds between triggers") double pause)
accumBufferEx in interface PhotoDiodeDevicenreads - nplc - nextrig - pause - @Command(type=QUERY, name="waitAccum", description="wait for accumulation completion") public void waitAccum(@Argument(description="Timeout (sec)") double timeout) throws org.lsst.ccs.drivers.commons.DriverException
waitAccum in interface PhotoDiodeDevicetimeout - org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="readBuffer", description="read the buffer") public double[][] readBuffer() throws org.lsst.ccs.drivers.commons.DriverException
readBuffer in interface PhotoDiodeDeviceorg.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="readBuffer", description="read the buffer and dump to file") public double[][] readBuffer(@Argument(name="filename",description="output filename for the Keithley buffered values") String filename) throws org.lsst.ccs.drivers.commons.DriverException
filename - org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="readBuffer", description="read the buffer and dump to file") public double[][] readBuffer(@Argument(name="filename",description="output filename for the Keithley buffered values") String filename, @Argument(name="host",description="user@host") String host) throws IOException, org.lsst.ccs.drivers.commons.DriverException
filename - host - IOExceptionorg.lsst.ccs.drivers.commons.DriverException@Command(name="readBufferStr", description="read the buffer and returns as a string") public String readBufferStr() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setBuffSize", description="Set the buffer size.") public void setBuffSize(@Argument(description="buffer size") int value) throws org.lsst.ccs.drivers.commons.DriverException
setBuffSize in interface PhotoDiodeDevicevalue - org.lsst.ccs.drivers.commons.DriverException@Command(name="setVoltageRange", description="Set the voltage range. Can be 10V, 50V or 500V") public void setVoltageRange(@Argument(description="Voltage Range to set") double value) throws org.lsst.ccs.drivers.commons.DriverException
setVoltageRange in interface BiasDevicevalue - org.lsst.ccs.drivers.commons.DriverException@Command(name="setVoltage", description="Set the voltage") public void setVoltage(@Argument(name="value",description="Voltage to set") double value) throws org.lsst.ccs.drivers.commons.DriverException
setVoltage in interface BiasDevicevalue - org.lsst.ccs.drivers.commons.DriverException@Command(name="setChannel", description="not implemented") public void setChannel(@Argument(name="value",description="Channel to select") int value)
setChannel in interface PhotoDiodeDevicevalue - @Command(name="setVoltageAcq", description="Set the voltage to the acquisition set point") public void setVoltageAcq(int cfgstate) throws org.lsst.ccs.drivers.commons.DriverException
setVoltageAcq in interface BiasDevicecfgstate - org.lsst.ccs.drivers.commons.DriverException@Command(name="setAvgOn", description="Control whether the averaging is on") public void setAvgOn(boolean doAvg) throws org.lsst.ccs.drivers.commons.DriverException
setAvgOn in interface BiasDevicesetAvgOn in interface PhotoDiodeDevicecfgstate - org.lsst.ccs.drivers.commons.DriverException@Command(name="setNAvg", description="Controls have many samples to average over") public void setNAvg(int nAvg) throws org.lsst.ccs.drivers.commons.DriverException
setNAvg in interface BiasDevicesetNAvg in interface PhotoDiodeDevicecfgstate - org.lsst.ccs.drivers.commons.DriverException@Command(name="getAvgState", description="true = averaging on") public String getAvgState() throws org.lsst.ccs.drivers.commons.DriverException
getAvgState in interface BiasDevicegetAvgState in interface PhotoDiodeDevicecfgstate - org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="rampVolts", description="ramp the voltage") public void rampVolts(@Argument(description="number of seconds to ramp from current voltage to desired voltage") double duration, @Argument(description="Voltage to ramp to") double value) throws org.lsst.ccs.drivers.commons.DriverException
rampVolts in interface BiasDeviceduration - value - org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="rampVolts", description="ramp the voltage") public void rampVolts(@Argument(name="duration",description="number of seconds to ramp from current voltage to desired voltage") double duration, @Argument(name="value",description="Voltage to ramp to") double value, @Argument(name="nsteps",description="number of steps") int nsteps) throws org.lsst.ccs.drivers.commons.DriverException
rampVolts in interface BiasDeviceduration - value - nsteps - org.lsst.ccs.drivers.commons.DriverException@Command(description="return last current measurement") public double getLastCurrent()
getLastCurrent in interface BiasDevicegetLastCurrent in interface PhotoDiodeDevice@Deprecated @Command(description="return last current measurement") public double getLast_curr()
@Command(description="return last voltage measurement") public double getLastVoltage()
getLastVoltage in interface BiasDevice@Deprecated @Command(description="return last voltage measurement") public double getLast_volt()
@Command(description="Show the set voltage") public double getVoltage() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, description="Read the actual voltage") public double readVoltage()
readVoltage in interface BiasDevice@Command(name="setCurrentRange", description="Set the current range") public void setCurrentRange(@Argument(description="Current Range to set") double value) throws org.lsst.ccs.drivers.commons.DriverException
setCurrentRange in interface BiasDevicesetCurrentRange in interface PhotoDiodeDevicevalue - The current rangeorg.lsst.ccs.drivers.commons.DriverException@Command(name="zeroCorrectCurrent", description="Zero correct the current") public void zeroCorrectCurrent() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="readCurrent", description="Read the actual current") public double readCurrent()
readCurrent in interface BiasDevicereadCurrent in interface PhotoDiodeDevice@Command(type=QUERY, name="isAccumInProgress", description="Are the current readings being accumulated") public boolean isAccumInProgress()
isAccumInProgress in interface PhotoDiodeDevice@Command(name="setCurrentLimit", description="Set the soft current limit") public void setCurrentLimit(@Argument(description="Current limit to set") double value) throws org.lsst.ccs.drivers.commons.DriverException
setCurrentLimit in interface BiasDevicevalue - The limit valueorg.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="showcurrlim", description="Show the soft current limit") public String getCurrentLimit() throws org.lsst.ccs.drivers.commons.DriverException
getCurrentLimit in interface BiasDeviceorg.lsst.ccs.drivers.commons.DriverException@Command(name="setRate", description="sets the read rate in plc") public void setRate(@Argument(description="number of PLC") double rate) throws org.lsst.ccs.drivers.commons.DriverException
setRate in interface PhotoDiodeDevicerate - The inverse rate, in clock ticksorg.lsst.ccs.drivers.commons.DriverException@Command(name="setOutput", description="Turn output on or off. 1 ==> ON") public void setOutput(@Argument(description="Output state: on or off") int state) throws org.lsst.ccs.drivers.commons.DriverException
setOutput in interface BiasDevicestate - Output state (on if 1, off otherwise)org.lsst.ccs.drivers.commons.DriverException@Command(type=QUERY, name="showoutput", description="Show the output state") public boolean showOutput() throws org.lsst.ccs.drivers.commons.DriverException
showOutput in interface BiasDeviceorg.lsst.ccs.drivers.commons.DriverException@Command(name="setTimeout", description="set timeout for Keithley SCPI communication") public void setTimeout(@Argument(name="nsec",description="length of timeout in seconds") double nsec)
setTimeout in interface BiasDevicesetTimeout in interface PhotoDiodeDevicensec - Timeout (secs)@Command(name="reset", description="reset trips etc...") public void reset()
reset in interface BiasDevicereset in interface PhotoDiodeDevice@Command(name="softReset", description="soft reset etc...") public void softReset()
softReset in interface BiasDevicesoftReset in interface PhotoDiodeDevice@Command(name="setrunbias", description="Sets the bias value for acquisition") public void setRunBias(double runBias, int cfgstate)
setRunBias in interface BiasDevicerunBias - cfgstate - @Command(type=QUERY, name="getRunBias", description="Returns the bias value for acquisition") public double getRunBias(int cfgstate)
getRunBias in interface BiasDevicecfgstate - @Command(name="abort", description="abort or clear abort for any long operation") public void setAbort(boolean state)
setAbort in interface BiasDevicesetAbort in interface PhotoDiodeDevicestate - @Command(name="setstate", description="set keithley device status") public void setState(int istate)
setState in interface BiasDevicesetState in interface PhotoDiodeDeviceistate - @Command(type=QUERY, name="getState", description="get keithley device status") public int getState()
getState in interface BiasDevicegetState in interface PhotoDiodeDevicepublic boolean isDoPDPlot()
@Command(description="set whether PD plots are produced") public void setDoPDPlot(@Argument(description="true for do plots") boolean doPDPlot)
setDoPDPlot in interface PhotoDiodeDevicedoPDPlot - Whether plots are produced@Command(name="send", description="write a string to the device") public void send(String str) throws org.lsst.ccs.drivers.commons.DriverException
send in interface PhotoDiodeDevicestr - org.lsst.ccs.drivers.commons.DriverException@Command(name="send", description="write a string to the device") public void send(String str1, String str2) throws org.lsst.ccs.drivers.commons.DriverException
send in interface PhotoDiodeDevicestr1 - str2 - org.lsst.ccs.drivers.commons.DriverException@Command(name="query", description="write a command and read response") public String query(String str) throws org.lsst.ccs.drivers.commons.DriverException
query in interface PhotoDiodeDevicestr - org.lsst.ccs.drivers.commons.DriverException@Command(name="query", description="write a command and read response") public String query(String str1, String str2) throws org.lsst.ccs.drivers.commons.DriverException
query in interface PhotoDiodeDevicestr1 - str2 - org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2022 LSST. All rights reserved.