Package jisa.devices.interfaces
Interface PID.Loop
-
- All Superinterfaces:
Instrument
- All Known Subinterfaces:
TC.Loop
- All Known Implementing Classes:
LS331.Loop
,LS336.Loop
,MercuryITC.Loop
,PID.ZonedLoop
,TC.ZonedLoop
- Enclosing interface:
- PID
public static interface PID.Loop extends Instrument
Represents a single (independent) PID loop within a PID controller
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Closes the connection to the instrument.java.util.List<? extends PID.Input>
getAvailableInputs()
Returns a list of all inputs that this loop is allowed to monitor.java.util.List<? extends PID.Output>
getAvailableOutputs()
Returns a list of all outputs that this loop is allowed to control.default java.util.List<Instrument.Parameter<?>>
getConfigurationParameters(java.lang.Class<?> target)
double
getDValue()
Returns the currently configured D single-value for the PID control of this loop.PID.Input
getInput()
Returns the Input object representing which input value this loop is configured to monitor.double
getIValue()
Returns the currently configured I single-value for the PID control of this loop.double
getManualValue()
Returns the value this loop is configured to use should PID control be disabled.java.lang.String
getName()
Returns the name of this loop.PID.Output
getOutput()
Returns the Output object representing which output channel this loop is configured to control.java.util.List<PID.Zone>
getPIDZones()
Returns a list of the currently configured PID zones to use for when PID zoning is enabled.double
getPValue()
Returns the currently configured P single-value for the PID control of this loop.double
getRampRate()
Returns the currently configured ramping rate for this loop.double
getSetPoint()
Returns the current configured set-point value for this loop.boolean
isPIDEnabled()
Returns whether PID control is currently enabled or disabled for this loop.boolean
isPIDZoningEnabled()
Returns whether PID zoning is currently enabled for this loop or not.boolean
isRampEnabled()
Returns whether the loop is currently using the configured ramp rate to ramp to its set-point or not.void
setDValue(double value)
Sets the (single) D value to use for the PID control of this loop.void
setInput(PID.Input input)
Sets which input value this loop should be monitoring.void
setIValue(double value)
Sets the (single) I value to use for the PID control of this loop.void
setManualValue(double value)
Sets the value this loop should output through its output channel should PID control be disabled.void
setOutput(PID.Output output)
Sets which output channel thsi loop should be controlling.void
setPIDEnabled(boolean flag)
Sets whether PID control is enabled or disabled for this loop.default void
setPIDValues(double p, double i, double d)
Sets the (single) P, I, and D values for the PID control of this loop.void
setPIDZones(java.util.List<PID.Zone> zones)
Sets the zones to use if PID zoning were to be enabled.default void
setPIDZones(PID.Zone... zones)
Sets the zones to use if PID zoning were to be enabled.void
setPIDZoningEnabled(boolean flag)
Sets whether PID zoning should be enabled for this loop or not.void
setPValue(double value)
Sets the (single) P value to use for the PID control of this loop.void
setRampEnabled(boolean flag)
Sets whether this loop should ramp to its set-point using the configured ramp rate.void
setRampRate(double limit)
Sets the maximum rate at which this loop should ramp to its set-point should ramping be enabled by use of setRampEnabled(...).void
setSetPoint(double value)
Sets the value of the set-point for this loop.default void
waitForStableValue(double target, double pct, long msec)
-
Methods inherited from interface jisa.devices.interfaces.Instrument
getAddress, getConfigurationParameters, getIDN, getLockObject, setTimeout
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of this loop.- Specified by:
getName
in interfaceInstrument
- Returns:
- Name of loop
-
setSetPoint
void setSetPoint(double value) throws java.io.IOException, DeviceException
Sets the value of the set-point for this loop.- Parameters:
value
- Set-point value to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getSetPoint
double getSetPoint() throws java.io.IOException, DeviceException
Returns the current configured set-point value for this loop.- Returns:
- Currently configured set-point value
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setRampEnabled
void setRampEnabled(boolean flag) throws java.io.IOException, DeviceException
Sets whether this loop should ramp to its set-point using the configured ramp rate.- Parameters:
flag
- Should ramping be enabled?- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
isRampEnabled
boolean isRampEnabled() throws java.io.IOException, DeviceException
Returns whether the loop is currently using the configured ramp rate to ramp to its set-point or not.- Returns:
- Is ramping enabled?
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setRampRate
void setRampRate(double limit) throws java.io.IOException, DeviceException
Sets the maximum rate at which this loop should ramp to its set-point should ramping be enabled by use of setRampEnabled(...).- Parameters:
limit
- Maximum ramping rate- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getRampRate
double getRampRate() throws java.io.IOException, DeviceException
Returns the currently configured ramping rate for this loop.- Returns:
- Currently configured ramping rate
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getPValue
double getPValue() throws java.io.IOException, DeviceException
Returns the currently configured P single-value for the PID control of this loop. This is overridden by any PID zoning, if enabled.- Returns:
- Currently configured P value
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getIValue
double getIValue() throws java.io.IOException, DeviceException
Returns the currently configured I single-value for the PID control of this loop. This is overridden by any PID zoning, if enabled.- Returns:
- Currently configured I value
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getDValue
double getDValue() throws java.io.IOException, DeviceException
Returns the currently configured D single-value for the PID control of this loop. This is overridden by any PID zoning, if enabled.- Returns:
- Currently configured D value
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPValue
void setPValue(double value) throws java.io.IOException, DeviceException
Sets the (single) P value to use for the PID control of this loop. This is only used if PID zoning is not enabled, otherwise it is overridden.- Parameters:
value
- P (single) value to use.- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setIValue
void setIValue(double value) throws java.io.IOException, DeviceException
Sets the (single) I value to use for the PID control of this loop. This is only used if PID zoning is not enabled, otherwise it is overridden.- Parameters:
value
- I (single) value to use.- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setDValue
void setDValue(double value) throws java.io.IOException, DeviceException
Sets the (single) D value to use for the PID control of this loop. This is only used if PID zoning is not enabled, otherwise it is overridden.- Parameters:
value
- D (single) value to use.- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPIDValues
default void setPIDValues(double p, double i, double d) throws java.io.IOException, DeviceException
Sets the (single) P, I, and D values for the PID control of this loop. These are only used if PID zoning is not enabled, otherwise they are overridden.- Parameters:
p
- P value to usei
- I value to used
- D value to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPIDZones
void setPIDZones(java.util.List<PID.Zone> zones) throws java.io.IOException, DeviceException
Sets the zones to use if PID zoning were to be enabled.- Parameters:
zones
- List of PID.Zone objects representing the PID zone table to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPIDZones
default void setPIDZones(PID.Zone... zones) throws java.io.IOException, DeviceException
Sets the zones to use if PID zoning were to be enabled.- Parameters:
zones
- PID.Zone objects representing the PID zone table to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getPIDZones
java.util.List<PID.Zone> getPIDZones() throws java.io.IOException, DeviceException
Returns a list of the currently configured PID zones to use for when PID zoning is enabled.- Returns:
- List of configured PID zones
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPIDZoningEnabled
void setPIDZoningEnabled(boolean flag) throws java.io.IOException, DeviceException
Sets whether PID zoning should be enabled for this loop or not.- Parameters:
flag
- Should it be enabled?- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
isPIDZoningEnabled
boolean isPIDZoningEnabled() throws java.io.IOException, DeviceException
Returns whether PID zoning is currently enabled for this loop or not.- Returns:
- Is it enabled?
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getInput
PID.Input getInput() throws java.io.IOException, DeviceException
Returns the Input object representing which input value this loop is configured to monitor.- Returns:
- Input object
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getOutput
PID.Output getOutput() throws java.io.IOException, DeviceException
Returns the Output object representing which output channel this loop is configured to control.- Returns:
- Output object
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setInput
void setInput(PID.Input input) throws java.io.IOException, DeviceException
Sets which input value this loop should be monitoring. Make sure to only pass this method an Input object that this loop is allowed to use. Check by using getAvailableInputs().- Parameters:
input
- Input object- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setOutput
void setOutput(PID.Output output) throws java.io.IOException, DeviceException
Sets which output channel thsi loop should be controlling. Make sure to only pass this method an Output object that this loop is allowed to use. Check by using getAvailableOutputs().- Parameters:
output
- Output object- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getAvailableOutputs
java.util.List<? extends PID.Output> getAvailableOutputs()
Returns a list of all outputs that this loop is allowed to control.- Returns:
- List of usable outputs
-
getAvailableInputs
java.util.List<? extends PID.Input> getAvailableInputs()
Returns a list of all inputs that this loop is allowed to monitor.- Returns:
- List of usable inputs
-
setManualValue
void setManualValue(double value) throws java.io.IOException, DeviceException
Sets the value this loop should output through its output channel should PID control be disabled.- Parameters:
value
- Manual value to use- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
getManualValue
double getManualValue() throws java.io.IOException, DeviceException
Returns the value this loop is configured to use should PID control be disabled.- Returns:
- Manual value configured to use
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
setPIDEnabled
void setPIDEnabled(boolean flag) throws java.io.IOException, DeviceException
Sets whether PID control is enabled or disabled for this loop.- Parameters:
flag
- Should PID control be enabled?- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
isPIDEnabled
boolean isPIDEnabled() throws java.io.IOException, DeviceException
Returns whether PID control is currently enabled or disabled for this loop.- Returns:
- Is PID control currently enabled?
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon compatibility error
-
close
default void close() throws java.io.IOException, DeviceException
Description copied from interface:Instrument
Closes the connection to the instrument.- Specified by:
close
in interfaceInstrument
- Throws:
java.io.IOException
- Upon communications errorDeviceException
- Upon incompatibility with device
-
getConfigurationParameters
default java.util.List<Instrument.Parameter<?>> getConfigurationParameters(java.lang.Class<?> target)
- Specified by:
getConfigurationParameters
in interfaceInstrument
-
waitForStableValue
default void waitForStableValue(double target, double pct, long msec)
-
-