03-23-2021 06:54 AM
Hello everyone,
I want to perform FFT on some 4096 samples collected on analog data every cycle.
I have two analog signals one is input for FFT and one for trigger whose voltage vary between 0 to 5 every cycle.
I want to start FFT data when trigger voltage goes above set threshold, collect first 4096 sample and perform FFT. then wait till next trigger for next FFT.
I am not sure how to do it in Labview. I have designed VI which collects data from analog signal and perform FFT in single cycle time loop then pass data from host to target. It is working properly but it is shifting window and performing FFT on entire data.
Now I want to know how to start and stop FFT and perform only on particular data. I am not sure how to execute in Labview
I really appreciate if someone can help me out?
Thanks in advance.
03-24-2021 04:20 AM
Hi Monica,
So I guess Mod6/AI2 is your trigger line and y is the threshold. Mod6/AI0 is the input for the FFT?
Currently your input is only acquired (or at least, transferred) when AI2 > y, so it's not a trigger as much as a gate. If this isn't desired, you need to implement either some sort of counter (probably using a shift register), or a For loop.
I'd suggest something like (pseudo-text-code, one value per loop?):
I'm not sure what the other loops are doing - I guess they're for some other part of the application?
03-30-2021 01:24 AM
Thanks a lot for reply.
I have tried some logic but I am not getting expected results.
I thought I will track data index and wait for FFT data index till expected result and then reset till next cycle.
I am facing some difficulties and I need help to understand some concepts.
1. When I am reading analog samples in FPGA platform, maximum analog value it is showing -3V even I stored data in array in host target and exported in excel but maximum value is -3 but when I am seeing data in waveform it is -7V which is matching my actual input (I checked values @ analog input with scope, it is exactly same as waveform display). Why it is happening? Why I am not getting correct value in indicator and array. I change data type, range, representation, etc. In graph, multiplier is one and no change. I want this value to set trigger.
2. As per my understanding, Data index of FFT should display FFT bin value but it is taking very long time to display value. Every some 5-10 sec, I am able to see some value in FPGA platform. When I am trying to read value through read write control on host target, it is not reading at all. I am able to see FFT results in array( real and img in array on host target as per loop frequency). I am not able to understand, IS FFT working or not? Why data index is not working?
My Data acquisition loop is running @ 50K, FFT loop @40MHZ, FIFO samples kept higher.
FPGA_FIFO is target and FPGA_FIFO _2_comp is host.
I am missing some concept of LabVIEW for sure. If some one can please help me out, it will be really helpful.