

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object  +orthotweezers.OrthoTweezersTools
OrthoTweezersTools is a utility class for doing more sophisticated operations than are provided by the basic OrthoTweezersControl class. Logically, high level manipulation routines don't belong in the basic OrthTweezersControl class which would just clutter it. Note that an OrthoTweezersTools object does not keep any local variables (except for the OrthoTweezersControl object passed to the constructor). It is just a bunch of utility methods. Therefore, any code can create an OrthoTweezersTools object from an OrthoTweezersControl whenever it needs the utility routines.
OrthoTweezersControl
Field Summary  
static double 
SWEEP_TO_CONTACT_INCREMENT

Constructor Summary  
OrthoTweezersTools(OrthoTweezersControl control)
Creates new OrthoTweezersTools which uses the given control object. 
Method Summary  
OrthoTweezersControl 
control()
Returns the OrthoTweezersControl object which was passed to the constructor. 
void 
getStageXYZ(javax.vecmath.Point3d point)
Set the point to the coordinates of the stage. 
java.lang.String 
grasp(double cornerOffset,
double gripForce)
Grasp a rectangular object. 
void 
heaterOff(int heaterNumber)
Turn off the heater specified by heaterNumber. 
void 
heaterOn(int heaterNumber)
Turn on the heater specified by heaterNumber. 
boolean 
heaterState(int heaterNumber)
Return the state of the heater specified by heaterNumber. 
void 
moveDeltaXY(double deltaX,
double deltaY)
Move the stage in X and Y directions relative to the current position. 
void 
moveDeltaZ(double deltaZ)
Move the stage in the Z direction relative to the current position. 
void 
moveProbeDeltaX(double deltaPosition)
Move the X probe relative to the current position. 
void 
moveProbeDeltaY(double deltaPosition)
Move the Y probe relative to the current position. 
boolean 
moveProbeXToContact(boolean increasing)
Move probe X until the tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
boolean 
moveProbeXToContactBounded(boolean increasing,
double minDeflection,
double maxDeflection)
Move probe X, bounded by the given range, until the tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
boolean 
moveProbeYToContact(boolean increasing)
Close probe Y until the tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
boolean 
moveProbeYToContactBounded(boolean increasing,
double minDeflection,
double maxDeflection)
Move probe Y, bounded by the given range, until the tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
boolean 
moveStageXToContact(boolean increasing,
double limit)
Move the stage in the X direction until the probe X tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
boolean 
moveStageYToContact(boolean increasing,
double limit)
Move the stage in the Y direction until the probe Y tip strain gauge detects a contact force, then back off a little until the force drops near zero. 
void 
moveToPoint(javax.vecmath.Point3d point)
This just calls moveToXYZ(x,y,z) with the coordinates of the point. 
void 
moveToXYZ(double x,
double y,
double z)
Move the stage to the XYZ coordinates. 
void 
resetTipStrains()
This resets the strain offsets for probe X and probe Y tips so that the strain will now read zero. 
void 
seekXArmDeflection(double deflection)
Move probe X until its arm deflection is the given value. 
void 
seekXArmDeltaDeflection(double deltaDeflection)
Seek the X probe arm deflection relative to the current deflection. 
boolean 
seekXTipForce(double force)
This is a simplified version of seekXTipForceBounded which allows the probe to seek for the entire probe range. 
boolean 
seekXTipForceBounded(double force,
double minDeflection,
double maxDeflection)
Move probe X, bounded to the given range, until its tip force is the given value. 
void 
seekXYArmDeflection(double xDeflection,
double yDeflection)
This uses seekXArmDeflection and seekYArmDeflection to seek to the given X and Y deflections. 
void 
seekYArmDeflection(double deflection)
Move probe Y until its arm deflection is the given value. 
void 
seekYArmDeltaDeflection(double deltaDeflection)
Seek the Y probe arm deflection relative to the current deflection. 
boolean 
seekYTipForce(double force)
This is a simplified version of seekYTipForceBounded which allows the probe to seek for the entire probe range. 
boolean 
seekYTipForceBounded(double force,
double minDeflection,
double maxDeflection)
Move probe Y, bounded to the given range, until its tip force is the given value. 
void 
seekZAxisAngle(double angle,
double gripForce)
Try to rotate a block about the Z axis to the given angle. 
boolean 
seekZSurface(double limit)
Move the stage in the negative Z direction, making tiny sweeps with probe X, until the probe X tip strain gauge detects a contact force when it is moved, Then increase Z until no force is detected. 
javax.vecmath.Point3d 
stagePoint()
Return a new Point3d containing the stage X,Y,Z position in millimeters. 
boolean 
sweepProbeXToContact(boolean increasing,
double maxDeltaY)
This calls moveProbeXToContact repeatedly, moving SWEEP_TO_CONTACT_INCREMENT millimeters in the Y direction until contact, or until the maxDeltaY has been reached. 
boolean 
sweepProbeYToContact(boolean increasing,
double maxDeltaX)
This calls moveProbeYToContact repeatedly, moving SWEEP_TO_CONTACT_INCREMENT millimeters in the X direction until contact, or until the maxDeltaX has been reached. 
void 
ungrasp()
Ungrasp an object by releasing both probes to zero force, moving down in Z slightly, opening the probes slightly, and restoring the Z position. 
double 
zAxisAngle()
Return the angle in radians of the grip axis as it would rotate around the Z axis. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 
public static final double SWEEP_TO_CONTACT_INCREMENT
Constructor Detail 
public OrthoTweezersTools(OrthoTweezersControl control)
control
 The OrthoTweezersControl object which the methods will use.Method Detail 
public OrthoTweezersControl control()
public void getStageXYZ(javax.vecmath.Point3d point)
point
 the object which will receive the stage coordiates, in millimetersstagePoint()
,
OrthoTweezersControl.stageX()
public javax.vecmath.Point3d stagePoint()
getStageXYZ(javax.vecmath.Point3d)
public void moveDeltaXY(double deltaX, double deltaY) throws CancelException
deltaX
 the X distance to move, in millimetersdeltaY
 the Y distance to move, in millimetersCancelException
 thrown by CancelThread.check()OrthoTweezersControl.moveToXY(double, double)
,
CancelThread
public void moveDeltaZ(double deltaZ) throws CancelException
deltaZ
 the Z distance to move, in millimetersCancelException
 thrown by CancelThread.check()OrthoTweezersControl.moveToZ(double)
,
CancelThread
public void moveToXYZ(double x, double y, double z) throws CancelException
x
 x coordinate to move to, in millimetersy
 y coordinate to move to, in millimetersz
 z coordinate to move to, in millimetersCancelException
 thrown by CancelThread.check()OrthoTweezersControl.moveToXY(double, double)
,
OrthoTweezersControl.moveToZ(double)
,
CancelThread
public void moveToPoint(javax.vecmath.Point3d point) throws CancelException
point
 the point containing the coordinates to move to, in millimetersCancelException
 thrown by CancelThread.check()moveToXYZ(double, double, double)
,
CancelThread
public void moveProbeDeltaX(double deltaPosition) throws CancelException
deltaPosition
 the distance to move the probe X position, in the
same normalized units from 1 to 1 that moveProbeX usesCancelException
 thrown by CancelThread.check()OrthoTweezersControl.moveProbeX(double)
,
CancelThread
public void moveProbeDeltaY(double deltaPosition) throws CancelException
deltaPosition
 the distance to move the probe Y position, in the
same normalized units from 1 to 1 that moveProbeY usesCancelException
 thrown by CancelThread.check()OrthoTweezersControl.moveProbeY(double)
,
CancelThread
public void seekXArmDeflection(double deflection) throws CancelException
deflection
 the deflection to seek to in millimetersCancelException
 thrown by CancelThread.check()
or if got an InterruptedException.CancelThread
,
OrthoTweezersControl.moveProbeX(double)
public void seekYArmDeflection(double deflection) throws CancelException
deflection
 the deflection to seek to in millimetersCancelException
 thrown by CancelThread.check()
or if got an InterruptedException.CancelThread
,
OrthoTweezersControl.moveProbeY(double)
public void seekXYArmDeflection(double xDeflection, double yDeflection) throws CancelException
xDeflection
 the deflection to seek for the X arm in millimetersyDeflection
 the deflection to seek for the Y arm in millimetersCancelException
 thrown by CancelThread.check()CancelThread
,
seekXArmDeflection(double)
,
seekYArmDeflection(double)
public void resetTipStrains()
public void seekXArmDeltaDeflection(double deltaDeflection) throws CancelException
deltaDeflection
 the distance to deflect the probe X arm in
millimeters relative to the current deflection.CancelException
 thrown by CancelThread.check()seekXArmDeflection(double)
,
CancelThread
public void seekYArmDeltaDeflection(double deltaDeflection) throws CancelException
deltaDeflection
 the distance to deflect the probe Y arm in
millimeters relative to the current deflection.CancelException
 thrown by CancelThread.check()seekYArmDeflection(double)
,
CancelThread
public boolean moveProbeXToContact(boolean increasing) throws CancelException
increasing
 true to increase the probe position to contact,
false to decreaseCancelException
 thrown by CancelThread.check()CancelThread
,
moveStageXToContact(boolean, double)
,
moveProbeXToContactBounded(boolean, double, double)
public boolean moveProbeXToContactBounded(boolean increasing, double minDeflection, double maxDeflection) throws CancelException
increasing
 true to increase the probe position to contact,
false to decreaseminDeflection
 minimum probe X deflection (in millimeters) allowed
when seeking the contact. This also stops if
control.probeXPosition() reaches the absolute limit of 1.
If minDeflection >= maxDeflection, this simply returns false.maxDeflection
 maximum probe X deflection (in millimeters) allowed
when seeking the contact. This also stops if
control.probeXPosition() reaches the absolute limit of +1.
If maxDeflection <= minDeflection, this simply returns false.CancelException
 thrown by CancelThread.check()CancelThread
,
moveStageXToContact(boolean, double)
,
moveProbeXToContact(boolean)
public boolean moveProbeYToContact(boolean increasing) throws CancelException
increasing
 true to increase the probe position to contact,
false to decreaseCancelException
 thrown by CancelThread.check()CancelThread
,
moveStageYToContact(boolean, double)
,
moveProbeYToContactBounded(boolean, double, double)
public boolean moveProbeYToContactBounded(boolean increasing, double minDeflection, double maxDeflection) throws CancelException
increasing
 true to increase the probe position to contact,
false to decreaseminDeflection
 minimum probe Y deflection (in millimeters) allowed
when seeking the contact. This also stops if
control.probeYPosition() reaches the absolute limit of 1.
If minDeflection >= maxDeflection, this simply returns false.maxDeflection
 maximum probe Y deflection (in millimeters) allowed
when seeking the contact. This also stops if
control.probeYPosition() reaches the absolute limit of +1.
If maxDeflection <= minDeflection, this simply returns false.CancelException
 thrown by CancelThread.check()CancelThread
,
moveStageXToContact(boolean, double)
,
moveProbeXToContact(boolean)
public boolean sweepProbeXToContact(boolean increasing, double maxDeltaY) throws CancelException
increasing
 true to increase the probe position to contact,
false to decrease. If increasing is true, this
initially moves probe X position to 1, otherwise it initially
moves probe X position to +1. This assumes the path is clear
to move the probe to the initial position. Also, once the probe is
move to the initial position, this calls control().resetXTipStrain()
to recalibrate the zero offset of the probe so that it is sensitive.maxDeltaY
 the maximun distance to travel in increments of
SWEEP_TO_CONTACT_INCREMENT while trying to get moveProbeXToContact
to return true. The maxDeltaY is positive since we only sweep
while moving in the positive Y direction.CancelException
 thrown by CancelThread.check()CancelThread
,
moveProbeXToContact(boolean)
public boolean sweepProbeYToContact(boolean increasing, double maxDeltaX) throws CancelException
increasing
 true to increase the probe position to contact,
false to decrease. If increasing is true, this
initially moves probe Y position to 1, otherwise it initially
moves probe Y position to +1. This assumes the path is clear
to move the probe to the initial position. Also, once the probe is
move to the initial position, this calls control().resetYTipStrain()
to recalibrate the zero offset of the probe so that it is sensitive.maxDeltaY
 the maximun distance to travel in increments of
SWEEP_TO_CONTACT_INCREMENT while trying to get moveProbeYToContact
to return true. The maxDeltaX is positive since we only sweep
while moving in the positive X direction.CancelException
 thrown by CancelThread.check()CancelThread
,
moveProbeYToContact(boolean)
public boolean moveStageXToContact(boolean increasing, double limit) throws CancelException
increasing
 true to increase the X position until contact,
false to decreaselimit
 the maximum distance in millimeters to move while
checking for contact. This should be a positive number
(even if the stage will move in the negative direction). If
it is a negative number, this takes its absolute value.CancelException
 thrown by CancelThread.check()CancelThread
,
moveProbeXToContact(boolean)
public boolean moveStageYToContact(boolean increasing, double limit) throws CancelException
increasing
 true to increase the X position until contact,
false to decreaselimit
 the maximum distance in millimeters to move while
checking for contact. This should be a positive number
(even if the stage will move in the negative direction). If
it is a negative number, this takes its absolute value.CancelException
 thrown by CancelThread.check()CancelThread
,
moveProbeYToContact(boolean)
public boolean seekZSurface(double limit) throws CancelException
limit
 the maximum distance in millimeters to move while
checking for contact. This should be a positive number
(even if the stage moves in the negative Z direction). If
it is a negative number, this takes its absolute value.CancelException
 thrown by CancelThread.check()CancelThread
,
moveProbeXToContact(boolean)
public boolean seekXTipForce(double force) throws CancelException
seekXTipForceBounded(double, double, double)
public boolean seekXTipForceBounded(double force, double minDeflection, double maxDeflection) throws CancelException
force
 the force to seek to in milli NewtonsminDeflection
 minimum probe X deflection (in millimeters) allowed
when seeking the desired force. This also stops if
control.probeXPosition() reaches the absolute limit of 1.
If minDeflection >= maxDeflection, this simply returns false.maxDeflection
 maximum probe X deflection (in millimeters) allowed
when seeking the desired force. This also stops if
control.probeXPosition() reaches the absolute limit of +1.
If maxDeflection <= minDeflection, this simply returns false.CancelException
 thrown by CancelThread.check()
or if got an InterruptedException.OrthoTweezersControl.probeXPosition()
,
CancelThread
public boolean seekYTipForce(double force) throws CancelException
seekYTipForceBounded(double, double, double)
public boolean seekYTipForceBounded(double force, double minDeflection, double maxDeflection) throws CancelException
force
 the force to seek to in milli NewtonsminDeflection
 minimum probe Y deflection (in millimeters) allowed
when seeking the desired force. This also stops if
control.probeYPosition() reaches the absolute limit of 1.
If minDeflection >= maxDeflection, this simply returns false.maxDeflection
 maximum probe Y deflection (in millimeters) allowed
when seeking the desired force. This also stops if
control.probeYPosition() reaches the absolute limit of +1.
If maxDeflection <= minDeflection, this simply returns false.CancelException
 thrown by CancelThread.check()
or if got an InterruptedException.OrthoTweezersControl.probeYPosition()
,
CancelThread
public java.lang.String grasp(double cornerOffset, double gripForce) throws CancelException
cornerOffset
 the distance along the edge from the corners
to graps, in millimeters. If this is less than
0.01, this sets it to 0.01.gripForce
 the force with which to grip, in milli NewtonsCancelException
 thrown by CancelThread.check()
or if got an InterruptedException.CancelThread
,
sweepProbeXToContact(boolean, double)
,
sweepProbeYToContact(boolean, double)
public double zAxisAngle()
public void seekZAxisAngle(double angle, double gripForce) throws CancelException
angle
 the angle to rotate to in radians. This is measured by the relative
positions of the probe tips. When probe X is at deflection zero
and probe Y has a positive deflection, this angle is zero.
The angle increases to PI/2 where probe Y has zero deflection and probe
X has a positive deflection. If angle is less than zero or greater than
PI/2, it is clipped to this range.gripForce
 the gripping force in milliNewtons to maintain while rotatingCancelException
 thrown by CancelThread.check()CancelThread
public void ungrasp() throws CancelException
CancelException
 thrown by CancelThread.check()CancelThread
,
zAxisAngle()
public void heaterOn(int heaterNumber)
heaterNumber
  the number of the heater to turn on. At present
there is only one heater on the system so this number must be 1.
In the future there may be heater number 2, 3, etc. If heaterNumber
is not 1, this does nothing.public void heaterOff(int heaterNumber)
heaterNumber
  the number of the heater to turn off. At present
there is only one heater on the system so this number must be 1.
In the future there may be heater number 2, 3, etc. If heaterNumber
is not 1, this does nothing.public boolean heaterState(int heaterNumber)
heaterNumber
  the number of the heater to turn off. At present
there is only one heater on the system so this number must be 1.
In the future there may be heater number 2, 3, etc. If heaterNumber
is not 1, this does nothing and returns false.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: INNER  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 