10-21-2020 02:46 PM
How many dimensions does the ReadSingleSample function have for a AnalogMultiChannelReader have?
I have an analogInTask with 16 channels that I'm trying to read a single sample of all 16 channels into an array. Visual Studio tells me "Number of indices is less than the number of dimensions in the indexed array"
analogInReader = New AnalogMultiChannelReader(analogInTask.Stream)
tcdata() = analogInReader.ReadSingleSample()
What am I doing wrong?
Dave
11-30-2020 12:39 PM
Hello
I would expect one dimention with 16 elements, but to be sure use c# function to know how many rows and colums your array has.
int rows = myArray.GetLength(0);
int columns = myArray.GetLength(1);
12-04-2020 03:18 PM
I need to pass an array with the correct dimensions to the function and I can't figure out the array size to define.