10-13-2013 04:36 AM
Hi guys,
I have a trouble with my mydaq device.
I generate triangle signal which has 50kHz and 0,2V a it comes so disarranged.
I am attaching picture.
Thank you for your help
10-13-2013 08:28 PM
myDAQ has both update rate and sampling rate at 200kHz. It can generate only 4 points per cycle of 50kHz waveform. If you wish to have a reasonable wave form, you should have a sampling rate and update rate 15 times of the frequency. If you wish to refer to Nyquist theorem, that only applies for frequency domain (you can try fft your wave form), but to preserve a waveform shape, it's different story.
10-14-2013 10:53 AM
Hello Majjo,
There are a couple of issues here. The LabVIEW graph that shows your requested waveform linearly connects each point, so it looks like a triangle wave. This is the default interpolation setting for LabVIEW graphs, but it's not actually what the generated waveform looks like. When you send a waveform to the myDAQ (or any AO device), it will update only at each point and doesn't actually (intentionally) interpolate between points. What you get is a blocky waveform due to digitization.
The myDAQ AO has a limited bandwidth and slew rate, so it can't generate a perfectly square edge. The result is somewhat rounded off and actually gives a (slightly) better approximation of a triangle than the nominal square edge.
Your AI task (the Oscilloscope Front Panel) is not synchronized with the AO signal, but it is acquiring at the same 200 kSps as the AO is generated because they share an internal timebase. This means that every time you run the scope, you will get a different four points in the triangle period, but that phase won't drift during the acquisition. If you trigger the scope acquisition on the triangle signal, you should measure the same phase relationship every time.
As KateB indicated, you can request a slower triangle wave and get more points per period, making these effects less significant and improving your triangle representation.
See the attachment for a visualization of this effect.
I hope this helps,
Charles Y.
National Instruments
10-14-2013 11:44 AM
Well, all what I need is to measure amplitude, but the problem is that amplitude is still different 🙂
I use this frequency on bioimpedance analysis on human body. The shape of the signal is not important but, the amplitude is. I can use a other type of signal, but all signals change amplitude all the time.
Where exactly you can see what is mydaq try to output?
10-24-2013 11:47 AM
Hello Majjo,
If you don't sample your triangle wave with enough points per period, you may have a hard time extracting a stable (and accurate) amplitude from the time-domain signal... especially if your sample rate is an integer multiple of your triangle wave frequency. In that case, you'd get no phase drift and the amplitude measurement would be stable, but different each time you run.
I'd recommend slowing your triangle down to < 20 kHz and sample the AI near (but not exactly) 200 kSps. That way, you get about 10 points per period and your phase would drift. Make your acquisition record length long enough that you capture many periods (again, whose phase drifts). You can probably get a stable measurement just by taking the RMS, but another method would be to do a tone extraction and look at the amplitude of the triangle's fundamental frequency. The tone extraction method may work for your ~50 kHz triangle, but only if you drift the phase.
If you have an oscilloscope, you can measure the output of myDAQ between the relevant AO pin and GND. The screenshot I sent before was just a simulation in LabVIEW to demonstrate the concept, not a real measurement.
Please note:
National Instruments Products are commercial off-the-shelf products. NI has not tested its products for use in any health, clinical or medical applications, and NI has not sought any rulings from the FDA or from any governmental agency as to the safety or effectiveness of its Products for any such purposes. You are solely responsible for ensuring your system meets all applicable Quality Systems Regulations of the FDA or other applicable agency, ensuring that all applicable requirements of pre-market notifications are met, and bearing the burden of obtaining all required approvals.
Good luck and let us know if you need anything else.
Charles Y.
National Instruments