Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

how to log multiple ai channels in vb.net

Hi,
first i want to say "thank you" to the NI-Team, because this board is very nice for people like me (some kind of greenhorn)!
I`m working on an applikation for continuously aquire data using the pci-6023e, Measurement Studio, and vb.net (Visual Studio). I grabbed some example code: http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=C60E158A108C26A7E034080020E74861&p_node=174961&p_submitted=N&p_rank=&p_answer=&p_source=External)
and modified it(see attachment). My question is: How does the AnalogMultiChannelReader sort the data in the stream only in a two dimension array. My goal is being able to log up to 8 channels, but now there are only 2 channel to log. When I changed the dimensions of "data" an error occured in the code. I´m not a Vb.net professional, but what did I wrong?
Thank you for your help!
jam74
0 Kudos
Message 1 of 2
(3,189 Views)
When you are using a Multichannel reader, the data is always returned as a 2D array, where the 1st dimension indicates the number of channels, and the 2nd indicates the number of points.
So if you read 2000 points on 4 channels data will be a [4,2000] array.
If you read 1000 points on 8 channels, data will be a [8,1000]array.
Hope that helps..
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
0 Kudos
Message 2 of 2
(3,131 Views)