Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Configuration functions
Collaboration diagram for Configuration functions:

Functions

MLPIRESULT mlpiRobotSetBeltConfiguration (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotSetBeltConfiguration *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotSetRotaryTableConfiguration (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotSetBeltConfiguration *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotSetBeltErrorReaction (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotSetBeltErrorReaction *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotGetBeltErrorReaction (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotGetBeltErrorReaction *paramSet)
 
MLPIRESULT mlpiRobotSetCartesianTransform (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotSetTrafoParameter *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotSetCylindricTransform (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotSetTrafoParameter *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotGetTransform (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotGetTrafoParameter *trafoValues)
 
MLPIRESULT mlpiRobotGetBeltConfiguration (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotGetBeltConfiguration *trafoValues)
 
MLPIRESULT mlpiRobotReset (const MLPIHANDLE connection, const MlpiGroupRef group, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotAddAllAxisToGroup (const MLPIHANDLE connection, const MlpiGroupRef group)
 
MLPIRESULT mlpiRobotRemAllAxisFromGroup (const MLPIHANDLE connection, const MlpiGroupRef group)
 
MLPIRESULT mlpiRobotSetSafeZone (const MLPIHANDLE connection, MlpiGroupRef group, MlpiRobotSafeZoneData *safeZoneData, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotSetBeltDesyncRelConfig (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotBeltDesyncRelData *paramSet)
 
MLPIRESULT mlpiRobotGetBeltDesyncRelConfig (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotBeltDesyncRelData *paramSet)
 
MLPIRESULT mlpiRobotSetMoveId (const MLPIHANDLE connection, const MlpiGroupRef group, const ULONG moveId)
 
MLPIRESULT mlpiRobotChangeTool (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotChangeToolParameter *paramSet, MLPIMOTIONHANDLE *motionHandle)
 

Detailed Description

The following functions all deal with administration of groups.

Function Documentation

MLPIRESULT mlpiRobotSetBeltConfiguration ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotSetBeltConfiguration paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function configures a belt.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Configures a belt with the settings of paramSet.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotSetBeltConfiguration paramSet;
7 paramSet.belt.axisNo = MLPI_AXIS_4;
8 paramSet.belt.controlNo = MLPI_LOCAL_CONTROL;
9 paramSet.posX = 0.0;
10 paramSet.posY = 0.0;
11 paramSet.posZ = 0.0;
12 paramSet.rotA = 0.0;
13 paramSet.rotB = 0.0;
14 paramSet.rotC = 0.0;
15 paramSet.begin = 10.0;
16 paramSet.total = 110.0;
17 MLPIRESULT result = mlpiRobotSetBeltConfiguration(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotSetRotaryTableConfiguration ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotSetBeltConfiguration paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function configures a rotary table.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Configures a rotary table with the settings of paramSet.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotSetBeltConfiguration paramSet;
7 paramSet.belt.axisNo = MLPI_AXIS_4;
8 paramSet.belt.controlNo = MLPI_LOCAL_CONTROL;
9 paramSet.posX = 0.0;
10 paramSet.posY = 0.0;
11 paramSet.posZ = 0.0;
12 paramSet.rotA = 0.0;
13 paramSet.rotB = 0.0;
14 paramSet.rotC = 0.0;
15 paramSet.begin = 10.0;
16 paramSet.total = 110.0;
17 MLPIRESULT result = mlpiRobotSetRotaryTableConfiguration(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotSetBeltErrorReaction ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotSetBeltErrorReaction paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function configures the error reaction of a belt.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Configure error reaction of a belt to desync over 100ms.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiAxisRef belt;
7 belt.axisNo = MLPI_AXIS_4;
8 belt.controlNo = MLPI_LOCAL_CONTROL;
9 MlpiRobotSetBeltErrorReaction paramSet;
10 paramSet.belt = belt;
11 paramSet.decelaration = 0.0;
12 paramSet.errorType = MLPI_ROBOT_BELT_ERROR_DESYNC_OVER_TIME;
13 paramSet.jerk = 0.0;
14 paramSet.time = 100.0;
15 MLPIRESULT result = mlpiRobotSetBeltErrorReaction(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotGetBeltErrorReaction ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotGetBeltErrorReaction paramSet 
)

This function gets the configured error reaction of a belt.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in,out]paramSetStructure containing all information necessary for the command.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Get Configured error reaction of a belt.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiAxisRef belt;
6 belt.axisNo = MLPI_AXIS_4;
7 belt.controlNo = MLPI_LOCAL_CONTROL;
8 MlpiRobotGetBeltErrorReaction paramSet;
9 paramSet.belt = belt;
10 MLPIRESULT result = mlpiRobotGetBeltErrorReaction(connection, group, &paramSet);
MLPIRESULT mlpiRobotSetCartesianTransform ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotSetTrafoParameter paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function configures a Cartesian transformation between PCS and MCS. Note that this function will return an error if a belt is configured for the PCS.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Transforms the origin of MLPI_ROBOT_CS_PCS1 to (100.0,50.0,0.0,0.0,0.0,0.0) in MCS.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotSetTrafoParameter paramSet;
7 paramSet.coordSystem = MLPI_ROBOT_CS_PCS1;
8 paramSet.posX = 100;
9 paramSet.posY = 50;
10 paramSet.posZ = 0;
11 paramSet.rotA = 0.0;
12 paramSet.rotB = 0.0;
13 paramSet.rotB = 0.0;
14 MLPIRESULT result = mlpiRobotSetCartesianTransform(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotSetCylindricTransform ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotSetTrafoParameter paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function configures a cylindric transformation between PCS and MCS.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Transforms the origin of MLPI_ROBOT_CS_PCS1 to (100.0,50.0,0.0,0.0,0.0,0.0) in MCS.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotSetTrafoParameter paramSet;
7 paramSet.coordSystem = MLPI_ROBOT_CS_PCS1;
8 paramSet.posX = 100;
9 paramSet.posY = 50;
10 paramSet.posZ = 0;
11 paramSet.rotA = 0.0;
12 paramSet.rotB = 0.0;
13 paramSet.rotB = 0.0;
14 MLPIRESULT result = mlpiRobotSetCylindricTransform(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotGetTransform ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotGetTrafoParameter trafoValues 
)

This function gets configuration values of transformation. This function can be called for MLPI_ROBOT_CS_BCS and MLPI_ROBOT_CS_PCSx. For the future: ACS_BCS is not supported yet.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in,out]trafoValuesStructure containing all information
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Get the origin of MLPI_ROBOT_CS_BCS in MCS.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotGetTrafoParameter trafoValues;
6 trafoValues.coordSystem = MLPI_ROBOT_CS_BCS;
7 trafoValues.csType = MLPI_ROBOT_CARTESIAN;
8 MLPIRESULT result = mlpiRobotGetTransform(connection, group, &trafoValues);
MLPIRESULT mlpiRobotGetBeltConfiguration ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotGetBeltConfiguration trafoValues 
)

This function reads a belt configuration.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in,out]trafoValuesStructure containing all information
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Get the belt configuration.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiAxisRef belt;
6 belt.axisNo = MLPI_AXIS_4;
7 belt.controlNo = MLPI_LOCAL_CONTROL;
8 MlpiRobotGetBeltConfiguration trafoValues;
9 trafoValues.belt = belt;
10 MLPIRESULT result = mlpiRobotGetBeltConfiguration(connection, group, &trafoValues);
MLPIRESULT mlpiRobotReset ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MLPIMOTIONHANDLE motionHandle 
)

This function clears all errors of the group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group to reset all errors from
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Clear all errors of the group.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MLPIRESULT result = mlpiRobotReset(connection, group, &motionHandle);
MLPIRESULT mlpiRobotAddAllAxisToGroup ( const MLPIHANDLE  connection,
const MlpiGroupRef  group 
)

This function adds all configured axis to a group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Add all configured axis to a group.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MLPIRESULT result = mlpiRobotAddAllAxisToGroup(connection, group);
MLPIRESULT mlpiRobotRemAllAxisFromGroup ( const MLPIHANDLE  connection,
const MlpiGroupRef  group 
)

This function removes all configured axis from a group.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Remove all configured axis from a group.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MLPIRESULT result = mlpiRobotRemAllAxisFromGroup(connection, group);
MLPIRESULT mlpiRobotSetSafeZone ( const MLPIHANDLE  connection,
MlpiGroupRef  group,
MlpiRobotSafeZoneData safeZoneData,
MLPIMOTIONHANDLE motionHandle 
)

This function configures a save zone of a robot.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]safeZoneDataData of save zone.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Set safe zone data of the defined group.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotSafeZoneData paramSet;
7 paramSet.pointNeg[0] = 50;
8 paramSet.pointPos[0] = 100;
9 paramSet.zoneNumber = 1;
10 paramSet.zoneType = MLPI_ROBOT_SAFE_ZONE_TYPE_INSIDE_OK;
11 MLPIRESULT result = mlpiRobotSetSafeZone(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotSetBeltDesyncRelConfig ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotBeltDesyncRelData paramSet 
)

This function configures relative desynchronization from a belt.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the function.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Configure relative desynchronization from the defined belt.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotBeltDesyncRelData paramSet;
6 paramSet.belt.axisNo = MLPI_AXIS_4;
7 paramSet.belt.controlNo = MLPI_LOCAL_CONTROL;
8 paramSet.endPercent = 50.0;
9 paramSet.startPercent = 25.0;
10 MLPIRESULT result = mlpiRobotSetBeltDesyncRelConfig(connection, group, &paramSet);
MLPIRESULT mlpiRobotGetBeltDesyncRelConfig ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotBeltDesyncRelData paramSet 
)

This function reads relative desynchronization from a belt configuration.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the function.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read relative desynchronization from the defined belt.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotBeltDesyncRelData paramSet;
6 paramSet.belt.axisNo = MLPI_AXIS_4;
7 paramSet.belt.controlNo = MLPI_LOCAL_CONTROL;
8 MLPIRESULT result = mlpiRobotGetBeltDesyncRelConfig(connection, group, &paramSet);
MLPIRESULT mlpiRobotSetMoveId ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const ULONG  moveId 
)

This function will set an id in the block buffer for a command. This function can be called at any point. The block id will be incremented after the call of a movement command. The block id can be reseted with the id zero.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to the group.
[in]moveIdTo be set id.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Set block id.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 ULONG moveId = 150;
6 MLPIRESULT result = mlpiRobotSetMoveID(connection, group, moveId);
MLPIRESULT mlpiRobotChangeTool ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotChangeToolParameter paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function changes a tool.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the tool change command.
[out]motionHandlePointer to value where motion handle will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Configure a tool change.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotChangeToolParameter paramSet;
7 paramSet.posX = 70.0;
8 paramSet.posY = 50.0;
9 paramSet.posZ = 0.0;
10 paramSet.rotA = 90.0;
11 paramSet.rotB = 0.0;
12 paramSet.rotB = 0.0;
13 MLPIRESULT result = mlpiRobotChangeTool(connection, group, &paramSet, &motionHandle);