Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

Sampling rate of pyrometer too low with NI-9207

Dear all,

I am a very new LabVIEW user and currently try to use NI-9207 in a cRIO-9054 to capture a signal coming out of a pyrometer with a current analog input. The pyrometer is supposed to deliver 2000 Samples/s at a maximum.

The VI is attached below (Figure 1). 


I found the sampling rate is not high enough for our purpose as 250S/s (4ms each) sampling is needed for us (Figure 2).

The card was set into high speed mode as shown below in figure 3.


Any help is appreciated.


Thank you.

0 Kudos
Message 1 of 8

There are a couple things that you can check.


Firstly, on the timed loop, it looks like you're running it with a dt of 5 ms, this will give you 200 S/s, instead of the 250 S/s that you want.


Second, check what rate you're running your scan engine at. If it is longer than 4 ms, you won't get new data when you read the I/O variables.


Here is a screenshot of the configuration of the Scan Engine. You can get here by right clicking your controller and selecting Properties. Change the 10 ms to something like 3 or 4 ms. One note is that this will increase your CPU usage on the RIO, but if this is all you're doing, it shouldn't be a huge deal.


Connor W.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8


The first question I would ask myself is if I really need to read a pyrometer at 2kHz - even if the sensor is capable of outputting data at that speed.

Thermal processes are typically slow, but of course you may have an unusual very fast responding process or have a need for such high frequency data depending what the data will be used for. If not then you may be just be measuring noise.

Note the scan engine Connor refers to can't go any faster than 1msec anyway, so 2kHz isn't possible without some more  advanced LabVIEW.

Hope this helps,

Consultant Control Engineer
0 Kudos
Message 3 of 8

Hi Connor,

thanks a lot for your reply.

The scan engine was already set to 1ms but the desired sampling rate of 250S/s still cannot be reached (see attached image).



I have the following questions:

1. Does it in your opinion make sense using the NI-9207 to read a pyrometer or are there other NI options available?

2. Do you think it is possible to achive a higher sampling rate just by code optimisation?

3. Does programming the FPGA directly may help?

0 Kudos
Message 4 of 8

The NI 9207 is a card with built in filtering so your sample rate will be lower than you would get with an unfiltered module like the NI 9203 or NI 9205. If you have a filter that effectively eliminates all frequencies above, say, 500 Hz, then it makes no sense sample at a rate higher than that.  So if you want really high sample rates into the kHz consider another card. Also take into account whether the module is multiplexed or not. A multiplexed card like the NI 9205 has to split its total sampling rate between the number of channels you want to read. So a 200 kSamples/s AGGREGATE sampling module can read 10 channels at 20 kSamples/s  or 2 channel at 100 kSamples/s each for example. Therefore you might consider a simultaneously sampled module if this is important.


The seconds thing you have to contend with is the fact that you are using the SCAN ENGINE API to read data. You are going to be limited to 1 kHZ sample rate in this case -- that's about the fastest the scan engine can run.


If you want higher sampling rate from your card, you have to program on the cRIO's FPGA directly, with requires the LabVIEW FPGA module, the compile tools, etc.


You might consider a cDAQ chassis or even a simple USB DAQ. Why do you need to go so far as using a cRIO-9054 in the first place?  Are building a full fledged headless control system for something?  If not there are probably easier ways to go




0 Kudos
Message 5 of 8

Let me guess, you're sampling two channels? The spec says the 9207 has a max sample rate of 500S/sec. So if you sample two channels that would give you 4ms to sample both.

0 Kudos
Message 6 of 8

Thanks a lot for further suggestions.

We will be satisfied if the sampling rate could been boosted to up to 500Sample/s, while 250S/s would still be suffucient. We don't need kHz input rates but curently the sampling rate is only roughly 40Samples/s.

If this issue is related to the pyrometer working with a too fast sampling rate, we could try and decrease the sampling on the pyrometer to 500Samples/s. Is there a way to adjust the input filtering of this particular card? I couldn't find anything related to this in the NI guides.


Yes, we have other sensors and switches but they are handled by other NI cards. In our case, the NI-9207 will only take care of one sensor (the pyrometer). So we think we are okay with a cRIO system in this case.

We fully noticed that the 500Samples/s is the maximum sampling rate for the NI 9207 and that it will be divided by the total analog inputs. 

0 Kudos
Message 7 of 8

You could tinker around with the scan engine to squeeze out the last factor of 2. You'll want to try and shrink down the sample time as cweek12 suggested and synchronize the timed structure to the NI Scan Engine


You are correct though that if you wanted the maximum performance, you'll want to acquire directly to the FPGA and send the data over using a FIFO. Check out the example here:C:\Program Files (x86)\National Instruments\LabVIEW 20xx\examples\CompactRIO\Module Specific\NI 9207\NI 9207 Getting Started

0 Kudos
Message 8 of 8