1. 2 steps back and take a deep breath.
2. Ready?
3. While you seem to be familiar with several details of DAQ with NI devices, I think there are also some wrong notions and oversights mixed in that are contributing to your issues.
4. For example -- the ~2 kHz beeping sound is likely due to sine wave discontinuities you cause by not being careful to manage your *phase* correctly. Instead, you always start with a constant 0 phase, regardless of what phase you left off with from the previous chunk of sine wave data. That discontinuity acts like a square-like step function on every update. You end up superimposing a 2 kHz step function on top of your 50 kHz sine wave and you hear the 2 kHz part.
5. It remains unclear what kind of system you're dealing with and what the requirements should be for update rate and latency. I've been in many (many many) threads where someone was trying to do something fairly difficult or impossible, but also *unnecessary* due to an incomplete or erroneous understanding of their system, device capabilities, programming methods, etc.
So please, describe the system you're dealing with, explain why you need a 2 kHz control loop update rate, and define the kind of latency you can tolerate from input to output. (Note: with buffered tasks, you probably *cannot* get your latency into the sub-msec realm. Even 10 msec latency is non-trivial and kinda fragile. Windows is going to be a barrier when you need both update intervals *and* latency to be in the msec realm or less.)
6. In short, you seem to be chasing a system performance that is somewhere between difficult and impossible. A PCIe card can easily produce a non-regenerating 50 kHz output signal, but it needs buffering to accomplish it, and buffering *necessarily* adds to latency.
7. There's a shipping example for continuous non-regenerating AO that will let you change amplitude and frequency on the fly. It manages phase properly. Save a copy of that under a new filename in a folder of your own and use it as a starting point for experimentation.
You'll find that the PCIe device can generate a 50 kHz signal indefinitely while also allowing you to update its freq or amplitude at any time. The hardware, driver, and PCIe bus are definitely sufficient for *this* part of your app's goals.
-Kevin P
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.