public class LinearPositioner extends MotorController implements MultiAxes
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. Update 2014 (TG): Noticed during ADC: The step-resolution is closer to 25000mu on 49038.68*4 steps, if the step resolution (P45) is set to 4 (4 software steps per 'true' step). Thus, for 1mu you get 7.846 steps. Note also the initialization direction. If set to '+' on the relevant (=Y) axis, the temperature-dependency is negative (higher temperatures, lower y position).
| Modifier and Type | Class and Description |
|---|---|
static class |
LinearPositioner.lpUI
Test user interface.
|
MotorController.AxesReset, MotorController.Dump, MotorController.Reset, MotorController.Set, MotorController.Status, MotorController.StepAbstractSerialDriver.Available| Modifier and Type | Field and Description |
|---|---|
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.
|
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 |
|---|
LinearPositioner(Map<String,String> config)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, writeStringclose, createPortEventListener, 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, isContinuousclose, getDriverName, isOpenpublic 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
public void init()
throws InitException
MotorControllerinit in interface Initializableinit in class MotorControllerInitExceptionpublic int getMaxStep(String axis)
getMaxStep in interface MultiAxespublic 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.IOExceptionpublic 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.