01-10-2018 09:00 AM
Hello,
Thanks in advance. On the graph I need to output a sinusoidal signal. Frequency and amplitude can be set by the generator (FBG). (10kHz and 4v).
What it is necessary to modify that chart showed only one and a half period? The number of points and the frequency can also vary. I think I need to configure the DAQmx Timing (Sample clock), but I don't know how.
Solved! Go to Solution.
01-10-2018 09:16 AM - edited 01-10-2018 09:17 AM
Hi Rooger,
What it is necessary to modify that chart showed only one and a half period?
There is no chart, but a graph…
When your sine signal has a frequency of 10kHz and your sample rate is set to 100kHz you get 10 samples per period. To display 1½ periods you will display just 15 samples.
Why do you read 1000 samples?
You might do some analysis on your signal to determine the frequency. Based on this derived frequency you can calculate the number of samples to display (use ArraySubset to cut the interesting part)…
01-10-2018 10:53 AM
Changing the frequency, I will need to change the sample rate. How do I combine it with the frequency? And where would I use an Array Subset?
01-10-2018 01:39 PM
Hi Rooger,
Which frequency will change? I guess the signal frequency may change as you wrote before…
There's no need to change the sample rate as long as you stay within the Nyquist-Shannon theorem (sample rate >= 2*signal frequency)!
where would I use an Array Subset?
You said you want to display 1½ periods of your signal: as written before you can determine the main signal frequency and can use this value to calculate a number of samples representing 1½ periods. Then use ArraySubset to get this number of samples from your 1000 samples read from DAQmx…