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

Functions

MLPIRESULT mlpiRobotTeachInWritePoint (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotTeachInDataWrite *paramSet)
 
MLPIRESULT mlpiRobotTeachInReadPoint (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotTeachInDataRead *paramSet)
 
MLPIRESULT mlpiRobotTeachInReadNextPoint (const MLPIHANDLE connection, const MlpiGroupRef group, MlpiRobotTeachInDataReadNext *paramSet)
 
MLPIRESULT mlpiRobotTeachInDeletePoints (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotTeachInDataDeletePoints *paramSet)
 
MLPIRESULT mlpiRobotTeachInSavePointFile (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotTeachInDataFileData *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotTeachInLoadPointFile (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotTeachInDataFileData *paramSet, MLPIMOTIONHANDLE *motionHandle)
 
MLPIRESULT mlpiRobotTeachInDeletePointFile (const MLPIHANDLE connection, const MlpiGroupRef group, const MlpiRobotTeachInDataDeleteFileData *paramSet, MLPIMOTIONHANDLE *motionHandle)
 

Detailed Description

This group of functions allows the user to use the TeachIn functions.

Function Documentation

MLPIRESULT mlpiRobotTeachInWritePoint ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotTeachInDataWrite paramSet 
)

This function saves or modifies a point for the TeachIn.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Save the defined point for the TeachIn.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotPoint P1 = {0};
6 P1.coordinate[0] = 100.0;
7 P1.coordinate[1] = 0.0;
8 P1.coordinate[2] = 0.0;
9 MlpiRobotTeachInDataWrite paramSet;
10 paramSet.teachPoint = P1;
11 paramSet.usOptions = MLPI_ROBOT_TEACH_IN_WRITE_POINT_SIMPLE;
12 paramSet.wCoordSys = MLPI_ROBOT_CS_MCS;
13 memcpy(paramSet.pointName, L"Point1", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
14 MLPIRESULT result = mlpiRobotTeachInWritePoint(connection, group, &paramSet);
MLPIRESULT mlpiRobotTeachInReadPoint ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotTeachInDataRead paramSet 
)

This function returns a point of the TeachIn map.

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 // Read a point of the TeachIn map.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotTeachInDataRead paramSet;
6 memcpy(paramSet.pointName, L"Point1", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
7 MLPIRESULT result = mlpiRobotTeachInReadPoint(connection, group, &paramSet);
8 MlpiRobotPoint P1 = paramSet.teachPoint;
9 MlpiRobotCoordinateSystem CoordSys = paramSet.wCoordSys;
MLPIRESULT mlpiRobotTeachInReadNextPoint ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
MlpiRobotTeachInDataReadNext paramSet 
)

This function returns the next point of the TeachIn map.

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 //Read the next point of the TeachIn map.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotTeachInDataReadNext paramSet;
6 memcpy(paramSet.pointNameInput, L"Point1", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
7 MLPIRESULT result = mlpiRobotTeachInReadNextPoint(connection, group, &paramSet);
8 WCHAR16 nextPoint[MLPI_ROBOT_MAX_TEACH_NAME_LEN];
9 memcpy(nextPoint, paramSet.pointNameInput, MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
10 MlpiRobotPoint P1 = paramSet.teachPoint;
11 MlpiRobotCoordinateSystem CoordSys = paramSet.wCoordSys;
MLPIRESULT mlpiRobotTeachInDeletePoints ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotTeachInDataDeletePoints paramSet 
)

This function deletes points of the TeachIn map. For delete of multiple points use "*" at the end of the name.

Parameters
[in]connectionHandle for multiple connections.
[in]groupReference to group.
[in]paramSetStructure containing all information necessary for the command.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Delete the defined point of the TeachIn map.
2 MlpiGroupRef group;
3 group.controlNo = MLPI_LOCAL_CONTROL;
4 group.groupNo = MLPI_GROUP_1;
5 MlpiRobotTeachInDataDeletePoints paramSet;
6 memcpy(paramSet.pointName, L"Point1", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
7 MLPIRESULT result = mlpiRobotTeachInDeletePoints(connection, group, &paramSet);
MLPIRESULT mlpiRobotTeachInSavePointFile ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotTeachInDataFileData paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function will save the actual map to a file.

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 // Save the actual map to the file.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotTeachInDataFileData paramSet;
7 memcpy(paramSet.fileName, L"TestFile", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
8 paramSet.fileOptions = MLPI_ROBOT_TEACH_IN_NEW;
9 MLPIRESULT result = mlpiRobotTeachInSavePointFile(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotTeachInLoadPointFile ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotTeachInDataFileData paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function will load the map from a file.

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 // Load the map from a file.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotTeachInDataFileData paramSet;
7 memcpy(paramSet.fileName, L"TestFile", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
8 paramSet.fileOptions = MLPI_ROBOT_TEACH_IN_NEW;
9 MLPIRESULT result = mlpiRobotTeachInLoadPointFile(connection, group, &paramSet, &motionHandle);
MLPIRESULT mlpiRobotTeachInDeletePointFile ( const MLPIHANDLE  connection,
const MlpiGroupRef  group,
const MlpiRobotTeachInDataDeleteFileData paramSet,
MLPIMOTIONHANDLE motionHandle 
)

This function will delete a point file.

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 // Delete a point file.
2 MLPIMOTIONHANDLE motionHandle;
3 MlpiGroupRef group;
4 group.controlNo = MLPI_LOCAL_CONTROL;
5 group.groupNo = MLPI_GROUP_1;
6 MlpiRobotTeachInDataDeleteFileData paramSet;
7 memcpy(paramSet.fileName, L"TestFile", MLPI_ROBOT_MAX_TEACH_NAME_LEN*sizeof(WCHAR16));
8 MLPIRESULT result = mlpiRobotTeachInDeletePointFile(connection, group, &paramSet, &motionHandle);