LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency parameter in Basic Function generator.vi

Hello,
Can somebody explain the situation, please...
I have a DAQ system with 8 input channels. Also I have 1 ouitput channel, sinchronised with inputs, which generates sine wave.
To initial test, all inputs are connected directly to output. Also, output signal is connected to oscilloscope to verify the output.
 
To generate output sine wave I use Basic Function Generator.vi and set the frequency parameter. I expect, that the frequency of input signal is the same (because of direct connection). But it is not so.
 
Using Extract Single Tone Information.vi I check the output frequency and it is the same as I have set. But input frequency is (empirically derived) equal to (frequency*input rate)/1000. (both oscilloscope and detected input frequency show the same).
 
Why input rate has impact on output frequency? (because, I think, it is only for sampling rate, it should not have impact on frequency inself).
 
Thank you in advance.
Anna
0 Kudos
Message 1 of 7
(4,467 Views)
Hi Anna,
 
Could you attach your "Get Terminal Name with Device Prefix" VI so that I could dig into the problem a bit more.
 
Thanks,
 
Jonah Paul
Applications Engineer
National Instruments
Jonah Paul
Marketing Manager, NI Software
0 Kudos
Message 2 of 7
(4,455 Views)

Anna,

I've been looking at your code, and I have a few questions.

First, how are you connecting the output to the input?  Also, what are the input and output frequencies and rates that you have set?

As Jonah mentioned, it would also be great if you attached your subVI.

 

Stephen Meserve
National Instruments
0 Kudos
Message 3 of 7
(4,452 Views)

Hello, Paul,

Thank you for your reply. I attach the requested file (but, truly, I have not known before, that I use it, and I do not know its meaning at all).

Reply to Stephen, too:

The connection is made, using board BNC-2110, 8 wires inputs and 1 wire output are connected to this board, from one side, and to one point, from the other side. Nothing more.

I try to do a test as simple as possible . The input rate and output rate are the same and equal to 40000 (and constant for the simplicity, but its value really is not important, I tried 20000 and the situation is the same). Frequency (as a parameter of generator block) - can be changed. I use 2,5; 5,0; 10,0; 25,0; 50,0; 100. I've results (I change ONLY frequency parameter):

frequency as a set parameter - 2,5;         5,0;       10,0;         25,0;       50,0;    (etc.)

real output frequency -             100Hz;   200Hz;    400Hz;     1kHz;      2kHz;

number of samples/cycle -        400;       200;         100;          40           20

I need to say, that the number of measured samples is constant and equal to 2000 per each channel (but I think, it should not have a meaning, because it has impact of number of cycles, not sample rate)

Thank you in advance.

Anna

0 Kudos
Message 4 of 7
(4,442 Views)

I use LabVIEW 8.0, DAQ board 6052E, drivers MAX 4.1.0.3001, if it is important.

Anna

Message Edited by mikhaylova_anna on 06-12-2007 12:29 PM

0 Kudos
Message 5 of 7
(4,439 Views)
Anna,
 
I think I may have seen the problem in the code.  The sample clock function has an option to "Use Waveform" for the timing data.  On the analog output side, the lower timing clock should be changed to this "Use Waveform" function so that the rate of the clock and the waveform is the same.  Hopefully this will fix things up.
 
Thanks,
Stephen Meserve
National Instruments
Message 6 of 7
(4,430 Views)

I've tried. It works properly. Thank you a lot, really.

(I've got the idea of synchronization from NI example Multi-Function-Synch AI-AO.vi - could you say me, if the example does not have a needed wave connection because only of example simplicity, or there is some principle difference between the example and my task - this question is to avoid the future mistakes)

Thank you again

Anna

0 Kudos
Message 7 of 7
(4,423 Views)