Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Data structure for multichannel measurement

Solved!
Go to solution
Colleagues,

Is there a good MStudio class for storing a timestamped multichannel reading (4 ch, 1 sample per ch) ?

I know it’s not hard to make my own class for this.  But I’m trying to use the best practices and to avoid reinventing the wheel.  If it were a single channel, I would probably use AnalogWaveform<double>.

Any suggestions references and insight is appreciated!

Cheers,
- Nick
0 Kudos
Message 1 of 5
(4,392 Views)
Solution
Accepted by topic author Nick_Alexeev

Hey Nick,

 

I'd recommend checking out our examples - we use best practices in the creation of all of them.  You can find the DAQmx Analog Input examples for Measurement Studio in the <MeasurementStudioVS2008>\DotNET\Examples\DAQmx\Analog In\Measure Voltage\ folder.

 

I opened the first one that caught my eye - AcqVoltageSamples_IntClk - and it works with multiple channels out of the box.  Simply configure the Physical Channel combobox to read something like "Dev1/ai0:3" to read four channels worth of data at the number of samples per channel configured in the "Samples / Channel" numeric control. 

 

For your reference, this example uses: 

 

private AnalogWaveform<double>[] data;

Derrick S.
Product Manager
NI DIAdem
National Instruments
Message 2 of 5
(4,370 Views)

Hi Derrick,

 

Thanks for your reply - it helped.  The AcqVoltageSamples_IntClk example was more lucid than the the code generated by DAQmx wizard.

 

I have another question.  What's the intended usage of the AnalogWaveformCollection objects?  Was it designed for series waveforms from the same channel or for parallel waveforms from different channels?  Searched the examples, but didn't find it there.

 

- Nick

0 Kudos
Message 3 of 5
(4,343 Views)

AnalogWaveformCollection was designed for parallel waveforms from different channels, but I'm not aware of any limitations that you would encounter using it for parallel waveforms from different channels.

 

AnalogWaveformCollection was created for use with the NI-Scope .NET API; we haven't yet utilized it in the NI-DAQ.NET API.

 

I'm curious about your comment on the code generated by the DAQmx wizard. Our intention is that you be able to use that code directly in your applications. Can you give me an idea of why it doesn't meet your needs?

 

David Rohacek

National Instruments

Message Edited by drohacek on 02-23-2010 10:29 AM
0 Kudos
Message 4 of 5
(4,325 Views)

Dear MR @drohacek.

 

I have a same problem. It mean that, I want to get data from 2 channel, for example, 1 for hammer, 1 for geophone. when I collect the data, collected value of hammer is much more bigger than collected value from geophone. SO, if I show all the data into 1 graph(2channel in 1 grahp). it is imposible to see the geophone graph.

 

Do you have any solution for this.

Thank you very much

0 Kudos
Message 5 of 5
(3,139 Views)