09-01-2016 08:49 PM - edited 09-01-2016 08:53 PM
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.