public class WifsipWheel extends MotorController implements Positioning
| Modifier and Type | Class and Description |
|---|---|
static class |
WifsipWheel.Test |
MotorController.AxesReset, MotorController.Dump, MotorController.Reset, MotorController.Set, MotorController.Status, MotorController.StepAbstractSerialDriver.Available| Modifier and Type | Field and Description |
|---|---|
private static boolean |
DEFALWAYSZERO
Default property value.
|
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 |
DEFOFFSETDEG
The default positionoffset in the filter wheel, degrees.
|
private static String |
DEFPARAMETERS
The default initializing parameters.
|
private static String |
DEFPOSITIONS
The default position in the filter wheel.
|
private static boolean |
DEFPOWEROFF
Default power-off after movement.
|
private static int |
DEFRATIO |
private static boolean |
DEFRESETONCLOSE
Default power-off after movement.
|
private static int |
DEFSTEPS |
private static String |
DEFZEROEND |
private List<Double> |
holes
List of positions available from
KEY_POSITIONS. |
static String |
KEY_ALWAYSZERO
If true, we always do a zero-search before attaining new position.
|
static String |
KEY_OFFSETDEG
The offsets to the positions in the filter wheel, degrees.
|
static String |
KEY_PARAMETERS
The parameters to send on init as a map.
|
static String |
KEY_POSITIONS
The positions in the filter wheel.
|
static String |
KEY_POWEROFF
If true, we power-off after moving.
|
static String |
KEY_RATIO |
static String |
KEY_RESETONCLOSE
If true, we return to zero-point on clsoe.
|
static String |
KEY_STARTUP
If this value is given, we obtain this position on start-up (open).
|
static String |
KEY_STEPS |
static String |
KEY_ZEROEND
+ or - end of the linear unit corresponds to the zero position.
|
private int |
lastposition
Last position successfully obtained.
|
private boolean |
motorZeroPositioned |
private int |
stepresolution |
axis, FAILED, HOME, KEY_ADDRESS, KEY_AXES, KEY_CONTROLLERTYPE, KEY_EEPROMSTORE, KEY_FAILAXISMOVE, KEY_PROTOCOL, KEY_RESPONSECHOP, KEY_RESPONSEDELAY, KEY_RETRYPOS, KEY_SERIALRETRY, KEY_SLEEPAXISMOVE, KEY_STEPTOLERANCE, KEY_TELEGRAM, KEY_WORKAROUND, MCC, OK, OMC, UNDEFINEDPOSITIONinport, 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, LOCK, outport, STATICLOCKKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_INITZEROCONFIG, KEY_CLASS| Constructor and Description |
|---|
WifsipWheel(Map<String,String> config)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
close()
If desired, we move the wheel close to the zero point on close to shorten
the next init.
|
protected double |
getControllerParameter(String param) |
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.
|
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 filter wheel into zero position after opening.
|
short |
readAnalog(int nr)
Read an A/D port.
|
boolean |
setPosition(int pos)
Sets the wheel in one of the 24 position.
|
boolean |
setPosition(String axis,
int pos)
Compatibility mode.
|
boolean |
setZeroPosition()
Sets the filter wheel to its mechanical zero position (M0P).
|
boolean |
setZeroPosition(String axis)
Compatibility mode.
|
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, writeStringcreatePortEventListener, createPortEventListener, deregisterSoleEventListener, disableEvent, enableEvent, getDriverName, isOpen, registerSoleEventListener, resetOriginalParameterscreateDriver, equals, hashCodeaugment, augment, augment, augment, augment, clone, 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, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetAxesNames, getStep, isContinuousgetDriverName, isOpenpublic static final String KEY_RATIO
private static final int DEFRATIO
public static final String KEY_STEPS
private static final int DEFSTEPS
public static final String KEY_POSITIONS
public static final String KEY_OFFSETDEG
public static final String DEFDRIVERNAME
public static final String KEY_PARAMETERS
public static final String KEY_POWEROFF
public static final String KEY_ALWAYSZERO
public static final String KEY_RESETONCLOSE
public static final String KEY_ZEROEND
public static final String KEY_STARTUP
private static final String DEFZEROEND
private static final String DEFAXIS
private static final String DEFPOSITIONS
private static final double DEFOFFSETDEG
private static final String DEFPARAMETERS
private static final boolean DEFINITZERO
private static final boolean DEFPOWEROFF
private static final boolean DEFRESETONCLOSE
private static final boolean DEFALWAYSZERO
private boolean motorZeroPositioned
private int stepresolution
private List<Double> holes
KEY_POSITIONS.private int lastposition
public void init()
throws InitException
init in interface Initializableinit in class MotorControllerInitExceptionpublic boolean open()
throws IOException
open in interface Driveropen in class MotorControllerIOExceptionprotected Map<String,String> getParametersFor(String ax)
getParametersFor in class MotorControllerpublic boolean close()
throws IOException
close in interface Driverclose in class AbstractSerialDriverIOExceptionprotected double getControllerParameter(String param) throws IOException, NullPointerException
IOExceptionNullPointerExceptionpublic 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.IOExceptionpublic int getMaxStep(String axis)
MultiAxesMultiAxes.getMaxPosition(java.lang.String) to estimate the number of steps per position.getMaxStep in interface MultiAxespublic boolean setPosition(int pos)
throws IOException
setPosition in interface Positioningpos - Integer (0 - 23) specifying the wheel position.IOException - If driver communication failed.public int getPosition()
MotorController.UNDEFINEDPOSITION.getPosition in interface Positioningpublic int getMaxPosition()
getMaxPosition in interface Positioningpublic boolean offset(int diff)
throws IOException
offset in interface PositioningIOExceptionpublic short readAnalog(int nr)
public boolean setZeroPosition()
throws IOException
setZeroPosition in interface PositioningIOException - If driver communication failed.