Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

Sampling channels at different rates from an analog module

Go to solution


I am completely new to cRIO and I am about to make a purchase but I cannot understand a how the sampling rate is defined for the different modules.

I understand that the sampling rate is generally defined as the total sampling rate of the module unless differently specified. Therefore my questions are


  1. When I am performing data acquisition, is the sampling rate always partitioned between all the channels or only the active ones? (E.g. If I have an 8ch with 800kS/s and using only 4 channels, can I acquire at 200kS/s or still at 100kS/s at most?)
  2. Can I decide the sampling rate for each channel?(E.g. can I acquire 1 channel at 730kS/s and the remaining ones at 10kS/s?)

Thanks very much for your help (and for putting up with my ignorance)!



0 Kudos
Message 1 of 12

Hi there!


The sampling rate for different modules depends on whether you are using Scan Interface or FPGA mode for that module, the kind of module you are using, and how you read from it.


  1. Scan Interface: When using Scan Interface programming mode, you are basically bypassing having to program on the FPGA of the cRIO. In this mode you set a scan period for the Real-time system to scan all channels for all of your modules and get an updated sample. In this mode you are limited to sample rates of 1 kHz or lower.
  2. When using the module in FPGA mode, the sample rate will depend on the kind of module:
  • Some C Series modules use on-demand sampling, meaning that a sample is taken when you read from the module using an IO node. You control the sample rate by controlling the rate of the loop in which you are reading the IO node.
  • Other C Series modules have a data-rate property that you can set in order to specify the sample rate. For these modules, you can place the IO node in a regular while loop with no timing control, and the IO node will restrict the loop rate to the data rate that you set.

As for your question about whether the sample rate is partitioned between all channels or only the active channels, this depends on whether the module is multiplexed or not. The data sheet for the module should indicate if the specified maximum sampling rate is simultaneous (per channel) or scanned (divided between the channels being read). 


Lastly, if your module is on-demand, you can read different channels at different rates by placing the reads in different loops, as long as you aren't trying to read faster than the specifications of your module. If your module has a set data rate, you can read your channels at the higher rate and then throw away samples on the slower channel to get down to the rate you want.


I'd also check this out:

How do I Synchronize Analog Inputs from Multiple C-Series Modules on a CompactRIO?



Message 2 of 12

Hi Jordan,

thank you very much for your reply. From what I understand the multiplexer dictates the timing and how the signals are sampled partitioning the call to each channel with the same interval and sequentially for all of them no matter what. Therefore if I buy a 

NI 9205 16 AI Differential/32 AI Single-Ended, ±200 mV to ±10 V, 16 Bit, 250 kS/s Aggregate

which has 

Conversion time (maximum sampling rate) CompactRIO & CompactDAQ chassis: 4.00 μs (250 kS/s)

I can acquire at most at 7.81 kHz since the sampling rate is not specified per channel, am I right?




0 Kudos
Message 3 of 12
Accepted by mpelleg

Coincidentally, I happen to have a cRIO and 9205 sitting on my desk right now! So I ran a test where I read 1 channel in a loop and I was able to read at the max sampling rate (250 KS/s). Note that in order to achieve this sampling rate, I needed to change the Minimum Time Between Conversions property for the module in my LabVIEW project.


After that, I tried read 2 channels in a loop and achieved sample rates of about 125 kS/s (250/2). 3 channels gave me about 83.3 kS/s (250/3). So it looks like the sample rate gets divided down based on the number of channels that you are actively reading, now the total number of channels available on the module (16 or 32, depending on which input mode you are using).


In these tests, I was reading all the channels in the same IO Node. I'm not sure what the behavior would be if I read these modules in different loops.

Message 4 of 12


thank you so much! You definitely answered my question!




0 Kudos
Message 5 of 12
Accepted by mpelleg

To directly answer your question, no, with a cRIO you don't have to divide down evenly. For example you could sample







And repeat the above loop. If the "on demand" module could sample at 200kSamp/sec then you'd be sampling AI0 at ~100kSamp/sec, AI1,2 at ~50kSamp/sec

0 Kudos
Message 6 of 12

Thank you very much! Actually this solves my problems since I have 10 sensors and I need high frequency only for 2 of them



0 Kudos
Message 7 of 12

That is not possible. I get the following error message while trying to compile.

"An FPGA I/O Node has duplicate terminals. Delete the duplicate terminal from the I/O Node."

0 Kudos
Message 8 of 12

This is likely dependent on which specific module you are using. I can see how some of the higher speed modules might not allow it.

0 Kudos
Message 9 of 12


In your opinion with a Ni 9208 module (500S/s aggregated) can I achieve this results? Sampling channels at different frequency sample in two while loops in FPGA? Example 4 channel at maximum frequency and 12 at a low frequency.



0 Kudos
Message 10 of 12