Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

"DAQmxCreateAOVoltageChan" function generator

Hi,

 

I saw the function "DAQmxCreateAOVoltageChan" and last night I tried to make it work for a sine wave output on ao0. What I don't understand is the setting of the frequency. The NI example doesn't work, because in Europe we don't use the dot as a decimal point. Smiley Sad So I integrated a Val() to convert the text to a value and that helped, but the Freq from the default setting (100 Hz) is not what I see on the Analog Output. There is a factor 100 that I don't find. And if I change buffer size and number of cycles I get different frequency as well. Is the 100 Hz setting something for an internal clock rate or a sample rate or is this the frequency I get on the output?

I want to write a function, where I can set frequency and amplitude (zero to peak oder peak to peak) and eventualy offset and the AO makes it. What relation do I have to set between Buffer size, No of cycles, freqency and so on? Any help wellcome!

 

Thanks in advance!

 

Axel

0 Kudos
Message 1 of 2
(3,317 Views)

Hi Axel,

 

a few questions:

 

Could you post a code example of what you are trying?

In which environment are you programming this?

How are you generating the sine wave?

 

Regards,

Joseph Tagg

0 Kudos
Message 2 of 2
(3,309 Views)