Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4LabVIEW)  1.26.2
Write variable using symbols
Collaboration diagram for Write variable using symbols:

Functions

MLPIRESULT mlpiLogicWriteVariableBySymbolBool8 (const MLPIHANDLE connection, const WCHAR16 *symbol, const BOOL8 data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolChar (const MLPIHANDLE connection, const WCHAR16 *symbol, const CHAR data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolUchar (const MLPIHANDLE connection, const WCHAR16 *symbol, const UCHAR data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolShort (const MLPIHANDLE connection, const WCHAR16 *symbol, const SHORT data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolUshort (const MLPIHANDLE connection, const WCHAR16 *symbol, const USHORT data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolLong (const MLPIHANDLE connection, const WCHAR16 *symbol, const LONG data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolUlong (const MLPIHANDLE connection, const WCHAR16 *symbol, const ULONG data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolLlong (const MLPIHANDLE connection, const WCHAR16 *symbol, const LLONG data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolUllong (const MLPIHANDLE connection, const WCHAR16 *symbol, const ULLONG data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolFloat (const MLPIHANDLE connection, const WCHAR16 *symbol, const FLOAT data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolDouble (const MLPIHANDLE connection, const WCHAR16 *symbol, const DOUBLE data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolString (const MLPIHANDLE connection, const WCHAR16 *symbol, const WCHAR16 *data)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayBool8 (const MLPIHANDLE connection, const WCHAR16 *symbol, const BOOL8 *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayChar (const MLPIHANDLE connection, const WCHAR16 *symbol, const CHAR *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUchar (const MLPIHANDLE connection, const WCHAR16 *symbol, const UCHAR *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayShort (const MLPIHANDLE connection, const WCHAR16 *symbol, const SHORT *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUshort (const MLPIHANDLE connection, const WCHAR16 *symbol, const USHORT *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayLong (const MLPIHANDLE connection, const WCHAR16 *symbol, const LONG *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUlong (const MLPIHANDLE connection, const WCHAR16 *symbol, const ULONG *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayLlong (const MLPIHANDLE connection, const WCHAR16 *symbol, const LLONG *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUllong (const MLPIHANDLE connection, const WCHAR16 *symbol, const ULLONG *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayFloat (const MLPIHANDLE connection, const WCHAR16 *symbol, const FLOAT *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayDouble (const MLPIHANDLE connection, const WCHAR16 *symbol, const DOUBLE *data, const ULONG numElements)
 
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayVoid (const MLPIHANDLE connection, const WCHAR16 *symbol, const void *data, const ULONG dataSize)
 

Detailed Description

The following functions provide symbolic write access to logic variables.

Attention
The addresses of the variables of the symbolic access might change on every download, reset origin or online change of the PLC application, so you have to stop each variable access before you load or change the PLC application!

The table shows the PLC data types within the IEC61131 environment 'IndraLogic' and the corresponding data types within the C/C++ environment (e.g. 'Workbench OEM') of the MLPI. On writing variables by symbols, on default, you use the functions below named after the MLPI data type like mlpiLogicWriteVariableBySymbolUchar. If you include the header mlpiLogicHelper.h, you can also use the equivalent functions named after the IEC61131 data types like mlpiLogicWriteVariableBySymbolByte or like mlpiLogicWriteVariableBySymbolUsint.

Number of Bits Data types of PLC Data types of MLPI
8 BOOL BOOL8
8 SINT CHAR
16 INT SHORT
32 DINT LONG
64 LINT LLONG
8 USINT UCHAR
16 UINT USHORT
32 UDINT ULONG
64 ULINT ULLONG
8 BYTE UCHAR
16 WORD USHORT
32 DWORD ULONG
64 LWORD ULLONG
32 REAL FLOAT
64 LREAL DOUBLE
8n STRING WCHAR16
16n WSTRING WCHAR16

Function Documentation

MLPIRESULT mlpiLogicWriteVariableBySymbolBool8 ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const BOOL8  data 
)

This function writes a given Boolean value (BOOL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value 'TRUE' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 BOOL8 data = TRUE;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolBool8(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolChar ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const CHAR  data 
)

This function writes a given 8-bit signed value (SINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '42' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 CHAR data = 42;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolChar(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolUchar ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const UCHAR  data 
)

This function writes a given 8-bit unsigned value (BYTE, USINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '0x2A' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 UCHAR data = 0x2A;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolUchar(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolShort ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const SHORT  data 
)

This function writes a given 16-bit signed value (INT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '42' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 SHORT data = 42;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolShort(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolUshort ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const USHORT  data 
)

This function writes a given 16-bit unsigned value (WORD, UINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '0x2A' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 USHORT data = 0x2A;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolUshort(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolLong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const LONG  data 
)

This function writes a given 32-bit signed value (DINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '42' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 LONG data = 42;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolLong(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolUlong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const ULONG  data 
)

This function writes a given 32-bit unsigned value (DWORD, UDINT, TIME, DATE, DATE_AND_TIME, ..., MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '0x2A' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 ULONG data = 0x2A;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolUlong(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolLlong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const LLONG  data 
)

This function writes a given 64-bit signed value (LINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '42' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 LLONG data = 42;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolLlong(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolUllong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const ULLONG  data 
)

This function writes a given 64-bit unsigned value (LWORD, ULINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '0x2A' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 ULLONG data = 0x2A;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolUllong(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolFloat ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const FLOAT  data 
)

This function writes a given 32-bit floating point value (single precision, REAL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '1.23' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 FLOAT data = 1.23;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolFloat(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolDouble ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const DOUBLE  data 
)

This function writes a given 64-bit floating point value (double precision, LREAL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataVariable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value '1.23456' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 DOUBLE data = 1.23456;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolDouble(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolString ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const WCHAR16 data 
)

This function writes a given character string value (STRING, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the value that should be written.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the value 'This is a string' to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 WCHAR16 data[]=L"This is a string";
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolString(connection, L"Application.PlcProg.x1", data);
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayBool8 ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const BOOL8 data,
const ULONG  numElements 
)

This function writes an array of Boolean values (BOOL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of BOOL8 elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 BOOL8 data[] = {TRUE, FALSE};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayBool8(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayChar ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const CHAR data,
const ULONG  numElements 
)

This function writes an array of 8-bit signed values (SINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of CHAR elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 CHAR data[] = {-1, 2};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayChar(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUchar ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const UCHAR data,
const ULONG  numElements 
)

This function writes an array of 8-bit unsigned values (BYTE, USINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of UCHAR elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 UCHAR data[] = {1, 85};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayUchar(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayShort ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const SHORT data,
const ULONG  numElements 
)

This function writes an array of 16-bit signed values (INT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of SHORT elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 SHORT data[] = {-18, 65};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayShort(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUshort ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const USHORT data,
const ULONG  numElements 
)

This function writes an array of 16-bit unsigned values (WORD, UINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of USHORT elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 USHORT data[] = {18, 33};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayUshort(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayLong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const LONG data,
const ULONG  numElements 
)

This function writes an array of 32-bit signed values (DINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of LONG elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 LONG data[] = {-42, 99};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayLong(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUlong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const ULONG data,
const ULONG  numElements 
)

This function writes an array of 32-bit unsigned values (DWORD, UDINT, TIME, DATE, DATE_AND_TIME, ..., MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of ULONG elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 ULONG data[] = {42, 55};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayUlong(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayLlong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const LLONG data,
const ULONG  numElements 
)

This function writes an array of 64-bit signed values (LINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of LLONG elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 LLONG data[] = {-13, 44};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayLlong(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayUllong ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const ULLONG data,
const ULONG  numElements 
)

This function writes an array of 64-bit unsigned values (LWORD, ULINT, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values should be written.
[in]numElementsNumber of ULLONG elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 ULLONG data[] = {13, 77};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayUllong(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayFloat ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const FLOAT data,
const ULONG  numElements 
)

This function writes an array of 32-bit floating point values (single precision, REAL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of FLOAT elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 FLOAT data[] = {1.234, 9.907};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayFloat(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayDouble ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const DOUBLE data,
const ULONG  numElements 
)

This function writes an array of 64-bit floating point values (double precision, LREAL, MlpiLogicType) to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]numElementsNumber of DOUBLE elements in 'data' available to write.
Returns
Return value indicating success (>=0) or error (<0).
Example:
1 // Writing the values to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 DOUBLE data[] = {1.23456789, 9.87654321};
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayDouble(connection, L"Application.PlcProg.x1", data, _countof(data));
MLPIRESULT mlpiLogicWriteVariableBySymbolArrayVoid ( const MLPIHANDLE  connection,
const WCHAR16 symbol,
const void *  data,
const ULONG  dataSize 
)

This function writes user-defined data type values to a variable by symbolic access.

Parameters
[in]connectionHandle for multiple connections.
[in]symbolSymbol variable of PLC application.
[in]dataPointer to variable which contains the values that should be written.
[in]dataSizeNumber of bytes in data available to read.
Returns
Return value indicating success (>=0) or error (<0).
Note
It's highly recommended to use MLPI IEC data types (like MLPI_IEC_LREAL, MLPI_IEC_USINT, ... see mlpiGlobal.h) for an user defined structure.
Example:
1 // Writing the value to the variable 'x1' in the program 'PlcProg' in an application called 'Application'.
2 DUT data;
3 MLPIRESULT result = mlpiLogicWriteVariableBySymbolArrayVoid(connection, L"Application.PlcProg.x1", &data, sizeof(data));