From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I have a Multifunction DAQ Card, and I need to produce a 200 Hz signal. The code I attached is really simple, but I am not getting anywhere near the resolution I need at 200 Hz. I change the dt value, but the frequency does not change whatsoever. Shouldn't it be that if I double dt, the frequency should be half of what it was?? If I want a 200 Hz signal don't I need a minimum dt of 1/200*2 = 0.0025 s?? Help!!
Hi, first of all you don't need to create signals in loops like you did it in your example. You can use signal generation VIs, which will do all the job for you, from Functions->Analyze->Waveform generation or Functions->Analyze->Signal Processing->Signal Generation palettes.
As for your question you need to use dt LESS then 1/(200*2)=2.5 ms. This is very simple. If frequency is 200 Hz then the period of signal is 5 ms. To generate this signal you need at least 2 points corresponding to its maximum and minimum so the minimal value of dt is 2.5 ms. If you want to generate goodlooking sin wave you need more then 10 points on one period.
So if your waveform has N points and corresponds to K periods (N/K > 2) of the wave with frequency F then dt=(K/N)/F.