public abstract class PowerChannel extends Logger implements CurrentReadable, VoltageReadable
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_VOLTAGE_RESOLUTION
Default voltage resolution for power supply
|
long |
maxSettleMsec
Maximum allowed delay in milliseconds for voltage to reach within the
power supply's voltage resolution.
|
protected java.lang.String |
name |
float |
settleResolution
Delay between each voltage check in
waitForVoltage(float) . |
Constructor and Description |
---|
PowerChannel() |
Modifier and Type | Method and Description |
---|---|
abstract float |
getCurrentSetpoint()
Get the channel's current limit setpoint
|
java.lang.String |
getName()
Returns the name of the signal on this channel of the power supply (e.g.,
vdd, master clear, etc.)
|
java.lang.String |
getState()
Returns the name and state (voltage, current) of the channel
|
float |
getVoltageResolution()
Returns voltage resolution of power supply, if known.
|
abstract float |
getVoltageSetpoint()
Get the channel's voltage setpoint
|
abstract float |
readCurrent()
Measures the current on this channel of the power supply
|
float |
readCurrent(float ampsExpected,
float ampsResolution)
Measures current using range appropriate for
ampsExpected ,
and resolution of ampsResolution . |
abstract float |
readVoltage()
Measures the voltage on this channel of the power supply
|
abstract void |
setCurrent(float amps)
Set the channel's current limit to the value provided
|
abstract void |
setVoltageNoWait(float volts)
Set the channel's voltage to the value provided
|
void |
setVoltageWait(float volts)
Set the channel's voltage and wait until it reaches requested value.
|
java.lang.String |
toString()
Obsolete, use getState() instead
|
void |
waitForVoltage(float setVolts)
Waits until voltage measured on the channel is equal to setVolts within
the resolution of the power supply.
|
isLogInits, isLogOthers, isLogSets, logInit, logOther, logSet, setAllLogging, setLogInits, setLogOthers, setLogSets
public long maxSettleMsec
public float settleResolution
waitForVoltage(float)
.public static final float DEFAULT_VOLTAGE_RESOLUTION
protected java.lang.String name
public java.lang.String toString()
public java.lang.String getState()
public java.lang.String getName()
public abstract float readVoltage()
readVoltage
in interface VoltageReadable
public abstract float getVoltageSetpoint()
public float getVoltageResolution()
public abstract void setVoltageNoWait(float volts)
volts
- new voltage for the channel, in Voltspublic void setVoltageWait(float volts)
volts
- new voltage for the channel, in Voltspublic void waitForVoltage(float setVolts)
public abstract void setCurrent(float amps)
amps
- new current limit for the channel, in Ampspublic abstract float getCurrentSetpoint()
public float readCurrent(float ampsExpected, float ampsResolution)
ampsExpected
,
and resolution of ampsResolution
. Supplies that allow
range setting should override this default implementation.readCurrent
in interface CurrentReadable
ampsExpected
- expected value of current in amps, for range settingampsResolution
- desired resolution for measurement, in ampspublic abstract float readCurrent()
readCurrent
in interface CurrentReadable