public class YMultiAxisController extends YFunction
Modifier and Type | Class and Description |
---|---|
static interface |
YMultiAxisController.TimedReportCallback
TimedReportCallback for MultiAxisController
|
static interface |
YMultiAxisController.UpdateCallback
Deprecated UpdateCallback for MultiAxisController
|
Modifier and Type | Field and Description |
---|---|
protected String |
_command |
protected int |
_globalState |
protected int |
_nAxis |
protected YMultiAxisController.UpdateCallback |
_valueCallbackMultiAxisController |
static String |
COMMAND_INVALID
invalid command value
|
static int |
GLOBALSTATE_ABSENT
invalid globalState value
|
static int |
GLOBALSTATE_ALERT |
static int |
GLOBALSTATE_BATCH |
static int |
GLOBALSTATE_HI_Z |
static int |
GLOBALSTATE_INVALID |
static int |
GLOBALSTATE_RUN |
static int |
GLOBALSTATE_STOP |
static int |
NAXIS_INVALID
invalid nAxis value
|
_advertisedValue, _cacheExpiration, _className, _dataStreams, _func, _funId, _hwId, _lastErrorMsg, _lastErrorType, _logicalName, _serial, _userData, _valueCallbackFunction, _yapi, ADVERTISEDVALUE_INVALID, FUNCTIONDESCRIPTOR_INVALID, LOGICALNAME_INVALID
Modifier | Constructor and Description |
---|---|
protected |
YMultiAxisController(String func) |
protected |
YMultiAxisController(YAPIContext ctx,
String func) |
Modifier and Type | Method and Description |
---|---|
int |
_invokeValueCallback(String value) |
protected void |
_parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) |
int |
abortAndBrake()
Stops the motor smoothly as soon as possible, without waiting for ongoing move completion.
|
int |
abortAndHiZ()
Turn the controller into Hi-Z mode immediately, without waiting for ongoing move completion.
|
int |
emergencyStop()
Stops the motor with an emergency alert, without taking any additional precaution.
|
int |
findHomePosition(ArrayList<Double> speed)
Starts all motors backward at the specified speeds, to search for the motor home position.
|
static YMultiAxisController |
FindMultiAxisController(String func)
Retrieves a multi-axis controller for a given identifier.
|
static YMultiAxisController |
FindMultiAxisControllerInContext(YAPIContext yctx,
String func)
Retrieves a multi-axis controller for a given identifier in a YAPI context.
|
static YMultiAxisController |
FirstMultiAxisController()
Starts the enumeration of multi-axis controllers currently accessible.
|
static YMultiAxisController |
FirstMultiAxisControllerInContext(YAPIContext yctx)
Starts the enumeration of multi-axis controllers currently accessible.
|
String |
get_command() |
int |
get_globalState()
Returns the stepper motor set overall state.
|
int |
get_nAxis()
Returns the number of synchronized controllers.
|
int |
getGlobalState()
Returns the stepper motor set overall state.
|
int |
getNAxis()
Returns the number of synchronized controllers.
|
int |
moveRel(ArrayList<Double> relPos)
Starts all motors synchronously to reach a given relative position.
|
int |
moveTo(ArrayList<Double> absPos)
Starts all motors synchronously to reach a given absolute position.
|
YMultiAxisController |
nextMultiAxisController()
Continues the enumeration of multi-axis controllers started using yFirstMultiAxisController().
|
int |
pause(int waitMs)
Keep the motor in the same state for the specified amount of time, before processing next command.
|
int |
registerValueCallback(YMultiAxisController.UpdateCallback callback)
Registers the callback function that is invoked on every change of advertised value.
|
int |
reset()
Reinitialize all controllers and clear all alert flags.
|
int |
sendCommand(String command) |
int |
set_command(String newval) |
int |
set_nAxis(int newval)
Changes the number of synchronized controllers.
|
int |
setNAxis(int newval)
Changes the number of synchronized controllers.
|
_AddToCache, _clearDataStreamCache, _devRequest, _download, _escapeAttr, _FindFromCache, _FindFromCacheInContext, _get_json_path_struct, _get_json_path, _json_get_array, _json_get_key, _json_get_string, _parse, _parserHelper, _setAttr, _throw, _UpdateTimedReportCallbackList, _UpdateValueCallbackList, _upload, _upload, clearCache, describe, errMessage, errorMessage, errorType, errType, FindFunction, FindFunctionInContext, FirstFunction, FirstFunctionInContext, functionDescriptor, get_advertisedValue, get_errorMessage, get_errorType, get_friendlyName, get_functionDescriptor, get_functionId, get_hardwareId, get_logicalName, get_module, get_serialNumber, get_userData, getAdvertisedValue, getErrorMessage, getErrorType, getFriendlyName, getFunctionDescriptor, getFunctionId, getHardwareId, getLogicalName, getModule, getUserData, isOnline, isReadOnly, load, loadAttribute, module, muteValueCallbacks, nextFunction, registerValueCallback, set_advertisedValue, set_logicalName, set_userData, setLogicalName, setUserData, toString, unmuteValueCallbacks, userData
public static final int NAXIS_INVALID
public static final int GLOBALSTATE_ABSENT
public static final int GLOBALSTATE_ALERT
public static final int GLOBALSTATE_HI_Z
public static final int GLOBALSTATE_STOP
public static final int GLOBALSTATE_RUN
public static final int GLOBALSTATE_BATCH
public static final int GLOBALSTATE_INVALID
public static final String COMMAND_INVALID
protected int _nAxis
protected int _globalState
protected String _command
protected YMultiAxisController.UpdateCallback _valueCallbackMultiAxisController
protected YMultiAxisController(YAPIContext ctx, String func)
func
- : functionidprotected YMultiAxisController(String func)
func
- : functionidprotected void _parseAttr(com.yoctopuce.YoctoAPI.YJSONObject json_val) throws Exception
_parseAttr
in class YFunction
Exception
public int get_nAxis() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getNAxis() throws YAPI_Exception
YAPI_Exception
- on errorpublic int set_nAxis(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of synchronized controllersYAPI_Exception
- on errorpublic int setNAxis(int newval) throws YAPI_Exception
newval
- : an integer corresponding to the number of synchronized controllersYAPI_Exception
- on errorpublic int get_globalState() throws YAPI_Exception
YAPI_Exception
- on errorpublic int getGlobalState() throws YAPI_Exception
YAPI_Exception
- on errorpublic String get_command() throws YAPI_Exception
YAPI_Exception
public int set_command(String newval) throws YAPI_Exception
YAPI_Exception
public static YMultiAxisController FindMultiAxisController(String func)
func
- : a string that uniquely characterizes the multi-axis controllerpublic static YMultiAxisController FindMultiAxisControllerInContext(YAPIContext yctx, String func)
yctx
- : a YAPI contextfunc
- : a string that uniquely characterizes the multi-axis controllerpublic int registerValueCallback(YMultiAxisController.UpdateCallback callback)
callback
- : the callback function to call, or a null pointer. The callback function should take two
arguments: the function object of which the value has changed, and the character string describing
the new advertised value.public int _invokeValueCallback(String value)
_invokeValueCallback
in class YFunction
public int sendCommand(String command) throws YAPI_Exception
YAPI_Exception
public int reset() throws YAPI_Exception
YAPI_Exception
- on errorpublic int findHomePosition(ArrayList<Double> speed) throws YAPI_Exception
speed
- : desired speed for all axis, in steps per second.YAPI_Exception
- on errorpublic int moveTo(ArrayList<Double> absPos) throws YAPI_Exception
absPos
- : absolute position, measured in steps from each origin.YAPI_Exception
- on errorpublic int moveRel(ArrayList<Double> relPos) throws YAPI_Exception
relPos
- : relative position, measured in steps from the current position.YAPI_Exception
- on errorpublic int pause(int waitMs) throws YAPI_Exception
waitMs
- : wait time, specified in milliseconds.YAPI_Exception
- on errorpublic int emergencyStop() throws YAPI_Exception
YAPI_Exception
- on errorpublic int abortAndBrake() throws YAPI_Exception
YAPI_Exception
- on errorpublic int abortAndHiZ() throws YAPI_Exception
YAPI_Exception
- on errorpublic YMultiAxisController nextMultiAxisController()
public static YMultiAxisController FirstMultiAxisController()
public static YMultiAxisController FirstMultiAxisControllerInContext(YAPIContext yctx)
yctx
- : a YAPI context.Copyright © 2019. All rights reserved.