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

Functions

MLPIRESULT mlpiParameterWriteDataShort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const SHORT data)
 
MLPIRESULT mlpiParameterWriteDataUshort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const USHORT data)
 
MLPIRESULT mlpiParameterWriteDataLong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const LONG data)
 
MLPIRESULT mlpiParameterWriteDataUlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const ULONG data)
 
MLPIRESULT mlpiParameterWriteDataLlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const LLONG data)
 
MLPIRESULT mlpiParameterWriteDataUllong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const ULLONG data)
 
MLPIRESULT mlpiParameterWriteDataFloat (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const FLOAT data)
 
MLPIRESULT mlpiParameterWriteDataDouble (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const DOUBLE data)
 
MLPIRESULT mlpiParameterWriteDataString (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const WCHAR16 *data)
 
MLPIRESULT mlpiParameterWriteDataArrayVoid (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const void *data, const ULONG dataSize)
 
MLPIRESULT mlpiParameterWriteDataArrayChar (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const CHAR *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayUchar (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const UCHAR *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayShort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const SHORT *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayUshort (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const USHORT *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayLong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const LONG *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayUlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const ULONG *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayLlong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const LLONG *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayUllong (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const ULLONG *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayFloat (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const FLOAT *data, const ULONG numElements)
 
MLPIRESULT mlpiParameterWriteDataArrayDouble (const MLPIHANDLE connection, const ULLONG address, const ULLONG sidn, const DOUBLE *data, const ULONG numElements)
 

Detailed Description

This function writes the operation data of a parameter.

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

Function Documentation

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

This function writes a given 16-bit signed data value to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '-10' to the parameter 'A-0-0058' of axis '1'.
2 SHORT data = -10;
3 MLPIRESULT result = mlpiParameterWriteDataShort(connection, 1, MLPI_SIDN_A(58), data);
MLPIRESULT mlpiParameterWriteDataUshort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const USHORT  data 
)

This function writes a given 16-bit unsigned data value to 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 access. Use macro MLPI_SIDN_x to get the desired ID.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '2' to the parameter 'C-0-0450'.
2 USHORT data = 2;
3 MLPIRESULT result = mlpiParameterWriteDataUshort(connection, 0, MLPI_SIDN_C(450), data);
MLPIRESULT mlpiParameterWriteDataLong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const LONG  data 
)

This function writes a given 32-bit signed data value to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '100' to the parameter 'M-0-0200' of touch probe '1'.
2 LONG data = 100;
3 MLPIRESULT result = mlpiParameterWriteDataLong(connection, 1, MLPI_SIDN_M(200), data);
MLPIRESULT mlpiParameterWriteDataUlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const ULONG  data 
)

This function writes a given 32-bit unsigned data value to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '4000' to the parameter 'C-0-0400'.
2 ULONG data = 4000;
3 MLPIRESULT result = mlpiParameterWriteDataUlong(connection, 0, MLPI_SIDN_C(400), data);
MLPIRESULT mlpiParameterWriteDataLlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const LLONG  data 
)

This function writes a given 64-bit signed data value to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '42' to the parameter 'M-0-0140' of touch probe '1'.
2 // Note: The function should return an error because this parameter is write protected.
3 LLONG data = 42;
4 MLPIRESULT result = mlpiParameterWriteDataLlong(connection, 1, MLPI_SIDN_M(140), data);
MLPIRESULT mlpiParameterWriteDataUllong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const ULLONG  data 
)

This function writes a given 64-bit unsigned data value to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '0x2A' to the parameter 'M-0-0140' of touch probe '1'.
2 // Note: The function should return an error because this parameter is write protected.
3 LLONG data = 42;
4 MLPIRESULT result = mlpiParameterWriteDataUllong(connection, 1, MLPI_SIDN_M(140), data);
MLPIRESULT mlpiParameterWriteDataFloat ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const FLOAT  data 
)

This function writes a given 32-bit floating point data value (single precision) to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '1.23' to the parameter 'A-0-0036' of axis '1'.
2 FLOAT data = 1.23;
3 MLPIRESULT result = mlpiParameterWriteDataFloat(connection, 1, MLPI_SIDN_A(36), data);
MLPIRESULT mlpiParameterWriteDataDouble ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const DOUBLE  data 
)

This function writes a given 64-bit floating point data value (double precision) to 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.
[in]dataData value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value '1.23456789' to the parameter 'A-0-0046' of axis '1'.
2 DOUBLE data = 1.23456789;
3 MLPIRESULT result = mlpiParameterWriteDataDouble(connection, 1, MLPI_SIDN_A(46), data);
MLPIRESULT mlpiParameterWriteDataString ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const WCHAR16 data 
)

This function writes a given UTF16 string to 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.
[in]dataPointer to variable value to be written to the parameter.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the value 'This is a string' to the parameter 'C-0-0081'.
2 WCHAR16 data[] = L"This is a string";
3 MLPIRESULT result = mlpiParameterWriteDataString(connection, 0, MLPI_SIDN_C(81), data);
MLPIRESULT mlpiParameterWriteDataArrayVoid ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const void *  data,
const ULONG  dataSize 
)

This function writes a given data value to 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 exactly in 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.
[in]dataPointer to variable to be written to the parameter.
[in]dataSizeSize in bytes of 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the data value '1.23456789' to the parameter 'A-0-0045' of axis '1'.
2 DOUBLE data = 180.0;
3 MLPIRESULT result = mlpiParameterWriteDataArrayVoid(connection, 1, MLPI_SIDN_A(45), &data, sizeof(data));
MLPIRESULT mlpiParameterWriteDataArrayChar ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const CHAR data,
const ULONG  numElements 
)

This function writes an array of given 8-bit signed data values to 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.
[in]dataPointer to variable values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-0081'.
2 CHAR data[] = {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5};
3 MLPIRESULT result = mlpiParameterWriteDataArrayChar(connection, 0, MLPI_SIDN_C(81), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayUchar ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const UCHAR data,
const ULONG  numElements 
)

This function writes an array of given 8-bit unsigned data values to 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.
[in]dataPointer to variable values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values ('This is a string') to the parameter 'C-0-0081'.
2 UCHAR data[] = {0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67};
3 MLPIRESULT result = mlpiParameterWriteDataArrayUchar(connection, 0, MLPI_SIDN_C(81), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayShort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const SHORT data,
const ULONG  numElements 
)

This function writes an array of given 16-bit signed data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-0625'.
2 // Note: The function should return an error because this parameter is write protected.
3 SHORT data[] = {0, 0, 0, 0, 0, 0, 0, 0};
4 MLPIRESULT result = mlpiParameterWriteDataArrayShort(connection, 0, MLPI_SIDN_C(625), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayUshort ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const USHORT data,
const ULONG  numElements 
)

This function writes a array of given 16-bit unsigned data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-2484'.
2 USHORT data[] = {1, 1, 1, 1, 1, 1, 1, 1};
3 MLPIRESULT result = mlpiParameterWriteDataArrayUshort(connection, 0, MLPI_SIDN_C(2484), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayLong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const LONG data,
const ULONG  numElements 
)

This function writes an array of given 32-bit signed data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'N-0-0311' of PLS '1'.
2 LONG data[] = {125, 125, 125, 125, 125, 125, 125, 125};
3 MLPIRESULT result = mlpiParameterWriteDataArrayLong(connection, 1, MLPI_SIDN_N(311), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayUlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const ULONG data,
const ULONG  numElements 
)

This function writes an array of given 32-bit unsigned data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-0050'.
2 ULONG data[] = {0x1C984660, 0x01BF5458};
3 MLPIRESULT result = mlpiParameterWriteDataArrayUlong(connection, 0, MLPI_SIDN_C(50), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayLlong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const LLONG data,
const ULONG  numElements 
)

This function writes an array of given 64-bit signed data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-0050'.
2 // Note: The result should be an error because the size of the element (LLONG) isn't valid.
3 LLONG data[] = {0x2A, 0x2A};
4 MLPIRESULT result = mlpiParameterWriteDataArrayLlong(connection, 0, MLPI_SIDN_C(50), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayUllong ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const ULLONG data,
const ULONG  numElements 
)

This function writes an array of given 64-bit unsigned data values to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'C-0-0110'.
2 // Note: The result should be an error because this parameter is write protected.
3 ULLONG data[] = {0x2A, 0x2A};
4 MLPIRESULT result = mlpiParameterWriteDataArrayUllong(connection, 0, MLPI_SIDN_C(110), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayFloat ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const FLOAT data,
const ULONG  numElements 
)

This function writes an array of given 32-bit floating point data values (single precision) to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'N-0-0315' of PLS '1'.
2 FLOAT data[] = {180.0, 210.0};
3 MLPIRESULT result = mlpiParameterWriteDataArrayFloat(connection, 1, MLPI_SIDN_C(110), data, _countof(data));
MLPIRESULT mlpiParameterWriteDataArrayDouble ( const MLPIHANDLE  connection,
const ULLONG  address,
const ULLONG  sidn,
const DOUBLE data,
const ULONG  numElements 
)

This function writes an array of given 64-bit floating point data values (double precision) to 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.
[in]dataPointer to values to be written to the parameter.
[in]numElementsNumber of elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Write the listed values to the parameter 'A-0-3027' of axis '1'.
2 DOUBLE data[] = {100.0, 500.0, 750.0, 900.0};
3 MLPIRESULT result = mlpiParameterWriteDataArrayDouble(connection, 1, MLPI_SIDN_A(3027), data, _countof(data));