Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
UtilMotionHelper
Collaboration diagram for UtilMotionHelper:

Functions

MLPIRESULT utilMotionWait (MLPIHANDLE connection, MlpiAxisRef axis, MLPIMOTIONHANDLE motionHandle, ULONG timeout=MLPI_INFINITE)
 
MLPIRESULT utilMotionWaitAxisInterrupted (MLPIHANDLE connection, MlpiAxisRef axis, const ULONG timeout=MLPI_INFINITE)
 

Detailed Description

This module contains some useful functions and macros for parameter handling.

Please note that this piece of source code is not directly part of the MLPI. You do not need this file to program against the MLPI. Nevertheless, at least parts of this file have been considered to be somewhat useful when using or learning to use MLPI functionality. It is therefore included without any support, but to act as sample code and source of inspiration.

Function Documentation

MLPIRESULT utilMotionWait ( MLPIHANDLE  connection,
MlpiAxisRef  axis,
MLPIMOTIONHANDLE  motionHandle,
ULONG  timeout = MLPI_INFINITE 
)
inline

This function waits until a given motion command is done or an error occurs. An optional timeout can be given to the function.

Parameters
[in]connectionHandle for multiple connections.
[in]axisThe commanded axis.
[in]motionHandleThe handle identifying the motion command to wait for. This handle is returned by the motion command.
[in]timeoutTimeout in milliseconds for motion command to finish (optional).
Returns
Return value indicating success (>=0) or error (<0).
Example:
See Movement Functions

Definition at line 1135 of file mlpiMotionHelper.h.

References MLPI_E_TIMEOUT, MLPI_INFINITE, MLPI_S_OK, and mlpiMotionGetStatus().

Here is the call graph for this function:

MLPIRESULT utilMotionWaitAxisInterrupted ( MLPIHANDLE  connection,
MlpiAxisRef  axis,
const ULONG  timeout = MLPI_INFINITE 
)
inline

This function waits that the axis is no longer interrupted.

Parameters
[in]connectionHandle for multiple connections.
[in]axisThe commanded axis.
[in]timeoutTimeout in milliseconds for motion command interrupted (optional)
Returns
Return value indicating success (>=0) or error (<0).

Definition at line 1188 of file mlpiMotionHelper.h.

References MLPI_E_TIMEOUT, MLPI_INFINITE, MLPI_S_OK, MLPI_SUCCEEDED, and mlpiMotionGetState().

Here is the call graph for this function: