LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set accurate sampling rate in FPGA programming.

Hi all,
       I'm using cRIO 9004 and NI 9233 for acquiring high speed analog inputs. Module 9233 specify some data rate values which can be programmed. I want to acquire data without missing a single sample. please comment on this.
0 Kudos
Message 1 of 7
(9,668 Views)
The module can digitize signals on the four channels simultaneously at rates from 2 to 50KHz. Did you try using MAX to setup a task where you can specify your sampling rate? Otherwise there should be VIs that came with the driver that allow you to do the same thing programmatically.
0 Kudos
Message 2 of 7
(9,664 Views)
thaks Bill,
               I'm not able to setup the task in MAX similar to other DAQ devices. There may be some other mean to check but I'm not aware.
0 Kudos
Message 3 of 7
(9,647 Views)

Hi,

The method that I would use would be to have a loop that acquires from the analog inputs and then immediately sends the data to a DMA FIFO on the FPGA side.  Since this loop is on FPGA, you do not need to add a wait to the loop.  The read function from that cRIO analog input module will clock your loop.

Good luck,

Mike

0 Kudos
Message 4 of 7
(9,591 Views)
Couple things to add to what Mike said:

For C Series modules like the NI 9233 when used on the CompactRIO platform, all configuration and programming is done from within LabVIEW.

To configure the data rate at which the 9233 will acquire data, you need to either get into the module's properties page (in LabVIEW) and set it there, or you programmatically do it by using a LV FPGA property node on the module. I suggest you look at the examples that ship with CompactRIO for the 9233.

JMota
0 Kudos
Message 5 of 7
(9,577 Views)
All this I have tried but still I'm missing some samples..I mean If I'm running the acquisition loop for 10 sec at 50 K S/sec then on the host side I'm getting appro 8-9 sec data. I'm using the DMA FIFO.
0 Kudos
Message 6 of 7
(9,446 Views)
Hi vio,

your question refers to the sample rate  not the capture!

Have you suceed in adjusting the sample rate?

Does your apprent discrepance occur for different samples rate! (  Try sampling  for lower periods)

Could be that your buffer is being over written !

Suggest your upload the code or a jpg

Regards
xseadog
0 Kudos
Message 7 of 7
(9,371 Views)