orthotweezers
Class OrthoTweezersControl

java.lang.Object
|
+--orthotweezers.OrthoTweezersControl

public class OrthoTweezersControl

extends java.lang.Object

OrthoTweezersControl interfaces with all the hardware of the orthotweezer
system, providing control of the stage, tweezers, strain gauges, etc.
This class contains only the basic methods necessary to interface to the
system. For more sophisticated manipulation routines, see OrthoTweezersTools
which uses this class.

moveProbeX

Move probe X to the position smoothly.
This operates the piezoelectric directly without regard to the strain
gauge readings on the probe arm. Because of piezoelectric hysteresis,
calling this method with a certain value for the position will not
always result in the same actual deflection of the probe. To get
a certain deflection, use OrthoTweezersTools.seekXArmDeflection.
This calls CancelThread.check() to maybe throw a CancelException.

Parameters:

position - normalized position in the range -1 to 1.
Values outside this range are clipped to this range.

moveProbeY

Move probe Y to the position smoothly.
This operates the piezoelectric directly without regard to the strain
gauge readings on the probe arm. Because of piezoelectric hysteresis,
calling this method with a certain value for the position will not
always result in the same actual deflection of the probe. To get
a certain deflection, use OrthoTweezersTools.seekYArmDeflection.
This calls CancelThread.check() to maybe throw a CancelException.

Parameters:

position - normalized position in the range -1 to 1.
Values outside this range are clipped to this range.

xArmDeflection

Get the deflection of the probe X arm.
This performs a new A/D conversion for the strain gauge

Returns:

the deflection in millimeters

xTipDeflection

public double xTipDeflection()

Get the deflection of the probe X tip.
This performs a new A/D conversion for the strain gauge.
Note that xTipForce() also reads the probe X tip strain gauge.
If you only want to read the gauge once to get them both, you can call
xTipStrain() and multiply by strainToDeflectionXTip() and
strainToForceXTip().

yArmDeflection

Get the deflection of the probe Y arm.
This performs a new A/D conversion for the strain gauge

Returns:

the deflection in millimeters

yTipDeflection

public double yTipDeflection()

Get the deflection of the probe Y tip.
This performs a new A/D conversion for the strain gauge.
Note that yTipForce() also reads the probe Y tip strain gauge.
If you only want to read the gauge once to get them both, you can call
yTipStrain() and multiply by strainToDeflectionYTip() and
strainToForceXYTip().

xTipForce

public double xTipForce()

Get the force on the probe X tip.
This performs a new A/D conversion for the strain gauge.
Note that xTipDeflection() also reads the probe X tip strain gauge.
If you only want to read the gauge once to get them both, you can call
xTipStrain() and multiply by strainToDeflectionXTip() and
strainToForceXTip().

yTipForce

public double yTipForce()

Get the force on the probe Y tip.
This performs a new A/D conversion for the strain gauge.
Note that yTipDeflection() also reads the probe Y tip strain gauge.
If you only want to read the gauge once to get them both, you can call
yTipStrain() and multiply by strainToDeflectionYTip() and
strainToForceYTip().

moveToXY

Move the stage to the x, y position, moving diagonally if necessary.
Note that the coordinates are as if there are axes painted on the stage,
so that the probes reach that position.
That is, for the probes to get to increasing X, the stage itself actually
moves in the negative direction.
This calls CancelThread.check() to maybe throw a CancelException.

Parameters:

x - x coordinate to move to, in millimeters

y - y coordinate to move to, in millimeters

Throws:

CancelException - thrown by CancelThread.check()
or if got an InterruptedException.

stageX

stageY

stageZ

public double stageZ()

Return the Z position of the stage in millimeters.

setStageXYZ

public void setStageXYZ(double x,
double y,
double z)

Set the present position of the stage. This can be used
when the application starts to return the state to what it was
during the previous session. Or, all values of zero can be used
to reset the origin.

Parameters:

x - the new stage X position in millimeters

y - the new stage Y position in millimeters

z - the new stage Z position in millimeters

resetXTipStrain

public void resetXTipStrain()

Assume there is no force on the tip of probe X and set
strainOffsetXTip so that xTipStrain() will read zero.

calibrateStrainErrors

This sets xArmStrainError, xTipStrainError, yArmStrainError and
yTipStrain error by running a calibration algorithm. The calibration
algorithm reads the each strain gauge for several iterations, computing
the maximum and minimum readings. The error is maximum - minimum.
This calls CancelThread.check() to maybe throw a CancelException.