05-21-2009 06:53 AM
Hi,
We need to use NI 4461 instead of NI4551 because this is obsolete.
The problem is to understand how to get our desired values using NI 4461.
We were using C++ NIDSA_read_measurement (dsa_session, ipchannel, 0,measurement_length, 2, 0, 1,0, &x0, &dx, measurement);
to calculate frequency and magnitude as shown
below:
objCurrentMagnitude = x0 + i * dx;
objCurrentFrequency = measurement[i] * 1000 ;
In DaqMx we can get voltage value from NI 4461 card by using
myTask.AIChannels.CreateVoltageChannel(...);
reader = new AnalogMultiChannelReader(myTask.Stream);
reader.ReadMultiSample(800);
But the problem is about converting/getting frequency and magnitude values.
How can i get frequency and magnitude values using NI 4461.
Do we need to perform some FFT on this voltage recieved or we need to use some different method to get values.
Can you please share some code for .Net 2.0 for this issue?
Regards,
Nirdesh
05-21-2009
08:13 AM
- last edited on
11-12-2024
12:45 PM
by
Content Cleaner
Consider the NI Measurement Studio Product which has signal processing and instrumentation graphics for .net.
http://zone.ni.com/devzone/cda/tut/p/id/3715#toc5
These include filters and FFT processing
here is a class hierarchy chart
https://www.ni.com/docs/en-US/bundle/373528f/resource/373528f.pdf
Hope this helps
05-22-2009 12:00 AM
Hi Preston,
Thanks for the information.
Can someone please let me know if we can do this frequency and magnitude calculation directly in NI-DAQmx also i.e. without Measurement Studio.
If we plan to go for Measurement Studio then which one is sufficient for this requirement:
- Standard Edition
- Professional
- Enterprise
- Suite
Can some one please share some code example?
Regards,
Nirdesh
05-22-2009 01:58 PM
05-22-2009 02:04 PM
Hi Simran,
My purpose of posting this again was that this question can be more easily understood.
Hence the chances of reply are more.
Can you help me with my further question posted above.
Regards,
Nirdesh
05-26-2009 09:59 AM
Hi,
We have continued to write some code for frequency and magnitude.
Attached is the sample POC with code on timer tick.
NationalInstruments.Analysis.Dsp.Transforms.PowerSpectrum(dataRowCopy); for (int i = 0; i < 800; i++) { freq[i] = dataRow[i]; } ComplexDouble[] FFTValue; FFTValue = Transforms.RealFft(dataRow); magnitudes = ComplexDouble.GetMagnitudes(FFTValue);
Please let us know if this the right approach for our purpose of calculating magnitude and frequency.
Regards,
Nirdesh
05-26-2009
11:54 AM
- last edited on
11-12-2024
12:46 PM
by
Content Cleaner
Hi,
You are correct that you have to use NationalInstruments.Analysis.Dsp for it.
Seems to me that you are doing correctly. But I am not well versed with the programming language you are using, but have a look at this video link
Data Acquisition in C#.NET:http://zone.ni.com/wv/app/doc/p/id/wv-783
On slide 17:analysis they have clearly shown what to use to get FFT.
Also they are getting the magnitudes automatically. I suppose the frequency values can be obtained by the index number of the array.
Hope this helps.
05-27-2009 08:54 AM
Hi cs_BOT,
You said "Also they are getting the magnitudes automatically.".
I could not locate the magnitudes on this slide number 17.
What i understand here is that
double[,] data = e.GetData();
Transforms.PowerSpectrum(SingleChannel);
But magnitude still seems missing.
Please let me know if i am missing something.
Regards,
Nirdesh