LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bad or wrong analog output with square wave using USB-6002

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.

 

0 Kudos
Message 1 of 3
(2,710 Views)

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.

0 Kudos
Message 2 of 3
(2,694 Views)

@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.

https://forums.ni.com/t5/LabVIEW/Analog-input-ADC-triggered-by-signal-from-labview-instead-TTL/m-p/3...

 

 

0 Kudos
Message 3 of 3
(2,684 Views)