Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Generation of two analog signals

Good afternoon! I'm trying to generate two signals on two different Analog Outputs. In this case, only one thing is launched. Tell me how to fix it?


Снимок экрана 2022-07-05 170917.png


I also tried to merge the channels, but in case I have a different Timing I don't know what to do.

Снимок экрана 2022-07-06 113225.png

0 Kudos
Message 1 of 3

The issue is that majority of the cards have only one timing engine, when you have more than 1 analog output to generate, all those channels must be part of same task, you cannot have two tasks in parallel.


The second image looks good if you remove the bottom implementation.


Unfortunately, by your hardware constrain you cannot have more than one AO task running and in turn you cannot have different sampling rate for each of the channels.

Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3

While true that you can't directly set up different AO channels to have different sample rates, as Santhosh already mentioned, I can think of 2 workarounds you might consider (but note that neither one is universally applicable).

   I'll use your posted sample rates of 500 kHz for 2 channels, 1000 Hz for 1 channel to illustrate.


1. In your posted example (pic #2), the data for the 1000 Hz channel comes from a Function Generator function.  In such cases where channel data is being calculated *based on* the sample rate, there's no reason you couldn't just drastically oversample and define your same function at a 500 kHz rate and then put all 3 channels into a single task.

    (Note: the posted pic asks for a 500 Hz sawtooth wave with 1000 Hz sampling rate which isn't a good combo for an analog waveform shape -- as you can clearly see if you send that Function Generator output to a graph.  A common rule of thumb is to aim for 20x oversampling.  So you'd aim for a 10 kHz sample rate to produce a 500 Hz function.  Some apps need more than 20x, others can get by with less, but something like 20x is a decent general starting point.)


2. Another special circumstance is when the fast rate is an integer multiple of the slow rate -- which you happen to have here as well.  And then suppose that the slow channel is a specific sequence of voltage levels (perhaps you read them in from a file?) that you need to generate with the slower timing between changes.

   Well, you can *still* manage this by putting all 3 channels into a common task at 500 kHz.  You would just take your 1000 Hz data and replicate each sample 500 times.  By generating the same value 500 times in a row at 500 kHz, the voltage *changes* only happen at 1000 Hz.



-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 3