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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending different waveforms out of two separate analog output channels

Solved!
Go to solution

Hello NI Community,

 

I'm trying to send a say 100 Hz signal out of one of the channels on my Measuremnt Computing USB 3101 FS, and say a 300 Hz sinewave out of another channel. I have seen a lot of soultions to this problem, but I must be doing something wrong in my attempt to emulate them. As a result of using a MC product I use the Ulx library instead of DAQmx, but the Vi's are pretty much interchangable functionality wise. In any case, I have managed to send out both signals (see attached VI), but they are always the same in terms of amplitude and frequency. In other words, I get the same signal sent out of both channels as opposed to two different signals of different frequencies.

 

thanks for any suggestions,

Leo

0 Kudos
Message 1 of 4
(3,618 Views)
Solution
Accepted by topic author Lemmenegger

Hi Lemmeneger,

 

 

I replicated what you are trying to do, but using DAQmx since I do not have MC hardware. And had no problem sending two different Analog ouptuts.

 

Could you try to wire the errors?  and let me know if something is showing up! I do not see a problem in what you are trying to perform

 

two_analog_output.png

 

 

signals.JPG

 

Regards,

Carolina 

 

 

0 Kudos
Message 2 of 4
(3,491 Views)

Hi Carolina,

 

Thanks for your response. I tried it and it kinda worked, but when I set the frequency to 16 Hz on the sine generator and the sample rate to 10000 on the clock, I get a signal that is 160 Hz in the real world. I don't really understand the relationship between the rate of the sample clock and the frequency of generation of the sine functions.

 

thanks,

Leo

0 Kudos
Message 3 of 4
(3,456 Views)

Hi Lemmenegger,

 

The frequency of our output waveform will depend on two factors: the update rate, and the number of cycles of our waveform present in the buffer. The formula we can use to calculate the frequency of the output signal is as follows: signal frequency = (cycles) ´ [(update rate)/(points in the buffer)], as you can see in the following image:

 

output waveform frequency.JPG

 

I found this example in the community which shows how to set the # of samples  of the signal, so you can set the correct  frequency of your siganl.

Please take a look at it.

Community: Two Analog Output Waveforms With Different Frequencies and/or Different Waveform Types
https://decibel.ni.com/content/docs/DOC-3457

 

Regards,

Carolina 

 

 

 

0 Kudos
Message 4 of 4
(3,425 Views)