Public Member Functions | |
boolean | isMoving () |
boolean | isRotating () |
int | getPosition () |
int | getRotation () |
int | getEstimatedPosition () |
int | getEstimatedRotation () |
boolean | isOK () |
void | moveToSampleLoad () |
void | moveToDegausserZ () |
void | moveToDegausserY () |
void | moveToMeasurement () |
void | moveToBackground () |
void | moveToLeftLimit () |
void | moveToRightLimit () |
void | rotateTo (final int rotationAngle) |
void | join () throws InterruptedException |
void | serialIOEvent (SerialIOEvent event) |
Protected Member Functions | |
Handler () throws SerialIOException | |
void | setUp () throws SerialIOException |
void | updateSettings () |
void | setPosition (int position) |
void | setRotation (int rotationSteps) |
void | seekHome () throws SerialIOException |
void | moveToPosition (int position) throws SerialIOException |
void | moveSteps (int steps, int velocity) throws SerialIOException |
void | slewToLimit (boolean toRight) throws SerialIOException |
void | setOnline () throws SerialIOException |
void | selectMovement () throws SerialIOException |
void | selectRotation () throws SerialIOException |
void | setAcceleration (int acceleration) throws SerialIOException |
void | setDeceleration (int deceleration) throws SerialIOException |
void | setVelocity (int velocity) throws SerialIOException |
void | stopExecution () throws SerialIOException |
void | performSlew () throws SerialIOException |
void | setMotorPositive () throws SerialIOException |
void | setMotorNegative () throws SerialIOException |
void | go () throws SerialIOException |
void | waitForMessage () throws SerialIOException |
String | verify (char registry) throws SerialIOException |
char | takeMessage () throws SerialIOException |
Protected Attributes | |
SerialIO | serialIO |
Private Member Functions | |
void | fireMovementStopped () |
void | fireRotationStopped () |
Private Attributes | |
SynchronousQueue< String > | answerQueue = new SynchronousQueue<String>() |
LastExecutor | workQueue = new LastExecutor(0, false) |
final int | POLL_TIMEOUT = 60 |
int | ACCELERATION |
int | DECELERATION |
int | VELOCITY |
int | MEASUREMENT_VELOCITY |
int | SAMPLE_LOAD_POSITION |
int | TRANSVERSE_YAF_POSITION |
int | AXIAL_AF_POSITION |
int | BACKGROUND_POSITION |
int | MEASUREMENT_POSITION |
int | ROTATION_VELOCITY |
int | ROTATION_ACCELERATION |
int | ROTATION_DECELERATION |
int | HANDLER_ROTATION |
int | currentMotor = -1 |
int | currentPosition = 0 |
int | currentRotation = 0 |
int | currentVelocity = 0 |
int | estimatedPositionStart = 0 |
long | estimatedPositionStartTime = 0 |
int | estimatedPositionEnd = 0 |
int | estimatedRotationStart = 0 |
long | estimatedRotationStartTime = 0 |
int | estimatedRotationEnd = 0 |
boolean | waitingForMessage = false |
Definition at line 36 of file Handler.java.
|
Creates a new handler interface. Opens connection to handler COM port and reads settings from the Settings class. Definition at line 171 of file Handler.java. References ikayaki.squid.SerialIO.addSerialIOListener(), ikayaki.squid.SerialIO.openPort(), ikayaki.squid.Handler.serialIO, and ikayaki.squid.Handler.updateSettings(). |
Here is the call graph for this function:
|
Stops calculating estimated current position Definition at line 286 of file Handler.java. References ikayaki.squid.Handler.currentPosition, ikayaki.squid.Handler.estimatedPositionEnd, ikayaki.squid.Handler.estimatedPositionStart, ikayaki.squid.Handler.estimatedPositionStartTime, and ikayaki.squid.Handler.getEstimatedPosition(). Referenced by ikayaki.squid.Handler.seekHome(). |
Here is the call graph for this function:
|
Stops calculating estimated current position Definition at line 306 of file Handler.java. References ikayaki.squid.Handler.currentRotation, ikayaki.squid.Handler.estimatedRotationEnd, ikayaki.squid.Handler.estimatedRotationStart, and ikayaki.squid.Handler.estimatedRotationStartTime. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Returns an estimation that where handler is right now. Used for drawing graphics.
Definition at line 320 of file Handler.java. References ikayaki.squid.Handler.currentVelocity, ikayaki.squid.Handler.estimatedPositionEnd, ikayaki.squid.Handler.estimatedPositionStart, ikayaki.squid.Handler.estimatedPositionStartTime, and ikayaki.squid.Handler.isMoving(). Referenced by ikayaki.squid.Handler.fireMovementStopped(), and ikayaki.squid.Handler.setPosition(). |
Here is the call graph for this function:
|
Used for graphics of squid, estimates from speed and starting time where handler is.
Definition at line 358 of file Handler.java. References ikayaki.squid.Handler.currentVelocity, ikayaki.squid.Handler.estimatedRotationEnd, ikayaki.squid.Handler.estimatedRotationStart, ikayaki.squid.Handler.estimatedRotationStartTime, ikayaki.squid.Handler.getRotation(), ikayaki.squid.Handler.HANDLER_ROTATION, and ikayaki.squid.Handler.isRotating(). |
Here is the call graph for this function:
|
Returns the position where the handler is currently, or where it is heading right now. Integer.MAX_VALUE means the right limit and Integer.MIN_VALUE means the left limit.
Definition at line 228 of file Handler.java. References ikayaki.squid.Handler.currentPosition. |
|
Returns the handler's current rotation, or where it is rotating to right now.
Definition at line 237 of file Handler.java. References ikayaki.squid.Handler.currentRotation, and ikayaki.squid.Handler.HANDLER_ROTATION. Referenced by ikayaki.squid.Handler.getEstimatedRotation(). |
|
Send handler on move (G). Definition at line 802 of file Handler.java. |
|
Tells whether handler is moving right now. Definition at line 211 of file Handler.java. References ikayaki.squid.Handler.estimatedPositionEnd, and ikayaki.squid.Handler.estimatedPositionStart. Referenced by ikayaki.squid.Handler.getEstimatedPosition(). |
|
Checks if the serial communication channel is open.
Definition at line 387 of file Handler.java. References ikayaki.squid.Handler.serialIO. |
|
Tells whether handler is rotating right now. Definition at line 218 of file Handler.java. References ikayaki.squid.Handler.estimatedRotationEnd, and ikayaki.squid.Handler.estimatedRotationStart. Referenced by ikayaki.squid.Handler.getEstimatedRotation(). |
|
Waits that all commands sent to the Handler have been executed.
Definition at line 681 of file Handler.java. References ikayaki.util.LastExecutor.join(). |
Here is the call graph for this function:
|
Commands the holder to move to the specified number of steps. Only sends the move commands and will not wait for the handler to arrive.
Definition at line 600 of file Handler.java. |
|
Commands the holder to move to background position. Only starts the movement and will not wait for it to finish. Definition at line 484 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to move to degauss Y (and X) position. Only starts the movement and will not wait for it to finish. Definition at line 453 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to move to degauss Z position. Only starts the movement and will not wait for it to finish. Definition at line 437 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to go to left limit. Only starts the movement and will not wait for it to finish. Definition at line 499 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to move to measure position. Only starts the movement and will not wait for it to finish. Definition at line 469 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Moves the handler to an absolute position. Waits for the handler to arrive there. Changes the speed of the handler when necessary.
Definition at line 533 of file Handler.java. Referenced by ikayaki.squid.Handler.moveToSampleLoad(). |
|
Commands the holder to go to right limit. Only starts the movement and will not wait for it to finish. Definition at line 514 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to move to sample load position. Only starts the movement and will not wait for it to finish. Definition at line 422 of file Handler.java. References ikayaki.util.LastExecutor.execute(), ikayaki.squid.Handler.moveToPosition(), ikayaki.squid.Handler.SAMPLE_LOAD_POSITION, and ikayaki.squid.Handler.workQueue. |
Here is the call graph for this function:
|
Slew the motor up to maximum speed and continue until reaching a hard limit switch or receiving a quit (Q) command. (S). Automatically runs selectMovement() before slewing. Definition at line 778 of file Handler.java. |
|
Rotates the handler to the specified angle. If angle is over than 360 or lower than 0, it is divided by 360 and value is remainder.
Definition at line 640 of file Handler.java. References ikayaki.util.LastExecutor.execute(). |
Here is the call graph for this function:
|
Commands the holder to seek home position and rotation. Waits for the home to be found and resets the home position and rotation. Definition at line 395 of file Handler.java. References ikayaki.squid.Handler.currentPosition, ikayaki.squid.Handler.fireMovementStopped(), ikayaki.squid.Handler.fireRotationStopped(), ikayaki.squid.Handler.selectMovement(), ikayaki.squid.Handler.selectRotation(), ikayaki.squid.Handler.serialIO, ikayaki.squid.Handler.setMotorNegative(), ikayaki.squid.Handler.setMotorPositive(), ikayaki.squid.Handler.setPosition(), ikayaki.squid.Handler.setRotation(), ikayaki.squid.Handler.slewToLimit(), ikayaki.squid.Handler.waitForMessage(), and ikayaki.squid.SerialIO.writeMessage(). Referenced by ikayaki.squid.Handler.setUp(). |
Here is the call graph for this function:
|
Selects the movement motor to recieve all commands. Sets the default velocity, acceleration and deceleration for the motor. If the movement motor is already selected, does nothing. Definition at line 696 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Selects the rotation motor to recieve all commands. Sets the default velocity, acceleration and deceleration for the motor. If the rotation motor is already selected, does nothing. Definition at line 711 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Propagates serial port message event.
Implements ikayaki.squid.SerialIOListener. Definition at line 878 of file Handler.java. References ikayaki.squid.SerialIOEvent.getCleanMessage(). |
Here is the call graph for this function:
|
Sends message to handler to set acceleration (Aa).
Definition at line 728 of file Handler.java. |
|
Sends message to handler to set deceleration (Dd).
Definition at line 741 of file Handler.java. |
|
Set the motor direction of movement to negative. (-). Definition at line 794 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Set the motor direction of movement to positive. (+). Definition at line 786 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Sends message to handler go online (). Definition at line 688 of file Handler.java. Referenced by ikayaki.squid.Handler.setUp(). |
|
Sets the position that we start heading to. Integer.MAX_VALUE means the right limit and Integer.MIN_VALUE means the left limit. Definition at line 246 of file Handler.java. References ikayaki.squid.Handler.currentPosition, ikayaki.squid.Handler.estimatedPositionEnd, ikayaki.squid.Handler.estimatedPositionStart, ikayaki.squid.Handler.estimatedPositionStartTime, and ikayaki.squid.Handler.getEstimatedPosition(). Referenced by ikayaki.squid.Handler.seekHome(). |
Here is the call graph for this function:
|
Sets the rotation that we start heading to. The value is in rotation steps and relative to the home position (no limit to how high the value can be). Definition at line 266 of file Handler.java. References ikayaki.squid.Handler.currentRotation, ikayaki.squid.Handler.estimatedRotationEnd, ikayaki.squid.Handler.estimatedRotationStart, ikayaki.squid.Handler.estimatedRotationStartTime, and ikayaki.squid.Handler.HANDLER_ROTATION. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Starts up the handler and seeks the home position. Will wait until the handler is ready for operation. Definition at line 180 of file Handler.java. References ikayaki.squid.Handler.seekHome(), and ikayaki.squid.Handler.setOnline(). Referenced by ikayaki.squid.Squid.Squid(). |
Here is the call graph for this function:
|
Sends message to handler to set maximum velocity (Mv).
Definition at line 754 of file Handler.java. |
|
Definition at line 620 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
This command stops execution of the internal program if it is used in the program. If the motor is indexing it will ramp down and then stop. Use this command to stop the motor after issuing a slew command. (Q). Definition at line 770 of file Handler.java. |
|
take the device for any waiting messages such as errors or end of move. (
Definition at line 864 of file Handler.java. |
|
Checks which settings have changed and updates the handler interface. This method will be called by the Squid class. Definition at line 192 of file Handler.java. References ikayaki.squid.Handler.ACCELERATION, ikayaki.squid.Handler.AXIAL_AF_POSITION, ikayaki.squid.Handler.BACKGROUND_POSITION, ikayaki.squid.Handler.DECELERATION, ikayaki.squid.Handler.HANDLER_ROTATION, ikayaki.squid.Handler.MEASUREMENT_POSITION, ikayaki.squid.Handler.MEASUREMENT_VELOCITY, ikayaki.squid.Handler.ROTATION_ACCELERATION, ikayaki.squid.Handler.ROTATION_DECELERATION, ikayaki.squid.Handler.ROTATION_VELOCITY, ikayaki.squid.Handler.SAMPLE_LOAD_POSITION, ikayaki.squid.Handler.TRANSVERSE_YAF_POSITION, and ikayaki.squid.Handler.VELOCITY. Referenced by ikayaki.squid.Handler.Handler(). |
|
Gives result for wanted registery. (V v).
Definition at line 840 of file Handler.java. |
|
Wait for handler to be idle. Blocking (F). Without the this command the SMC25 (Handler system) will continue to accept commands while the motor is moving. This may be desirable, as when changing speed during a move or working with the inputs or outputs. Or it may be undesirable, such as when you wish to make a series of indexes. Without the this command any subsequent Go commands received while the motor is indexing would set the "Not allowed while moving" message. Caution: If this command is used while the motor is executing a Slew command the only way to stop is with a reset or a hard limit switch input. Definition at line 814 of file Handler.java. Referenced by ikayaki.squid.Handler.seekHome(). |
|
Value between 0 and 127 default 5. Settings in the 20-50 range are usually employed. Definition at line 62 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Synchronous queue for waiting result message from handler Definition at line 41 of file Handler.java. |
|
Axial AF demag position in steps, must be divisible by 10. Relative to Home. Definition at line 96 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Position in steps, must be divisible by 10. Relative to Home. Definition at line 101 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Currently selected motor to send the commands to. Definition at line 128 of file Handler.java. |
|
The position where the handler is currently, or where it is heading right now. Integer.MIN_VALUE means the left limit, Integer.MAX_VALUE is the right limit. Definition at line 134 of file Handler.java. Referenced by ikayaki.squid.Handler.fireMovementStopped(), ikayaki.squid.Handler.getPosition(), ikayaki.squid.Handler.seekHome(), and ikayaki.squid.Handler.setPosition(). |
|
Angles are between 0 (0) and 2000 (360). Definition at line 139 of file Handler.java. Referenced by ikayaki.squid.Handler.fireRotationStopped(), ikayaki.squid.Handler.getRotation(), and ikayaki.squid.Handler.setRotation(). |
|
Last set velocity. Negative for moving to left and positive for moving to right. Definition at line 144 of file Handler.java. Referenced by ikayaki.squid.Handler.getEstimatedPosition(), and ikayaki.squid.Handler.getEstimatedRotation(). |
|
Value between 0 and 127 default 10. Settings in the 20-50 range are usually employed. Definition at line 67 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Definition at line 156 of file Handler.java. Referenced by ikayaki.squid.Handler.fireMovementStopped(), ikayaki.squid.Handler.getEstimatedPosition(), ikayaki.squid.Handler.isMoving(), and ikayaki.squid.Handler.setPosition(). |
|
Starting point at start of movement Definition at line 149 of file Handler.java. Referenced by ikayaki.squid.Handler.fireMovementStopped(), ikayaki.squid.Handler.getEstimatedPosition(), ikayaki.squid.Handler.isMoving(), and ikayaki.squid.Handler.setPosition(). |
|
Time in milliseconds when we started movement Definition at line 154 of file Handler.java. Referenced by ikayaki.squid.Handler.fireMovementStopped(), ikayaki.squid.Handler.getEstimatedPosition(), and ikayaki.squid.Handler.setPosition(). |
|
Definition at line 160 of file Handler.java. Referenced by ikayaki.squid.Handler.fireRotationStopped(), ikayaki.squid.Handler.getEstimatedRotation(), ikayaki.squid.Handler.isRotating(), and ikayaki.squid.Handler.setRotation(). |
|
Definition at line 158 of file Handler.java. Referenced by ikayaki.squid.Handler.fireRotationStopped(), ikayaki.squid.Handler.getEstimatedRotation(), ikayaki.squid.Handler.isRotating(), and ikayaki.squid.Handler.setRotation(). |
|
Definition at line 159 of file Handler.java. Referenced by ikayaki.squid.Handler.fireRotationStopped(), ikayaki.squid.Handler.getEstimatedRotation(), and ikayaki.squid.Handler.setRotation(). |
|
Definition at line 123 of file Handler.java. Referenced by ikayaki.squid.Handler.getEstimatedRotation(), ikayaki.squid.Handler.getRotation(), ikayaki.squid.Handler.setRotation(), and ikayaki.squid.Handler.updateSettings(). |
|
Position in steps, must be divisible by 10. Relative to Home. Definition at line 106 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Speed in measurement, should be small. Definition at line 81 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
timeout how long we wait answer from Squid-system, debugging to prevent lock-ups if communication fails. Definition at line 52 of file Handler.java. |
|
Value between 0 and 127. Definition at line 116 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Value between 0 and 127. Definition at line 121 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Value between 50 and 8500, but should be small Definition at line 111 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Value between 1 and 16,777,215. Relative to Home. Definition at line 86 of file Handler.java. Referenced by ikayaki.squid.Handler.moveToSampleLoad(), and ikayaki.squid.Handler.updateSettings(). |
|
COM port for communication. Definition at line 57 of file Handler.java. Referenced by ikayaki.squid.Handler.Handler(), ikayaki.squid.SquidFront.initRawActions(), ikayaki.squid.Handler.isOK(), and ikayaki.squid.Handler.seekHome(). |
|
AF demag position for transverse. Relative to Home. Definition at line 91 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Value between 50 and 12 000. The decimal number issued is 10 times the actual pulse rate to the motor. Since the motor requires 200 pulses (full step) or 400 pulses (half step) per revolution, a speed setting of M10000 sets the motor to revolve at 5 revolutions per second in full step or 2.5 revolutions in half step. This rate is one-half the sample rate rotation due to the pulley ratios. The sample handler is set up at the factory for half stepping. Definition at line 76 of file Handler.java. Referenced by ikayaki.squid.Handler.updateSettings(). |
|
Only one at time can be waiting for answer, works like semaphore for commanding handler Definition at line 165 of file Handler.java. |
|
Executes the commands to the handler one at a time. All public interfaces should send their commands to this queue so that they would not conflict eachother. Definition at line 47 of file Handler.java. Referenced by ikayaki.squid.Handler.moveToSampleLoad(). |