10-03-2006 04:22 PM
10-04-2006 10:32 AM
Hi Skim2,
It looks like you're trying to do variable rates on your generation by resetting the sample clock rate within a loop. There are a couple things that might be causing the behavior you are seeing. The most likely is that you are starting and stopping your task within the loop. I think you're probably doing that because you think its necessary for resetting the timing, but thats not the case and is generally not very effective. Starting and stopping a task generally causes delays in generation (and acquisition) so that could be part of what you're seeing. You can reset the sample rate within a loop using DAQmxSetSampClkRate(). You'll want to place starting and stopping as well as configuring and writing outside of the loop.
Hope this helps,
Andrew S.
National Instruments
10-04-2006 03:12 PM
Dear Andrew,
Thanks but, DAQmxSetSampClkRate doesn't seem to be in my library. Any idea why? Also, I don't think the 4461 can switch to a new sample rate while the DAC task is running. Unfortunately, it's a fundamental limitation of the Delta-Sigma converter. Did I post to the wrong forum? Are the DSA cards included under Multifunction DAQ?
Issue still unresolved,
Josh (sorry, I switched usernames on you. I am AKA skim2.)
10-05-2006 04:18 PM - edited 10-05-2006 04:18 PM
Message Edited by stilly32 on 10-05-2006 04:19 PM
Message Edited by stilly32 on 10-05-2006 04:20 PM
10-05-2006 04:34 PM
Dear Andrew,
Floating while the task is stopped is not the problem, and your plot does not show the problem. Your plot shows what I expect to see, and what I do see, but only for a few seconds. After a few seconds, my output changes to high frequency noise with an amplitude of 10 Volts, while the AO task is running. Even if I set my output signal amplitude to be 1 Volt, or 0.1 Volts, it still switches to 10 Volt noise after a few seconds. I am surprised that you are not seeing this.
I need two different sample rates because I need a constant number of waveform cycles in a constant blocksize, with different signal frequencies.
Josh
10-05-2006 05:06 PM
Andrew,
I'm trying to figure out how to show you what I'm seeing on my o'scope. What did you use to make that plot? The same DSA card that generated the signal, or a different one? It would have to be a different card, because the ADC rate always has to be an even multiple of the DAC rate, and your plot doesn't show that the ADC stopped and restarted when the DAC stopped and restarted, right? I don't think I have another NI card to use for an o'scope. Hmm.
Josh
10-05-2006 05:13 PM
Andrew,
I do have another 4461. Were you using another 4461 for your o'scope channel? Because if so, you could send me your program, so I could use it to help demonstrate the problem.
Josh