Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

EndReadMultiSample as int16

Hello,

 

i start a new program for my campany. And we used a Mesurement program to Input the voltage data as binary "int16" number.

 

In this Form

int16[] newdata = analogInReader.EndReadMultiSample(ar);

 

But i found not a function to get binary data from a analog channel.

Please help me to get binary data from my analog signal and not double data?

 

0 Kudos
Message 1 of 2
(4,088 Views)

Hello Robert,

 

you can just convert the data after the aquistition to a int 16.

Define an int16 array of the same size and convert the data to the new array.

Are you using C# or Visual Basic?

 

here an example code for visual basic:

 

Dim data_int As Int16() = New Int16(10) {}
For i = 0 To data_int.Length - 1
data_int(i) = CInt(data_dbl(i))
Next 

0 Kudos
Message 2 of 2
(4,048 Views)