LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to generate two voltage waveform with different frequecy

Solved!
Go to solution
Hi  I'm using NI-6361 to generate two voltage waveform with different frequecy and different  amplitude.I have used DAQmxCreateAOVoltageChan(.."Dev1/a0:1"....)fuction  and DAQmxWriteAnalogF64()fuction,the program can generate two voltage waveform  with different  amplitude,but the same frequecy. seek help.Looking forword to  your letters. thank you
0 Kudos
Message 1 of 5
(3,254 Views)

Hi,

Could you clarify what you mean by frequency? Are you looking to have different sample clock rate for the two different waveforms or the period of your waveform?

 

You can use the "SineWave" function to generate an array of data.

 

I hope this helps!

 

T. Le
Vision Product Support Engineer
National Instruments
Message 2 of 5
(3,230 Views)

Hi, thuyanhl

Thanks for your reply.NI-6361 has  two analog output  terminals,ao0 and ao1.Now I want to generate  SineWave  with the frequency of  1.2kHz  from  ao0,  and  generate  SineWave  with the frequency of  50Hz  from  ao1.But  beacause of the same  clock, they always  generate the same frequency.

854437442882219588.jpg

Thank  you  for your time  and help,looking forward  to  your letter!

0 Kudos
Message 3 of 5
(3,222 Views)
Solution
Accepted by topic author NickZera

Are you specifying the frequency in your GenSiveWave function? From what I can see in your code, it seems like both both sine waves have the same frequency "1.0/sampsPerCycle".

T. Le
Vision Product Support Engineer
National Instruments
Message 4 of 5
(3,192 Views)

Thank you very much for your reply!

You are right.I have solved the problem last night  by  varying    "1.0/sampsPerCycle". 

Thank you again.

0 Kudos
Message 5 of 5
(3,182 Views)