|
||||||||||
| 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.MiniWheel
public class MiniWheel
The class provide a simple interface for the mini filter wheel operation locates in the STELLA-SES top unit. The two important method can set the wheel in its zero position and (then) in arbitrary position specified by the wholes in the wheel. The class has syslog capabilities through the protomatter syslog classes. It is a copy of the FilterWheel class updated with the proper motor parameters.
| Nested Class Summary | |
|---|---|
static class |
MiniWheel.Debug
For debugging. |
static class |
MiniWheel.FullTurn
Reads the mini wheel configuration from a file and does a full turn. |
static class |
MiniWheel.mw
|
static class |
MiniWheel.Set
Reads the mini wheel configuration from a file and positions to the specified slot. |
static class |
MiniWheel.Step
Steps the mini wheel from the current position to the desired offset. |
| Nested classes/interfaces inherited from class stella.omc.MotorController |
|---|
MotorController.AxesReset, MotorController.Dump, MotorController.Reset, MotorController.Status |
| 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 |
DEFAXIS
The axis name. |
static String |
DEFDRIVERNAME
Default driver name. |
private static boolean |
DEFINITZERO
Default zero-positioning on init. |
private static double |
DEFOVERSHOOT
Default maximum overshoot fraction. |
private static String |
DEFPARAMETERS
The default initializing parameters. |
private static String |
DEFPOSITIONS
The default position in the mini wheel. |
static String |
KEY_OVERSHOOT
The maximum fraction of overshoot, 1 for full turn . |
static String |
KEY_PARAMETERS
The parameters to send on init as a map. |
static String |
KEY_POSITIONS
The positions in the mini wheel. |
private int |
lastposition
Last position successfully obtained. |
private boolean |
motorZeroPositioned
True, if motor was zero positioned. |
private List<Double> |
positions
The list of true positions from properties. |
| 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 | |
|---|---|
MiniWheel(Map<String,String> config)
Construct a new mini wheel similar to a motor controller, but defaulting its name to DEFDRIVERNAME. |
|
| Method Summary | |
|---|---|
private long |
fullTurn()
A method that performs a full turn of the mini wheel. |
protected double |
getControllerParameter(String param)
|
protected double[] |
getControllerParameterArray(int[] ipar)
Returns the values of all parameters indicated in the list. |
int |
getMaxPosition()
Returns the maximumk number of allowed positions. |
int |
getMaxPosition(String axis)
Compatibility mode. |
int |
getMaxStep(String axis)
Returns the maximal steps this axis can travel. |
protected Map<String,String> |
getParametersFor(String ax)
We have only a single axis, thus, always return a single map. |
int |
getPosition()
Returns the last position attained or MotorController.UNDEFINEDPOSITION. |
int |
getPosition(String axis)
Compatibility mode. |
protected int |
getStepResolution()
|
void |
init()
Initializes position look-up table. |
boolean |
offset(int diff)
Rotates the desired number of steps from the current position, no nulling. |
boolean |
offset(String axis,
int pos)
Compatibility mode. |
boolean |
open()
Sets the mini wheel into zero position after opening. |
protected void |
setControllerParameter(String param,
int value)
|
boolean |
setPosition(int pos)
Sets the wheel in one of the 6 configured position. |
boolean |
setPosition(String axis,
int pos)
Compatibility mode. |
boolean |
setZeroPosition()
Set the mini wheel in its zero position. |
boolean |
setZeroPosition(String axis)
Compatibility mode. |
| 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_POSITIONS
public static final String KEY_PARAMETERS
public static final String KEY_OVERSHOOT
public static final String DEFDRIVERNAME
private static final String DEFAXIS
private static final String DEFPOSITIONS
private static final String DEFPARAMETERS
private static final boolean DEFINITZERO
private static final double DEFOVERSHOOT
private List<Double> positions
private boolean motorZeroPositioned
private int lastposition
| Constructor Detail |
|---|
public MiniWheel(Map<String,String> config)
DEFDRIVERNAME.
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class MotorControllerprotected Map<String,String> getParametersFor(String ax)
getParametersFor in class MotorController
public boolean open()
throws IOException
open in interface Driveropen in class MotorControllerIOException
public boolean setPosition(String axis,
int pos)
throws IOException
setPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.pos - The numbered position to be attained.
IOException - If driver communication failed.
public boolean offset(String axis,
int pos)
throws IOException
offset in interface MultiAxesaxis - The name of the axis to be zero-setted.pos - The number of step, positiv or negative in
driver-specific coordinates.
IOException - If driver communication failed.
public boolean setZeroPosition(String axis)
throws IOException
setZeroPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.
IOException - If driver communication failed.
public int getPosition(String axis)
throws IOException
getPosition in interface MultiAxesaxis - The name of the axis to be zero-setted.
IOException - If driver communication failed.
public int getMaxPosition(String axis)
throws IOException
getMaxPosition in interface MultiAxesaxis - String representing the selected axis.
IOException
public int getMaxStep(String axis)
throws IOException
MultiAxesMultiAxes.getMaxPosition(java.lang.String) to estimate the number of steps per position.
getMaxStep in interface MultiAxesIOException
public boolean setPosition(int pos)
throws IOException
setPosition in interface Positioningpos - Integer (0 - 5) specifying the wheel position.
IOException - If driver communication failed.
public boolean offset(int diff)
throws IOException
offset in interface PositioningIOException
public boolean setZeroPosition()
throws IOException
setZeroPosition in interface PositioningIOException - If driver communication failed.public int getPosition()
MotorController.UNDEFINEDPOSITION.
getPosition in interface Positioningpublic int getMaxPosition()
getMaxPosition in interface Positioning
protected double getControllerParameter(String param)
throws IOException,
NullPointerException
IOException
NullPointerException
protected double[] getControllerParameterArray(int[] ipar)
throws IOException,
NullPointerException
IOException
NullPointerException
protected int getStepResolution()
throws IOException,
NullPointerException
IOException
NullPointerException
protected void setControllerParameter(String param,
int value)
throws IOException,
NullPointerException
IOException
NullPointerException
private long fullTurn()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||