Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4MATLAB)  1.26.2
Utility
Collaboration diagram for Utility:
Utility Functions

Utility Functions

Description

This function group includes utility functions that can simplify development.

More Information

For more information, refer to mlpiCore documentation: Utility.

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MUtilGetMlpiType

m4MUtilGetMlpiType

m4MUtilGetMlpiType

Utility-Function: Get MLPI data type from MATLAB variable.

Description

This function determines the class of a MATLAB variable and returns the corresponding MlpiType enumeration. Only the following MATLAB data types are supported: int8, int16, int32, uint8, uint16, uint32, single, double and char.

Syntax

[mlpiType] = m4MUtilGetMlpiType(matlabVariable)

Input Arguments

matlabVariable defines the MATLAB variable. The argument can be scalar, 2-dimensional or 3-dimensional. The data type can be int8, int16, int32, uint8, uint16, uint32, single, double or char.

Output Arguments

mlpiType contains the MLPI data type as scalar MlpiType enumeration.

Example Files

Here you will find instructions to use the examples.

The following example is available in the folder ./mlpi/mlpi4MATLAB/bin:

See also

Copyright

Legal notice and version: © 2017 Bosch Rexroth Corporation http://www.boschrexroth.com DC-AE/EAS1 (MGo) Library version: 1.26.2.0.0

m4MUtilMotionWait

m4MUtilMotionWait

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