Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Command, Status
Collaboration diagram for Command, Status:

Functions

MLPIRESULT mlpiParameterReadDataStatus (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, BOOL8 *status)
 
MLPIRESULT mlpiParameterCommand (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn)
 
MLPIRESULT mlpiParameterReadCommandStatus (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, USHORT *status)
 

Detailed Description

These functions read the data status and handle the execution command.

Function Documentation

MLPIRESULT mlpiParameterReadDataStatus ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
BOOL8 status 
)

This function reads the data status of a parameter.

Parameters
[in]connectionHandle for multiple connections.
[in]addressAddress identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field.
[in]sidnID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID.
[out]statusPointer to variable where the status will be stored. TRUE if data status is valid.
Returns
Return value indicating success (>=0) or error (<0).
Note
You may want to look at the sercos specifications for a detailed description of the meaning of the data status.
Example:
1 // Read the data status of parameter 'C-0-0850'.
2 BOOL8 status = FALSE;
3 MLPIRESULT result = mlpiParameterReadDataStatus(connection, 0, MLPI_SIDN_C(850), &status);
4 if (status)
5  printf("data status valid!");
6 else
7  printf("data status not valid!");
MLPIRESULT mlpiParameterCommand ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn 
)

This function sets a command through a parameter. The command will be executed and the function will return when the command was either executed successfully or with an error (function is blocking while executing the command).

Parameters
[in]connectionHandle for multiple connections.
[in]addressAddress identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field.
[in]sidnID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Execute command of parameter 'C-0-1010'.
2 MLPIRESULT result = mlpiParameterCommand(connection, 0, MLPI_SIDN_C(1010));
MLPIRESULT mlpiParameterReadCommandStatus ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
USHORT status 
)

This function reads the parameter command status (comparing to MlpiParameterCommandStatus). Use this function to get the command status of parallel command executions triggered by several calls of mlpiParameterWriteDataUlong or the like.

Parameters
[in]connectionHandle for multiple connections.
[in]addressAddress identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field.
[in]sidnID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID.
[out]statusPointer to variable where the status will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Note
You may want to look at the sercos specifications for a detailed description of the meaning of the command status.
Example:
1 // Read the command status of parameter 'C-0-1010'.
2 USHORT status = 0;
3 MLPIRESULT result = mlpiParameterReadCommandStatus(connection, 0, MLPI_SIDN_C(1010), &status);