Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Robot information
Collaboration diagram for Robot information:

Functions

MLPIRESULT mlpiRobotReadCyclicChannel (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotCyclicChannel *paramSet)
 
MLPIRESULT mlpiRobotReadPos (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotCoordinateSystem coordSystem, const MlpiRobotPointType pointType, MlpiRobotPoint *position)
 
MLPIRESULT mlpiRobotMovePoint (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotCoordinateSystem coordSystem, MlpiRobotPoint *position)
 
MLPIRESULT mlpiRobotTransformPoint (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotCoordinateSystem coordSystemIn, const MlpiRobotCoordinateSystem coordSystemOut, MlpiRobotPoint *position)
 
MLPIRESULT mlpiRobotMotionGetStatus (const MLPIHANDLE connection, const MlpiGroupRef group, const MLPIMOTIONHANDLE motionHandle, MlpiRobotMotionStatus *status)
 
MLPIRESULT mlpiRobotSetPerformanceEnable (const MLPIHANDLE connection, const MlpiGroupRef group, const BOOL8 enable)
 
MLPIRESULT mlpiRobotGetPerfomanceResult (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotPerformanceResult *performanceResult, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiRobotGetMechanicData (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotMechanicData *mechanicData, const ULONG numElements, ULONG *numElementsRet, BOOL8 updateOnly)
 
MLPIRESULT mlpiRobotGetKinematicsValues (const MLPIHANDLE connection, MlpiGroupRef *groups, MlpiKinematicsValues *kinematicsValues, const ULONG numElements)
 
MLPIRESULT mlpiRobotGetDiagnosisText (const MLPIHANDLE connection, const MlpiGroupRef group, WCHAR16 *buffer, const ULONG numElements)
 
MLPIRESULT mlpiRobotGetKinematicsUnits (const MLPIHANDLE connection, MlpiGroupRef *groups, MlpiKinematicsUnits *kinematicsUnits, const ULONG numElements)
 
MLPIRESULT mlpiRobotGetSafeZones (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotSafeZoneData *safeZoneData, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiRobotGetCoordinateSystemInfo (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotCoordinateSystemInfo *csInfo, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiRobotGetStatusSummary (const MLPIHANDLE connection, MlpiRobotGetStatusSummary *statusSummary, const ULONG numElements)
 
MLPIRESULT mlpiRobotGetMoveId (const MLPIHANDLE connection, const MlpiGroupRef group, DOUBLE *moveId)
 
MLPIRESULT mlpiRobotGetCmdInfo (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotCmdInfoType infoType, MlpiRobotCmdInfo *cmdInfo, const ULONG numElements, ULONG *numElementsRet)
 

Detailed Description

This group of functions allows the user to get group related information.

Function Documentation

MLPIRESULT mlpiRobotReadCyclicChannel ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotCyclicChannel paramSet 
)

This function returns last values written by mlpiRobotWriteCyclicChannel.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[out]paramSetStructure containing all information necessary for the command. Returned cyclic pos.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // returns last values written by mlpiRobotWriteCyclicChannel
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotCyclicChannel paramSet;
6 MLPIRESULT result = mlpiRobotReadCyclicChannel(connection, group, &paramSet);
MLPIRESULT mlpiRobotReadPos ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotCoordinateSystem  coordSystem,
const MlpiRobotPointType  pointType,
MlpiRobotPoint position 
)

This function returns the current position of the robot.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]coordSystemCoordinate system to read position from.
[in]pointTypePoint type to read position from.
[out]positionCurrent position.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the current position of the robot.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotPoint position;
6 MLPIRESULT result = mlpiRobotReadPos(connection, group, MLPI_ROBOT_CS_MCS, MLPI_ROBOT_POINT_TYPE_PREP, &position);
MLPIRESULT mlpiRobotMovePoint ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotCoordinateSystem  coordSystem,
MlpiRobotPoint position 
)

This function moves a point at the current position in space. Usually this function should be called for points on a belt. A point with one more belt values will be moved to current belt values. After calling this function the point on a belt has the current position in space with the current belt value. Points without belt values will not be modified.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]coordSystemCoordinate system of the point.
[in,out]positionCurrent position.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // moves a point on a belt to current position.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotPoint position;
6 MLPIRESULT result = mlpiRobotMovePoint(connection, group, MLPI_ROBOT_CS_MCS, &position);
MLPIRESULT mlpiRobotTransformPoint ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotCoordinateSystem  coordSystemIn,
const MlpiRobotCoordinateSystem  coordSystemOut,
MlpiRobotPoint position 
)

Transform a point from coordSystemIn to coordSystemOut. The location of the point stays the same. Only the point of view (coordinate system) changes.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]coordSystemInCoordinate system to read position from.
[in]coordSystemOutCoordinate system to which the position gets transformed.
[in,out]positionCurrent position.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Transform point from MCS to BCS.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotPoint position;
6 MLPIRESULT result = mlpiRobotTransformPoint(connection, group, MLPI_ROBOT_CS_MCS, MLPI_ROBOT_CS_BCS, &position);
MLPIRESULT mlpiRobotMotionGetStatus ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MLPIMOTIONHANDLE  motionHandle,
MlpiRobotMotionStatus status 
)

This function reads the status of a movement command.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[in]motionHandleHandle of the motion command where the status should be requested.
[out]statusPointer to data where status will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read status of a movement command.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotMotionStatus status;
6 MLPIRESULT result = mlpiRobotMotionGetStatus(connection, group, motionHandle, &status);
MLPIRESULT mlpiRobotSetPerformanceEnable ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const BOOL8  enable 
)

This function enables/disables the performance measurement of the core of the defined group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[in]enabletrue to start measurement, false to stop measurement
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Enable the performance measurement of the core of the defined group.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MLPIRESULT result = mlpiRobotSetPerformanceEnable(connection, group, TRUE);
MLPIRESULT mlpiRobotGetPerfomanceResult ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotPerformanceResult performanceResult,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads the performance measurement result from the defined group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[out]performanceResultPerformance measurement result.
[in]numElementsCount of performanceResult array size.
[out]numElementsRetReturn count of performanceResult.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read performance measurement result from defined group.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotPerformanceResult arPerfResults[100];
6 ULONG ulPerfCount = 0;
7 MLPIRESULT result = mlpiRobotGetPerfomanceResult(connection, group, arPerfResults, 100, &ulPerfCount);
MLPIRESULT mlpiRobotGetMechanicData ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotMechanicData mechanicData,
const ULONG  numElements,
ULONG numElementsRet,
BOOL8  updateOnly 
)

This function reads the mechanical data from the defined group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[out]mechanicDataMechanical data.
[in]numElementsCount of mechanical data array size.
[out]numElementsRetReturn count of mechanical data read.
[in]updateOnlytrue to update only, false to refresh everything
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the mechanical data from the defined group
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotMechanicData mechanicalData[100];
6 ULONG numElementsRet = 0;
7 MLPIRESULT result = mlpiRobotGetMechanicData(connection, group, &mechanicalData, 100, &numElementsRet, TRUE);
MLPIRESULT mlpiRobotGetKinematicsValues ( const MLPIHANDLE  connection,
MlpiGroupRef groups,
MlpiKinematicsValues kinematicsValues,
const ULONG  numElements 
)

This function returns an array of MlpiKinematicsValues structures. Use the group element of the structure to specify the kinematics for which information should be read. You may want to use this structure to read several sets of kinematics information for several kinematics using one single function call during operation of the kinematics. This provides increased performance in comparison to reading the values bit by bit and kinematics by kinematics.

Parameters
[in]connectionHandle for multiple connections.
[in]groupsReference to groups.
[out]kinematicsValuesReturns a struct with the current operation information about kinematics.
[in]numElementsNumber of kinematics for which values should be read. This is the array length of the parameter kinematicsValues.
Returns
Return value indicating success (>=0) or error (<0).
Note
Elements of the struct (beside controlNo and groupNo) that can not be read will be set to 0.
Example:
1 // Get KinematicsValues of defined groups.
2 const ULONG numElements = 2;
3 MlpiGroupRef groups[2];
4 groups[0].controlNo = MLPI_LOCAL_CONTROL;
5 groups[0].groupNo = (MlpiGroupNumber)(1);
6 groups[1].controlNo = MLPI_LOCAL_CONTROL;
7 groups[1].groupNo = (MlpiGroupNumber)(2);
8 MlpiKinematicsValues kinematicsValues[2];
9 MLPIRESULT result = mlpiRobotGetKinematicsValues(connection, groups, kinematicsValues, numElements);
MLPIRESULT mlpiRobotGetDiagnosisText ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
WCHAR16 buffer,
const ULONG  numElements 
)

This function reads the diagnostic message of the kinematics.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[out]bufferPointer to where text should be stored.
[in]numElementsNumber of available WCHAR16 characters in buffer.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Get DiagnosisText of defined group.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 WCHAR16 buffer[BUFFERLENGTH];
6 MLPIRESULT result = mlpiRobotGetDiagnosisText(connection, group, buffer, BUFFERLENGTH );
MLPIRESULT mlpiRobotGetKinematicsUnits ( const MLPIHANDLE  connection,
MlpiGroupRef groups,
MlpiKinematicsUnits kinematicsUnits,
const ULONG  numElements 
)

This function returns the current unit settings of an array of kinematics in string representation. Use it to read the unit settings for display in an HMI.

Parameters
[in]connectionHandle for multiple connections.
[in]groupsReference to groups.
[out]kinematicsUnitsReturns a struct with the current unit settings of the kinematics.
[in]numElementsNumber of kinematics for which values should be read. This is the array length of the parameter kinematicsUnits.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Get KinematicsUnits of defined groups.
2 const ULONG numElements = 2;
3 MlpiGroupRef groups[2];
4 groups[0].controlNo = MLPI_LOCAL_CONTROL;
5 groups[0].groupNo = (MlpiGroupNumber)(1);
6 groups[1].controlNo = MLPI_LOCAL_CONTROL;
7 groups[1].groupNo = (MlpiGroupNumber)(2);
8 MlpiKinematicsUnits kinematicsUnits[numElements];
9 MLPIRESULT result = mlpiRobotGetKinematicsUnits(connection, groups, kinematicsUnits, numElements);
MLPIRESULT mlpiRobotGetSafeZones ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotSafeZoneData safeZoneData,
const ULONG  numElements,
ULONG numElementsRet 
)

This function gets all safezones of a kinematics.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[out]safeZoneDataData of save zone.
[in]numElementsNumber of safezones that should be read. This is the array length of the parameter safeZoneData.
[out]numElementsRetReturn count of safezones.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // read all safe zones of a kinematics.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotSafeZoneData paramSet[MLPI_ROBOT_MAX_SAFEZONES];
6 ULONG numRetElements = 0;
7 MLPIRESULT result = mlpiRobotGetSafeZones(connection, group, &paramSet, MLPI_ROBOT_MAX_SAFEZONES, &numRetElements);
MLPIRESULT mlpiRobotGetCoordinateSystemInfo ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotCoordinateSystemInfo csInfo,
const ULONG  numElements,
ULONG numElementsRet 
)

This function will return information about the supported coordinate systems from the kinematics.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[out]csInfoStructure containing all information necessary for the command.
[in]numElementsNumber of elements.
[out]numElementsRetNumber of elements returned.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read information about the supported coordinate systems from the kinematics.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotCoordinateSystemInfo coordinateSystems[19];
6 ULONG numElemsRet;
7 MLPIRESULT result = mlpiRobotGetCoordinateSystemInfo(connection, group, coordinateSystems, 19, &numElemsRet);
MLPIRESULT mlpiRobotGetStatusSummary ( const MLPIHANDLE  connection,
MlpiRobotGetStatusSummary statusSummary,
const ULONG  numElements 
)

This function will return actual status information about kinematics in a specified coordinate systems.

Parameters
[in]connectionHandle for multiple connections.
[in,out]statusSummaryStructure containing all information necessary for the command.
[in]numElementsNumber of elements.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read actual status information.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotGetStatusSummary statusSummary[2];
6 statusSummary[0].group.controlNo = MLPI_LOCAL_CONTROL;
7 statusSummary[0].group.groupNo = MLPI_GROUP_1;
8 statusSummary[0].coordSys = MLPI_ROBOT_CS_MCS;
9 statusSummary[1].group.controlNo = MLPI_LOCAL_CONTROL;
10 statusSummary[1].group.groupNo = MLPI_GROUP_2;
11 statusSummary[1].coordSys = MLPI_ROBOT_CS_ACS;
12 MLPIRESULT result = mlpiRobotGetStatusSummary(connection, statusSummary, 2);
MLPIRESULT mlpiRobotGetMoveId ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
DOUBLE moveId 
)

This function will read the block id and the progress of the currently executed move command. The integer value in front of the dot represents the block id. The decimal part after the dot shows the progress of a movement.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[out]moveIdId and progress of the currently executed command.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read block id
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 DOUBLE moveId = 0.0;
6 MLPIRESULT result = mlpiRobotGetMoveID(connection, group, &moveId);
MLPIRESULT mlpiRobotGetCmdInfo ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotCmdInfoType  infoType,
MlpiRobotCmdInfo cmdInfo,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads the command info from the defined group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[in]infoTypeType of information.
[out]cmdInfoCommand info.
[in]numElementsCount of command info array size.
[out]numElementsRetReturn count of command info read
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the command info from the defined group
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotCmdInfoType infoType = MLPI_ROBOT_CMD_DATA_TYPE_UID;
6 MlpiRobotCmdInfo cmdInfo[100];
7 ULONG numElementsRet = 0;
8 MLPIRESULT result = mlpiRobotGetCmdInfo(connection, group, infoType, cmdInfo, 100, &numElementsRet);