|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
io.AbstractDriver
io.AbstractSerialDriver
stella.omc.MotorController
stella.omc.LinearPositioner
public class LinearPositioner
The class makes possible to operate linear positioner units via Phytron MCC-2 controller interface in java. The controller drives two motors (axes), which are used in the STELLA-II top unit for adjusting the position of the fibre couple and the mini filter wheel in response to the focus changes due to temperature changes. The entrie range is 25 mm, which corresponds to 30240 quartersteps. Each mu is thus 1.2096 steps. Manfred estimates that we can see a hundred mu, i.e. 120 steps. If we estimate the linear expansion to -0.03 per degree, we have a corresponding -35 steps per degree.
The positioner unit has two initiators (limit switches) at both limiting positions. The class allows to initialize the unit to either position (zero-positioning) and move them by arbitraty steps as long as it not reaches the limits. The motors stops moving if limits are reached.
| Nested Class Summary | |
|---|---|
static class |
LinearPositioner.lpUI
Test user interface. |
| Nested classes/interfaces inherited from class stella.omc.MotorController |
|---|
MotorController.AxesReset, MotorController.Dump, MotorController.Reset, MotorController.Set, MotorController.Status, MotorController.Step |
| Nested classes/interfaces inherited from class io.AbstractSerialDriver |
|---|
AbstractSerialDriver.Available |
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static String |
DEFAXES
The default axis name. |
static String |
DEFDRIVERNAME
Default driver name. |
private static String |
DEFFAILAXISMOVE
The default axis movement failure maximum. |
private static String |
DEFINITZERO
|
private static int |
DEFMAXSTEPS
|
private static String |
DEFPARAMETERS
|
private static String |
DEFSLEEPAXISMOVE
The default axis movement sleep time. |
private static String |
DEFZEROEND
|
static String |
KEY_MAXSTEPS
Lower limit for the maximum number of full steps between the two limiting positions. |
static String |
KEY_PARAMETERS
The parameters to send on init as a map and its defaults. |
static String |
KEY_ZEROEND
+ or - end of the linear unit corresponds to the zero position. |
private List<Integer> |
lastposition
Last positions successfully obtained. |
private List<Boolean> |
motorZeroPositioned
Check if the motor has been zero positioned. |
private List<String> |
zend
The signs marking the axis zero ends. |
| Fields inherited from class stella.omc.MotorController |
|---|
axis, FAILED, HOME, KEY_ADDRESS, KEY_AXES, KEY_CONTROLLERTYPE, KEY_DELAY, KEY_EEPROMSTORE, KEY_FAILAXISMOVE, KEY_PROTOCOL, KEY_RETRYPOS, KEY_SERIALRETRY, KEY_SLEEPAXISMOVE, KEY_STEPTOLERANCE, KEY_TELEGRAM, KEY_WORKAROUND, MCC, OK, OMC, UNDEFINEDPOSITION |
| Fields inherited from class io.AbstractSerialDriver |
|---|
inport, KEY_BAUDRATE, KEY_CLOSETIMEOUT, KEY_DATABIT, KEY_FLOWCONTROL, KEY_INBUFFER, KEY_NOTIFYCOOLDOWN, KEY_OUTBUFFER, KEY_PARITYBIT, KEY_PORTNAME, KEY_RECEIVEFRAMING, KEY_RECEIVETHRESHOLD, KEY_RECEIVETIMEOUT, KEY_STOPBIT, KEY_TIMEOUT, outport, staticlock |
| Fields inherited from class io.AbstractDriver |
|---|
KEY_DRIVERNAME |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface stella.omc.MultiAxes |
|---|
KEY_INITZERO |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
LinearPositioner(Map config)
Constructor. |
|
| Method Summary | |
|---|---|
int |
getMaxPosition(String axis)
Returns the maximum available position for the given axis. |
int |
getMaxStep(String axis)
Returns the property value. |
protected Map<String,String> |
getParametersFor(String axis)
Returns the parameter map for the selected axis. |
int |
getPosition(String axis)
Returns the absolute steps away from the defined zero end. |
void |
init()
Initialies the parameter maps, the axis names and their timeouts. |
boolean |
offset(String axxis,
int steps)
Offsets the selected axis with steps away from the current position. |
boolean |
open()
Sets the linear units into zero position after opening. |
boolean |
setPosition(String axxis,
int nr)
Sets the new position to a given absolute steps away from the defined zero end. |
boolean |
setZeroPosition(String axxis)
Sets the given axis in its zero position. |
| Methods inherited from class stella.omc.MotorController |
|---|
axisStop, encapsulate, ensureCommand, errorPower, errorStep, errorStop, getAxesNames, getControllerParameter, getControllerParameterArray, getControllerType, getStatus, getStatus, getStep, getStepResolution, isContinuous, powerOff, powerOn, readString, readString, remote, reset, resetAxis, setControllerParameter, waitWhileAxisMoving, waitWhileAxisMoving, writeCommand, writeCommand, writeString, writeString |
| Methods inherited from class io.AbstractSerialDriver |
|---|
close, createPortEventListener, createPortEventListener, deregisterSoleEventListener, disableEvent, enableEvent, getDriverName, isOpen, registerSoleEventListener, resetOriginalParameters |
| Methods inherited from class io.AbstractDriver |
|---|
createDriver, equals, hashCode |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface stella.omc.MultiAxes |
|---|
getAxesNames, getStep, isContinuous |
| Methods inherited from interface io.Driver |
|---|
close, getDriverName, isOpen |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_MAXSTEPS
private static final int DEFMAXSTEPS
private static final String DEFINITZERO
public static final String KEY_ZEROEND
private static final String DEFZEROEND
public static final String DEFDRIVERNAME
private static final String DEFAXES
private static final String DEFFAILAXISMOVE
private static final String DEFSLEEPAXISMOVE
public static final String KEY_PARAMETERS
private static final String DEFPARAMETERS
private List<String> zend
private List<Integer> lastposition
private List<Boolean> motorZeroPositioned
| Constructor Detail |
|---|
public LinearPositioner(Map config)
| Method Detail |
|---|
public void init()
MotorController
init in interface Initializableinit in class MotorControllerpublic int getMaxStep(String axis)
getMaxStep in interface MultiAxes
public boolean open()
throws IOException
open in interface Driveropen in class MotorControllerIOExceptionprotected Map<String,String> getParametersFor(String axis)
getParametersFor in class MotorControlleraxis - String representing the selected axis.
public boolean setZeroPosition(String axxis)
throws IOException
KEY_ZEROEND property.
"A", like A(ll) can also be given as an axis. In this case
the zero positioning is carried out for all the available axis
simultaneously.
setZeroPosition in interface MultiAxesaxis - String representing the selected axis.
IOException - If driver communication failed.
public int getPosition(String axis)
throws IOException
getPosition in interface MultiAxesaxis - String representing the selected axis.
IOException - If driver communication failed.
public int getMaxPosition(String axis)
throws IOException
getMaxPosition in interface MultiAxesaxis - String representing the selected axis.
IOException
public boolean setPosition(String axxis,
int nr)
throws IOException
setPosition in interface MultiAxesaxis - String representing the selected axis.nr - Integer for the absolute position.
IOException - If driver communication failed.
public boolean offset(String axxis,
int steps)
throws IOException
offset in interface MultiAxesaxis - String representing the selected axis.steps - Integer for the offset steps.
IOException - If driver communication failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||