LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger a signal

Hi, i'm developing an oscilloscope and function generator, my function generator can generate signal from 1Hz to 100Khz with Simulate Signal vi, 200000 samples and the other option is set to automatic (20000) now i'm working on the oscilloscope, but when i'm trying to display high signal like 100Khz a sine waveform looks like a tringle waveform. Another problem is the trigger, i can't display well a signal of 1 or 2 Hz it was flickering on the screen. How can i set the trigger to display well a signal from 1Hz to 100Khz? Is it good to use the vi Simulate Signal? Thanks 🙂

0 Kudos
Message 1 of 12
(2,871 Views)
What sort of hardware are you using or is everything simulated? The triangle wave sounds like you don't have a high enough sampling rate. Attach your code.
0 Kudos
Message 2 of 12
(2,866 Views)

Is all simulated no hardware, i've 200 thousand of sampling rate and the other option of sampling rate is set to automatic in the Simulate Signal vi, is it wrong?

0 Kudos
Message 3 of 12
(2,864 Views)
That sampling rate is obviously wrong for a 100 khz signal. Did you ever hear of Nyquist?
0 Kudos
Message 4 of 12
(2,862 Views)

Yes i know the Nyquist-Shannon sampling theorem : Sample_Rate >= 2 x Frequency of the signal, my max signal is 100 Khz so i've a sampling of 200k, is this wrong?

0 Kudos
Message 5 of 12
(2,855 Views)
It is if you want a sine wave to look like a sine wave. That was your complaint. You need a sample rate at least 10 times higher unless you just want frequency information.
0 Kudos
Message 6 of 12
(2,853 Views)

And the sampling rate must be strictly greater than twice the highest frequency.

 

Example: Suppose your signal is a sine wave at exactly 100 kHz and your samplng rate is exactly 200 kHz.  Now also suppose that the first sample taken at time t = 0 occurs at the rising zero crossing of the sine wave.  So Y[0] = 0.00.  The next sample will be taken 5 microseconds later when the signal is at the falling zero crossing.  Y[1] = 0.00. So long as neither the signal nor the sampling frequency drifts, Y[i] = 0.00 for all i.

 

Lynn

0 Kudos
Message 7 of 12
(2,846 Views)

With 10 times greater (1 Milion) i can see the sine wave at 100 Khz, thanks so much 🙂 But why i cant display well a signal of 1 or 3 Hz? The waveform flickering on the screen and don't display all the waveform but only the first half or so.

0 Kudos
Message 8 of 12
(2,831 Views)

You will need to show us your code.  There are too many possiblities for guessing to be productive. Please post your code along with typical data or instruction on how to produce the effect you are seeing.

 

Lynn

0 Kudos
Message 9 of 12
(2,823 Views)

This is the code of the function generator, the false case of the big case is used only to turn off led and things like that. If i generate a signal of 1-3 Hz it flickering on the screen of the oscilloscope and there isn't the complete waveform to display.

Download All
0 Kudos
Message 10 of 12
(2,818 Views)