From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling frequency of an FPGA

Hello,
My FPGA operates at a 40MHz clock, I wish to acquire an analog sensor, I want to know if I do not use timing to set the sampling frequency just a while loop in which I connect the tail module NI concerned to a digital indicator, would I have 40MHz as sampling rate ?? if not how could I know  the default sampling rate of the FPGA ??
thank you in advance
cordially

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

The rate at which you read analog input data is going to be dependent on the device that you are using.  Most analog input devices will spec the maximum sampling rate so if you can tell us what hardware you are using we can tell you how fast you would be able to sample.

 

The reason you are likely not giong to be able to sample at 40MHz is that the acquisition speed is limited by the analog to digital conversion.

Matt J | National Instruments | CLA
0 Kudos
Message 2 of 3
(2,850 Views)

"analog sensor" tells us pretty much nothing.  Do you have a very expensive analog sensor?  If not, odds are it can't keep up with 40 MHz.  If not, why are you worried about the maximum sampling rate of the FPGA?

 

If you want to know how long your code is taking to run, take a look at using ticks counts before and after your code to see how many ticks are being used to run your code.  That will tell you how long your code is taking to run.  That will help you figure out the rate you're sampling. 

 

Worrying about "default" sampling rate is relatively meaningless.  It's not what you're working with.  Odds are, it's faster than you can keep up with for an analog task.  It's similar to worrying about whether or not it's raining in Antarctica while you're coding.  But, the default sample rate is 40 MHz. 

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