LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to deduce on the waveform graph of one and a half of the period?

Solved!
Go to solution

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.

1,5 period.JPG

 

 

 

0 Kudos
Message 1 of 4
(2,502 Views)

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)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,495 Views)

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?

0 Kudos
Message 3 of 4
(2,466 Views)
Solution
Accepted by topic author Rooger

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,441 Views)