SetBufferData [Single (two-dimensional array)]


Function

 

Adds floating-point type (System.Single) 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#: float[] ]  [ VB.NET: Single() ]  

Specifies the data to be added to the buffer as a two-dimensional array of System.Single 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 floating-point type (System.Single) data of a two-dimensional array to the buffer.

 

Example

 

Ch.0 data 0.0, 100.0, 200.0
Ch.1 data 100.0, 200.0, 300.0
Ch.2 data 200.0, 300.0, 400.0

Adds the above data.

C#

int       Ret
int       DataSetNum;
float[,]  Data = new float[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(ref DataSetNum, Data);

 

VB.NET

Dim Ret As Integer
Dim DataSetNum As Integer
Dim Data(2, 2) As Single
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)