Class ThermistorToLinearSensorActuator
- java.lang.Object
-
- org.openpnp.model.AbstractModelObject
-
- org.openpnp.spi.base.AbstractHeadMountable
-
- org.openpnp.spi.base.AbstractActuator
-
- org.openpnp.machine.reference.ReferenceActuator
-
- org.openpnp.machine.reference.actuator.ThermistorToLinearSensorActuator
-
- All Implemented Interfaces:
Identifiable
,Named
,Solutions.Subject
,Actuator
,HeadMountable
,Locatable
,Movable
,MovableMountable
,PropertySheetHolder
,WizardConfigurable
public class ThermistorToLinearSensorActuator extends ReferenceActuator
Performs inverse Steinhart-Hart and voltage divider calculations to convert from a thermistor reading to a linear voltage, with optional scaling. This is used to linearize sensor readings when used with controllers like Smoothie where the ADC inputs all go through thermistor conversions. This essentially reverses what happens inside Smoothie.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openpnp.machine.reference.ReferenceActuator
ReferenceActuator.MachineStateActuation
-
Nested classes/interfaces inherited from interface org.openpnp.spi.Actuator
Actuator.ActuatorValueType, Actuator.InterlockMonitor
-
Nested classes/interfaces inherited from interface org.openpnp.spi.Locatable
Locatable.LocationOption
-
Nested classes/interfaces inherited from interface org.openpnp.spi.PropertySheetHolder
PropertySheetHolder.PropertySheet
-
-
Field Summary
-
Fields inherited from class org.openpnp.machine.reference.ReferenceActuator
deleteAction, disabledActuation, enabledActuation, homedActuation, lastActuationValue, permutateDownAction, permutateUpAction, safeZ
-
Fields inherited from class org.openpnp.spi.base.AbstractActuator
defaultOffDouble, defaultOffString, defaultOnDouble, defaultOnString, head, id, interlockActuator, name, valueType, valueTypeConfirmed
-
Fields inherited from class org.openpnp.model.AbstractModelObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description ThermistorToLinearSensorActuator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getA()
double
getAdcMax()
double
getB()
double
getC()
double
getOffset()
PropertySheetHolder.PropertySheet[]
getPropertySheets()
double
getR1()
double
getR2()
double
getScale()
double
getvRef()
java.lang.String
read()
Read a value from the actuator.void
setA(double a)
void
setAdcMax(double adcMax)
void
setB(double b)
void
setC(double c)
void
setOffset(double offset)
void
setR1(double r1)
void
setR2(double r2)
void
setScale(double scale)
void
setvRef(double vRef)
-
Methods inherited from class org.openpnp.machine.reference.ReferenceActuator
actuate, actuate, actuate, actuateMachineState, actuateProfile, actuateProfile, driveActuation, driveActuation, driveActuation, fireProfilesChanged, getActuatorProfiles, getCameraToolCalibratedOffset, getChildPropertySheetHolders, getConfigurationWizard, getDefaultOffProfile, getDefaultOnProfile, getDisabledActuation, getEnabledActuation, getHeadOffsets, getHomedActuation, getIndex, getLastActuationValue, getProfileValues, getPropertySheetHolderActions, getPropertySheetHolderTitle, home, read, setActuatorProfiles, setDisabledActuation, setEnabledActuation, setHeadOffsets, setHomedActuation, setIndex, setLastActuationValue, setValueType, toString, tryActuateBoolean
-
Methods inherited from class org.openpnp.spi.base.AbstractActuator
actuate, assertOnOffDefined, assertOnOffDefined, coordinateWithMachine, findIssues, getDefaultOffDouble, getDefaultOffString, getDefaultOffValue, getDefaultOnDouble, getDefaultOnString, getDefaultOnValue, getDriver, getHead, getId, getInterlockMonitor, getName, getPropertySheetHolderIcon, getValueType, isActuated, isCoordinatedAfterActuate, isCoordinatedBeforeActuate, isCoordinatedBeforeRead, isInterlockActuator, isValueTypeConfirmed, setCoordinatedAfterActuate, setCoordinatedBeforeActuate, setCoordinatedBeforeRead, setDefaultOffDouble, setDefaultOffString, setDefaultOnDouble, setDefaultOnString, setDriver, setHead, setInterlockActuator, setInterlockMonitor, setName, setValueTypeConfirmed, suggestValueType, typedValue, typedValue
-
Methods inherited from class org.openpnp.spi.base.AbstractHeadMountable
applyConfiguration, getApproximativeLocation, getAxis, getAxisRotation, getAxisX, getAxisY, getAxisZ, getCalibratedHeadOffsets, getCoordinateAxisZ, getEffectiveSafeZ, getLocation, getMachine, getMappedAxes, getSafeZ, getSafeZZone, headMountableToRawZ, isInSafeZZone, isReachable, moveTo, moveTo, moveToSafeZ, moveToSafeZ, rawToHeadMountableZ, setAxis, setAxis, setAxisRotation, setAxisX, setAxisY, setAxisZ, setSafeZ, substituteUnchangedCoordinates, toAxesLocation, toHeadLocation, toHeadLocation, toHeadMountableLocation, toHeadMountableLocation, toMappedLocation, toRaw, toTransformed, waitForCompletion
-
Methods inherited from class org.openpnp.model.AbstractModelObject
addPropertyChangeListener, addPropertyChangeListener, dispose, dumpListeners, fireIndexedPropertyChange, firePropertyChange, isListener, isListener, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openpnp.spi.Actuator
isDriverless
-
Methods inherited from interface org.openpnp.spi.HeadMountable
getHead, setHead, toHeadLocation, toHeadMountableLocation, waitForCompletion
-
Methods inherited from interface org.openpnp.model.Identifiable
getId
-
Methods inherited from interface org.openpnp.spi.Locatable
getApproximativeLocation, getLocation
-
Methods inherited from interface org.openpnp.spi.Movable
getEffectiveSafeZ, getSafeZ, getSafeZZone, isInSafeZZone, isReachable, moveTo, moveTo, moveToSafeZ, moveToSafeZ
-
Methods inherited from interface org.openpnp.spi.MovableMountable
getAxis, getAxisRotation, getAxisX, getAxisY, getAxisZ, getMappedAxes, toRaw, toTransformed
-
Methods inherited from interface org.openpnp.model.Solutions.Subject
findIssues, getSubjectIcon, getSubjectText
-
-
-
-
Method Detail
-
read
public java.lang.String read() throws java.lang.Exception
Description copied from interface:Actuator
Read a value from the actuator. The value will be returned exactly as provided by the Actuator and can be interpreted as needed by the caller.- Specified by:
read
in interfaceActuator
- Overrides:
read
in classReferenceActuator
- Returns:
- The value read.
- Throws:
java.lang.Exception
- if there was an error reading the actuator.
-
getPropertySheets
public PropertySheetHolder.PropertySheet[] getPropertySheets()
- Specified by:
getPropertySheets
in interfacePropertySheetHolder
- Overrides:
getPropertySheets
in classReferenceActuator
-
getAdcMax
public double getAdcMax()
-
setAdcMax
public void setAdcMax(double adcMax)
-
getvRef
public double getvRef()
-
setvRef
public void setvRef(double vRef)
-
getR1
public double getR1()
-
setR1
public void setR1(double r1)
-
getR2
public double getR2()
-
setR2
public void setR2(double r2)
-
getA
public double getA()
-
setA
public void setA(double a)
-
getB
public double getB()
-
setB
public void setB(double b)
-
getC
public double getC()
-
setC
public void setC(double c)
-
getScale
public double getScale()
-
setScale
public void setScale(double scale)
-
getOffset
public double getOffset()
-
setOffset
public void setOffset(double offset)
-
-