Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Read data value
Collaboration diagram for Read data value:

Functions

MLPIRESULT mlpiParameterReadDataShort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, SHORT *data)
 
MLPIRESULT mlpiParameterReadDataUshort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, USHORT *data)
 
MLPIRESULT mlpiParameterReadDataLong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LONG *data)
 
MLPIRESULT mlpiParameterReadDataUlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULONG *data)
 
MLPIRESULT mlpiParameterReadDataLlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LLONG *data)
 
MLPIRESULT mlpiParameterReadDataUllong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULLONG *data)
 
MLPIRESULT mlpiParameterReadDataFloat (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, FLOAT *data)
 
MLPIRESULT mlpiParameterReadDataDouble (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, DOUBLE *data)
 
MLPIRESULT mlpiParameterReadDataString (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, WCHAR16 *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayVoid (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, void *data, const ULONG dataSize, ULONG *dataSizeRet)
 
MLPIRESULT mlpiParameterReadDataArrayChar (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, CHAR *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayUchar (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, UCHAR *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayShort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, SHORT *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayUshort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, USHORT *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayLong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LONG *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayUlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULONG *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayLlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, LLONG *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayUllong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, ULLONG *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayFloat (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, FLOAT *data, const ULONG numElements, ULONG *numElementsRet)
 
MLPIRESULT mlpiParameterReadDataArrayDouble (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, DOUBLE *data, const ULONG numElements, ULONG *numElementsRet)
 

Detailed Description

This function reads the operation data of a parameter.

The operation data is part of a parameter (Parameter structure, sercos element 7).

Function Documentation

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

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

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

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

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

This function reads the 64-bit signed data 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 value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the data 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 = mlpiParameterReadDataLlong(connection, 1, MLPI_SIDN_M(140), &data);
MLPIRESULT mlpiParameterReadDataUllong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
ULLONG data 
)

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

This function reads the 32-bit floating point data 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 value will be stored.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the data value of parameter 'C-0-0070'.
2 FLOAT data = 0.0;
3 MLPIRESULT result = mlpiParameterReadDataFloat(connection, 0, MLPI_SIDN_C(70), &data);
MLPIRESULT mlpiParameterReadDataDouble ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
DOUBLE data 
)

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

This function reads the value of a parameter and returns it as string. A conversion from other types 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 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 data value of parameter 'C-0-0012'.
2 WCHAR16 data[512] = L"";
3 ULONG numElementsRet = 0;
4 MLPIRESULT result = mlpiParameterReadDataString(connection, 0, MLPI_SIDN_C(12), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayVoid ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
void *  data,
const ULONG  dataSize,
ULONG dataSizeRet 
)

This function reads the data value of a parameter.

Note
This function is not type safe and should only be used when no type is necessary. For example, when reading all parameters in order to make a safe set and restoring them in exactly the same way. It will expect string parameters in UTF-8 format. The size for strings must be given without a trailing \0.
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 value will be stored.
[in]dataSizeSize in bytes available in 'data' for reading.
[out]dataSizeRetSize in bytes in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read the data value of parameter 'A-0-0045' of axis '1'.
2 DOUBLE data = 0.0;
3 ULONG dataSizeRet = 0;
4 MLPIRESULT result = mlpiParameterReadDataArrayVoid(connection, 1, MLPI_SIDN_A(45), &data, sizeof(data), &dataSizeRet);
MLPIRESULT mlpiParameterReadDataArrayChar ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
CHAR data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 8-bit signed data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0081'.
2 CHAR data[512];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayChar(connection, 0, MLPI_SIDN_C(81), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayUchar ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
UCHAR data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 8-bit unsigned data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0081'.
2 UCHAR data[512];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayUchar(connection, 0, MLPI_SIDN_C(81), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayShort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
SHORT data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 16-bit signed data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0625'.
2 SHORT data[4096];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayShort(connection, 0, MLPI_SIDN_C(625), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayUshort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
USHORT data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 16-bit unsigned data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0484'.
2 USHORT data[128];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayUshort(connection, 0, MLPI_SIDN_C(484), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayLong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
LONG data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 32-bit signed data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-2001'.
2 LONG data[1024];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayLong(connection, 0, MLPI_SIDN_C(2001), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayUlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
ULONG data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 32-bit unsigned data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0050'.
2 ULONG data[2];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayUlong(connection, 0, MLPI_SIDN_C(50), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayLlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
LLONG data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 64-bit signed data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0110'.
2 // Note: The return values could be misinterpreted because this parameter has unsigned data values.
3 LLONG data[2048];
4 ULONG numElementsRet = 0;
5 memset(data, 0, sizeof(data));
6 MLPIRESULT result = mlpiParameterReadDataArrayLlong(connection, 0, MLPI_SIDN_C(110), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayUllong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
ULLONG data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 64-bit unsigned data values 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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0110'.
2 ULLONG data[2048];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayUllong(connection, 0, MLPI_SIDN_C(110), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayFloat ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
FLOAT data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 32-bit floating point data values (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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'C-0-0702'.
2 FLOAT data[2];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayFloat(connection, 0, MLPI_SIDN_C(702), data, _countof(data), &numElementsRet);
MLPIRESULT mlpiParameterReadDataArrayDouble ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
DOUBLE data,
const ULONG  numElements,
ULONG numElementsRet 
)

This function reads an array of 64-bit floating point data values (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 value will be stored.
[in]numElementsNumber of elements in 'data' available to read.
[out]numElementsRetNumber of elements in complete 'data'.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Read an array of data values of parameter 'A-0-3027' of axis '1'.
2 DOUBLE data[2048];
3 ULONG numElementsRet = 0;
4 memset(data, 0, sizeof(data));
5 MLPIRESULT result = mlpiParameterReadDataArrayDouble(connection, 0, MLPI_SIDN_C(702), data, _countof(data), &numElementsRet);