m4MUtilMotionWait
Utility-Function: Wait for a motion process.
Description
This function waits until a defined motion commands is done or an error occured. A timeout has to be provided to abort waiting after a certain time. The function can be executed on one axis only.
Syntax
[out] = m4MUtilMotionWait(connection, axisRef, motionHandle, timeout)
Input Arguments
connection defines the connection that will be used. The argument must be scalar and of type MlpiConnection.
axisRef defines a matrix with axis and control numbers for the axes. The argument must be numeric and can have the following dimensions:
- 1x1 matrix: A scalar defines a single axis number on the connected MLPI device.
- 1x2 matrix: The first value defines the control number and the second value defines the axis number on that control.
- Nx2 matrix: Each row defines a pair of control and axis number. The first column defines the control numbers and the second column defines the axis numbers.
motionHandle defines the motion handle of the command that has to be waited for. The argument must be a 1x2 uint32 matrix. motionHandle is the output argument of some m4MMotion functions.
timout defines the timeout in milliseconds. The argument must be a numeric scalar value. Internally the value will be casted to uint32. The command will block further processing until the timeout expired or the motion command that returned motionHandle completed its procedure. The command returns with an error code if the timeout expired. Avoid using M4M_CONST.INFINITY as timeout.
Output Arguments
out contains the logical value true if the motion function succeeded. The argument is a logical scalar. Note: Due to the error handling definition the value is NaN if the function failed.
result contains the return value of the MLPI function. The argument is scalar and of type int32. Negative values indicate a failed function call. If the function call fails, other output arguments will be set to NaN. For details refer to the section Error Identification and Handling in Fundamentals of MLPI Programming.
Example Files
Here you will find instructions to use the examples.
The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:
See also
Reference to mlpiCore
This function maps to the mlpiCore function utilMotionWait in the header file .\mlpi\mlpiCore\include\util\motionHelper.h
Copyright
Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0