LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

finding the zero-crossing of a signal

I´m acquiring to AC signals of 60hz (function generating 1V peak sinus), I want the phase between them and i have two problems:

usb 6009 (conitnuos samples)

samples to read = 200 samples (5 periods)

rate= 2400 Hz

1) when it acquires both signals then the two of them are moving towards and I dont know why, so the phase with the tone measurement is moving all time.

2) every certain time the values spit trash values, example like {-120 -120 -120 240 86 -120 -120 240 -120 -120 ... }

i try to cut the signal with the maximun value index using array palletes and using that index to have one reference without the movement of the signals, but it doesn´t work. here is the code. Any suggestion is welcome , thanks in advance 

0 Kudos
Message 1 of 2
(2,122 Views)

Hi Fran,

 

some comments on your VI:

- the timing of the acquisition loop is determined by the DAQmx operations, no need for an additional wait function!

- there is a wait function missing in the "Queue status" loop…

- I would join DAQ and "Status" loop… (What is this status loop good for, anyway?)

- get rid of all those DDT wires: create a queue of "array of waveforms", replace the DAQAssistent by DAQmx functions (or convert the DDT directly after the DAQAssistent to an array of waveforms)

- use the full waveforms for your phase detection, don't cut them

- you could try some of those "frequency response" functions in the signal analysis palette

 

On your hardware:

The USB6009 uses a MUX as it only provides one ADC for all AI channels. So you need to account the phase shift due to MUX/ADC operation…

Best regards,
GerdW


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