Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT of analog input (NI-5781) using 7961R FlexRIO

Hi everyone,

 

I'm relatively new to LabVIEW FPGA but have worked through many examples. My goal is to do an FFT of an analog input (NI-5781 adapter module) using the Target FPGA 7961R FlexRIO and then display the frequency spectrum on the host PC. 


There is an example FFT Co-Processor under the FlexRIO examples that's very close to what I want. However, instead of writing a simulated waveform to a host-to-target FIFO, I want to get the input signal from my analog port. My approach was to 1) in the host vi, deleted the loop that sends out a simulated waveform 2) in the fpga vi, replace the Host-to-Target FIFO with a I/O Module Analog Input Node.
I gave the modifications a try but keep running into time-out errors -50400.


Any help would be greatly appreciated. Thanks!

 

 

0 Kudos
Message 1 of 9
(6,573 Views)

It doesn't always run into time-out errors. When it doesn't run into the error, I see basically an empty frequency specutrum except for a really strong DC signal (low freq). 

Looking at the FPGA-to-host FIFO, there are always 15360 elements remaining. Is it possible that I'm only reading in a small amount of non-zero data?

 

Thanks.

0 Kudos
Message 2 of 9
(6,568 Views)

I've been trying to recreate this example: 

http://zone.ni.com/devzone/cda/tut/p/id/7088

 

but am running into errors when I try to compile. My FIFO IN and FIFO OUT are configured with Block memory with 1029 requested elements. 

 

Thoughts or ideas? Thanks. 

0 Kudos
Message 3 of 9
(6,532 Views)

Hello,

 

The -50400 error typically means that LabVIEW cannot communicate with your FPGA board. Please see KnowledgeBase 579FLNHL for information on how to resolve this error. The FIFO problem may be related to a bug in LabVIEW FPGA, and can typically be resolved by deleting and recreating the FIFO. Does this resolve the issue? 

Julianne K
Systems Engineer, Embedded Systems
Certified LabVIEW Architect, Certified LabVIEW Embedded Systems Developer
National Instruments
0 Kudos
Message 4 of 9
(6,510 Views)

Are you trying to run it on the FPGA or on your development machine? If its the latter, Ive been told that this error can occur because of unreliable DMA emulation. For me the FFT example runs fine on the FPGA but not on the development machine (I get the same error you get). 

0 Kudos
Message 5 of 9
(6,423 Views)

Hi,

 

I am trying to use the same code with NI5782 and PXIe-7962R. I cannot see anything on the scope for 50MHz sine wave coming in from AI0 of NI 5782 with or without 40MHz clock in the target Vi. Kindly help me with this !

Files are attached here.

0 Kudos
Message 6 of 9
(5,601 Views)

Hi bornembedded,

 

It may be worth creating a new post as this thread is 2 years old.  Creating a new post would increase the visibility of your question.

 

With that said, you should probably use the 200MHz clock of your NI-5782.  Observe the user manual that walks you through this starting on page 11.

 

NI 5782R User Manual and Specifications

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 9
(5,573 Views)

Hi Thanks for your reply.

 

Actually I tried to use 200MHz clk as you suggested. But I get the error which you can see in the attached screenshot. Now what I am trying is to chnage the supported clock for IO module/User Error to 200Mhz clk. After right clicking on the IO module (.... NI5782 Multi-Sample CLIP) -->propoerties-->clock slection I see two clocks 200Mhz and 40Mhz. Clicking on those I believe does not change anything.
How to resolve this issue.

Would be great if you can reply still on this thread because this thread has the whole background to the problem.

 

Thanks and Best Regards

 

0 Kudos
Message 8 of 9
(5,426 Views)

The clock domain that the IO Module\User Error needs to be located in is defined by the CLIP. In this case the CLIP has specified that the only clock name supported by User Error is the "Clock 40 MHz". If you look in the Clock Slections category of the FAM properties you'll see that the Clock Requirement for Clock 40 MHz is between 39MHz and 41MHz. You've likely selected the "40 MHz Onboard Clock" as your Connection since this is present on all FlexRIO boards and satisfies the requirement. See attached image for calrification.

 

Once you've connected a valid clock you now need to place the IO within the specified clock domain. Currently you have the IO Module\User Error placed within the 200 MHz Clock domain. This is not a valid clock domain for that particular IO. See the attached image for how you might move that particular IO into a valid clock domain and transfer its information to another clock domain.

 

 

Download All
0 Kudos
Message 9 of 9
(5,415 Views)