Package jisa.devices.interfaces
Class PID.Zone
- java.lang.Object
-
- jisa.devices.interfaces.PID.Zone
-
- Enclosing interface:
- PID
public static class PID.Zone extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Zone(double min, double max, double output, double range)
Creates a PID Zone where PID control is disabled, with a manual output value used instead.Zone(double min, double max, double P, double I, double D, double range)
Creates a PID Zone where PID control is enabled with specified PID values.Zone(org.json.JSONObject data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getD()
Returns the D value this zone is configured to use.double
getI()
Returns the I value this zone is configured to use.double
getLimit()
Returns the limit on the output to use for this zone.double
getMax()
Returns the maximum set-point value that this zone should be used for.double
getMin()
Returns the minimum set-point value that this zone should be used for.double
getOutput()
Returns the manual output value to be used for this zone, should PID control be disabled.double
getP()
Returns the P value this zone is configured to use.boolean
isAuto()
Returns whether PID control is to be use for this zone or not.boolean
matches(double value)
Returns whether this zone should be used for a given set-point value.org.json.JSONObject
toJSON()
Converts this object into JSON representation.
-
-
-
Constructor Detail
-
Zone
public Zone(org.json.JSONObject data)
-
Zone
public Zone(double min, double max, double P, double I, double D, double range)
Creates a PID Zone where PID control is enabled with specified PID values.- Parameters:
min
- Min set-point valuemax
- Max set-point valueP
- P valueI
- I ValueD
- D valuerange
- Output range
-
Zone
public Zone(double min, double max, double output, double range)
Creates a PID Zone where PID control is disabled, with a manual output value used instead.- Parameters:
min
- Min set-point valuemax
- Max set-point valueoutput
- Manual output valuerange
- Output range
-
-
Method Detail
-
getMin
public double getMin()
Returns the minimum set-point value that this zone should be used for.- Returns:
- Min set-point value
-
getMax
public double getMax()
Returns the maximum set-point value that this zone should be used for.- Returns:
- Max set-point value
-
getP
public double getP()
Returns the P value this zone is configured to use.- Returns:
- P value
-
getI
public double getI()
Returns the I value this zone is configured to use.- Returns:
- I value
-
getD
public double getD()
Returns the D value this zone is configured to use.- Returns:
- D value
-
getLimit
public double getLimit()
Returns the limit on the output to use for this zone.- Returns:
- Output limit/range
-
isAuto
public boolean isAuto()
Returns whether PID control is to be use for this zone or not.- Returns:
- Should PID control be enabled?
-
getOutput
public double getOutput()
Returns the manual output value to be used for this zone, should PID control be disabled.- Returns:
- Manual output value
-
matches
public boolean matches(double value)
Returns whether this zone should be used for a given set-point value.- Parameters:
value
- Set-point value- Returns:
- Should it be used?
-
toJSON
public org.json.JSONObject toJSON()
Converts this object into JSON representation.- Returns:
- JSON representation of this object
-
-