Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with multichannelreader c#

Hi there,

I'm making a program for my thesis. Now I have a problem with multichannelreader in c#. My scope is get data from Hammer (force) and Geophone (velocity), draw those data into 2 graph then get FFT data.

I'm a beginner, i don't know what is the problem with my coding. Could you please to help me to fix it. Here is my code

 

                AIForceUnits unitham = AIForceUnits.Newtons;
                myhamchannel = analogInTask.AIChannels.CreateForceIepeChannel(hammerchannel, "myhamchannel", AITerminalConfiguration.Pseudodifferential, minham, maxham, unitham, senham, AIForceIepeSensorSensitivityUnits.MillivoltsPerNewton, AIExcitationSource.External, 2);
                mygeochannel = analogInTask.AIChannels.CreateVelocityIepeChannel(geophonechannel, "mygeochannel", AITerminalConfiguration.Pseudodifferential, mingeo, maxgeo, AIVelocityUnits.MetersPerSecond, sengeo, AIVelocityIepeSensorSensitivityUnits.MillivoltsPerInchPerSecond, AIExcitationSource.External, 2);
                AnalogMultiChannelReader reader = new AnalogMultiChannelReader(analogInTask.Stream);
                AnalogWaveform<double>[] data = new AnalogWaveform<double>[2];
                data = reader.ReadWaveform(20480);                   //////////////////////////////////////////Problem in here
                waveformGraph1.PlotWaveform(data[0]);
                waveformGraph2.PlotWaveform(data[2]);

 

Thank you in advace.

0 Kudos
Message 1 of 1
(2,779 Views)