These functions read the data status and handle the execution command.
This function reads the data status of a parameter.
- Parameters
-
[in] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | status | Pointer 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'.
3 MLPIRESULT result = mlpiParameterReadDataStatus(connection, 0, MLPI_SIDN_C(850), &status);
5 printf("data status valid!");
7 printf("data status not valid!");
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] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field. |
[in] | sidn | ID 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));
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] | connection | Handle for multiple connections. |
[in] | address | Address identifying the object to be accessed. Use macro MLPI_ADDRESS_x to generate an address field. |
[in] | sidn | ID of parameter to be accessed. Use macro MLPI_SIDN_x to get the desired ID. |
[out] | status | Pointer 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'.
3 MLPIRESULT result = mlpiParameterReadCommandStatus(connection, 0, MLPI_SIDN_C(1010), &status);