SetBufferData [Int32 (two-dimensional array)]


Function

 

Adds integer value (System.Int32) data of a two-dimensional array to the buffer.

 

Format

 

Ret = dncDataSet1.SetBufferData(DataSetNum, Data)

 

Parameters

 

DataSetNum [ C#: ref int ]  [ VB.NET: Integer ]  

Specifies the number of datasets to set.

 

Data [ C#: int[] ]  [ VB.NET: Integer() ]  

Specifies the data to be added to the buffer as a two-dimensional array of System.Int32 type.

Allocate element 1 for the number of data sets you want to acquire, and allocate element 2 for each data set.
 

Return value

 

Ret [ C#: int ] [ VB.NET: Integer ]

 

Value

Description

0

Normality completion

510001

The input parameter is invalid. Check the parameter contents.

Other errors (see: Error code details)

 

Remarks

 

Adds integer value (System.Int32) data of a two-dimensional array to the buffer.

 

Example

Ch.0 data 0, 100, 200
Ch.1 data 100, 200, 300
Ch.2 data 200, 300, 400

Adds the above data.

C#

int     Ret
int     DataSetNum;
int[,]  Data = new int[3, 3];
short   ch_no, data_no;

DataSetNum = 3;

for(data_no = 0; data_no < 3; data_no++){
 for(ch_no = 0; ch_no < 3; ch_no++){
     Data[data_no, ch_no] = (ch_no + data_no) * 100;
 }
}

Ret = dncDataSet1.SetBufferData(out DataSetNum, Data);

 

VB.NET

Dim Ret As Integer
Dim DataSetNum As Integer
Dim Data(2, 2) As Integer
Dim ch_no As Short
Dim data_no As Short

DataSetNum = 3

For data_no = 0 To 2
 For ch_no = 0 To 2
     Data(data_no, ch_no) = (ch_no + data_no) * 100
 Next ch_no
Next data_no

Ret = dncDataSet1.SetBufferData(DataSetNum, Data)