Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 2011

Problem with multichannelreader c#

$
0
0

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.


Viewing all articles
Browse latest Browse all 2011

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>