Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
Read default value
Collaboration diagram for Read default value:

Functions

MLPIRESULT mlpiParameterReadDefaultShort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, SHORT *data)
 
MLPIRESULT mlpiParameterReadDefaultUshort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, USHORT *data)
 
MLPIRESULT mlpiParameterReadDefaultLong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LONG *data)
 
MLPIRESULT mlpiParameterReadDefaultUlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULONG *data)
 
MLPIRESULT mlpiParameterReadDefaultLlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LLONG *data)
 
MLPIRESULT mlpiParameterReadDefaultUllong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULLONG *data)
 
MLPIRESULT mlpiParameterReadDefaultFloat (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, FLOAT *data)
 
MLPIRESULT mlpiParameterReadDefaultDouble (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, DOUBLE *data)
 
MLPIRESULT mlpiParameterReadDefaultString (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, WCHAR16 *data, const ULONG numElements, ULONG *numElementsRet)
 

Detailed Description

This function reads the default value of a parameter.

The default value is the initial value of the operation data.

Function Documentation

MLPIRESULT mlpiParameterReadDefaultShort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
SHORT data 
)

This function reads the 16-bit signed default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'A-0-0058' of axis '1'.
2 SHORT data = 0;
3 MLPIRESULT result = mlpiParameterReadDefaultShort(connection, 1, MLPI_SIDN_A(58), &data);
MLPIRESULT mlpiParameterReadDefaultUshort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
USHORT data 
)

This function reads the 16-bit unsigned default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'C-0-0450'.
2 USHORT data = 0;
3 MLPIRESULT result = mlpiParameterReadDefaultUshort(connection, 0, MLPI_SIDN_C(450), &data);
MLPIRESULT mlpiParameterReadDefaultLong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
LONG data 
)

This function reads the 32-bit signed default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'M-0-0200' of touch probe '1'.
2 LONG data = 0;
3 MLPIRESULT result = mlpiParameterReadDefaultLong(connection, 1, MLPI_SIDN_M(200), &data);
MLPIRESULT mlpiParameterReadDefaultUlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
ULONG data 
)

This function reads the 32-bit unsigned default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'C-0-0400'.
2 ULONG data = 0;
3 MLPIRESULT result = mlpiParameterReadDefaultUlong(connection, 0, MLPI_SIDN_C(400), &data);
MLPIRESULT mlpiParameterReadDefaultLlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
LLONG data 
)

This function reads the 64-bit signed default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'M-0-0140' of touch probe '1'.
2 // Note: The return value could be misinterpreted because this parameter has an unsigned data value.
3 LLONG data = 0;
4 MLPIRESULT result = mlpiParameterReadDefaultLlong(connection, 1, MLPI_SIDN_M(140), &data);
MLPIRESULT mlpiParameterReadDefaultUllong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
ULLONG data 
)

This function reads the 64-bit unsigned default value 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'M-0-0140' of touch probe '1'.
2 ULLONG data = 0;
3 MLPIRESULT result = mlpiParameterReadDefaultUllong(connection, 1, MLPI_SIDN_M(140), &data);
MLPIRESULT mlpiParameterReadDefaultFloat ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
FLOAT data 
)

This function reads the 32-bit floating point default value (single precision) 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'A-0-2761' of axis '1'.
2 FLOAT data = 0.0;
3 MLPIRESULT result = mlpiParameterReadDefaultFloat(connection, 1, MLPI_SIDN_C(2761), &data);
MLPIRESULT mlpiParameterReadDefaultDouble ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
DOUBLE data 
)

This function reads the 64-bit floating point default value (double precision) 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]dataPointer to variable where the default value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'A-0-0045' of axis '1'.
2 DOUBLE data = 0.0;
3 MLPIRESULT result = mlpiParameterReadDefaultDouble(connection, 1, MLPI_SIDN_A(45), &data);
MLPIRESULT mlpiParameterReadDefaultString ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
WCHAR16 data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads the default value of a parameter and returns it as string. A conversion is done automatically.

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]dataPointer to variable where the default value will be stored in UTF16 format (string).
[in]numElementsNumber of WCHAR16 elements in 'data' available to read.
[out]numElementsRetNumber of WCHAR16 elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the default value of parameter 'A-0-0045' of axis '1'.
2 WCHAR16 data[512] = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiParameterReadDefaultString(connection, 1, MLPI_SIDN_A(45), data, _countof(data), &numElementsRet);