LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency measurements using NI cRIO 9073 and NI 9425 or NI 9422 modules

Hi everyone!

I'm trying to measure two frequency signals using a cRIO 9073.

I'm already using a NI 9425 module for digital inputs.

I need to measure two (2) frequency signals.

Is it possible to use this module (NI 9425) or NI 9422 for frequency measurements either in Scan Engine or FPGA mode?

 

 

In case it is, if you could point me to any example, it would be appreciated.

 

 

I'll try to be more explanatory:

 

These two frequency signals are in completely different ranges.

The first is a frequency signal from a DC motor tachometer and the second one is from a mass flow meter.

So the frequency ranges vary from KHZ for the tachometer output, to Hz for the MFM output.

The rest of the channels on the module are simple Digital Inputs.

Also, I have the option to use a NI 9422 module if NI 9425 is not appropriate.

 

Thanks in advance,

t81

0 Kudos
Message 1 of 10
(7,274 Views)

t81,

 

It is possible to make frequency measurements with either the 9422 or the 9425 but each will have its own limitations in the range of frequency it will be able to accurately measure.  

A few things to know:  

1. What are the frequency ranges for each sensor (tach and MFM)? More than just knowing Hz/kHz will be helpful.

2. To what accuracy do you need to measure these signals?

 

The 9422 supports a specialty digital configuration counter input that can be configured for frequency measurement (see link)

http://zone.ni.com/reference/en-XX/help/372603F-01/riohelprt/crio-9422_rt/

The specialty mode is only available when using Scan Interface mode, not with FPGA.  

But the max clock rate in the specifications for the 9422 is 4kHz so this may not be sufficient for the tachometer.  I believe this is the max rate at which the module will update its state no matter how fast the underlying software (RT controller) is running.

 

The 9425 has a higher clock rate (~140kHz) but doesn't support the specialty digital mode mentioned above.  It is also a software timed only device but this shouldn't be a problem if you use FPGA.

 

Dan

0 Kudos
Message 2 of 10
(7,254 Views)

Dan thank you very much for the helpful info about the modules.

I'm going to learn more about the frequency ranges for each sensor.

Also I'll try to set the 9425 module in FPGA mode.

 

Thanks again!

0 Kudos
Message 3 of 10
(7,234 Views)
You have to sample at at least twice the signal and preferably even faster than that if you want a more accurate representation. NI recommends you only use the scan engine for sampling up to 1000 Hz so that means if you are taking signal measurements from a signal greater than 500 Hz you will have to use fpga
0 Kudos
Message 4 of 10
(7,229 Views)

Hey For,

 

That is actually not correct. What scan mode does is deploy a VI to the FPGA--and data can only be passed back at 1 kHz. Since the special configuration is a different bitfile which is passing back frequency values which have already been calculated, it can pass back the frequency at 1 kHz. Take a look at the available timebases:

 

forum1.png

 

Unfortunately, the 9425 does not have a specialty digital configuration screen. However, programming frequency measurement on the FPGA should be straightforward (in a single cycle loop, just put in logic that counts while waiting for the digital line to change from low to high--to change the max frequency that can be measured, simply change the clock on the loop or change the size of the counter), and then you can pass frequency data back to a real-time controller.

 

Oh, and I wanted to confirm what Dan said about the 4kHz rate. If you look at the detailed specs in the manual, the max on to off and off to on speed is 250 us.

 

Thanks

Message 5 of 10
(7,200 Views)

Thanks for clarifying

0 Kudos
Message 6 of 10
(7,191 Views)

D Smith, et. al.,

 

Thanks for confirming things here.  One thing you may have missed is that the 9425, as far as I can tell, does not actually support Single Cycle Time Loops.

 

http://zone.ni.com/reference/en-XX/help/370984R-01/criodevicehelp/crio-9425/

 

Not a big deal, you just need to use a timed loop instead.

 

Dan

 

0 Kudos
Message 7 of 10
(7,187 Views)

Hi Dan,

 

i am faced with the same task. Need to measure a frequency signal of maximum35kHz using NI 9425. you meantioned using timed loop instead of single cycle timed loop. But how? in the fpga VI, i dont see any other timed loop other than the single cycle timed loop!! i would really like to know the possibility of a simple timed loop on FPGA VI

 

Thanks

Rajesh

0 Kudos
Message 8 of 10
(7,041 Views)

You can just use a While Loop with approrpiate timing function inside the loop (Wait, etc.,).  The input to the wait function sets the loop rate and will run deterministically on the FPGA.

 

Dan

Message 9 of 10
(7,035 Views)

thanks Dan,that makes sense. 

 

Rajesh

0 Kudos
Message 10 of 10
(7,030 Views)