09-19-2018 04:11 PM
Hi!!
I am using the analog output from USB-6002 and I would like to generate a square wave signal at 700-800 Hz from basic generation function, when I use the osciloscope in order to measure the signal, I found wrong signal, (attached the photo). I really need the duty cycle at 50% without these "phantom lines", unfortunaly the maximum cycle that admit the USB-6002 is 5000 samples rate, when I select 800Hz these phantom lines disappear but duty cycles and the frequency are modified if I select for example 4000 samples rate, (I am confused with the time and samples relationship). I would like to know if this problem could have solution. Thanks in advance.
Note:If I test under 500hz the signal does not seem to have problems with the correct sample rate, but I need the correct wave at 700-800Hz.
Regards.
09-19-2018 04:49 PM
You need to make sure your number of samples for a given sampling rate and frequency will give you complete cycles. Otherwise when one waveform is done being generated, and it is regenerated again from the beginning, the last cycle of the previous will be incomplete and it will put a discontinuity in your overall square wave.
09-19-2018 07:38 PM
@RavensFan wrote:
You need to make sure your number of samples for a given sampling rate and frequency will give you complete cycles. Otherwise when one waveform is done being generated, and it is regenerated again from the beginning, the last cycle of the previous will be incomplete and it will put a discontinuity in your overall square wave.
He's already asked about this already.