Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2181

NI-9421 strategy to employ for period measurements in parallel of DAQ

$
0
0

Hi

 

I have a project acquiring data (voltage, pressure and temperature) from a few NI devices (9201, 9213, 9219) which is working fine on its own.

 

I am trying to measure the time between 2 digital pulses using a 9421. The pulses are generated by an NPN proximity/hall effect sensor. I have created various test tasks in my project which I am able to test in the test panel, so I know I am getting those pulses in.

 

So far I have tried using either counters, period and frequency, all of which are working fine in the test panel.

 

The issue I am facing is that my DAQ while loop is already reading the 3 analog input devices (listed above) and I can't find a way not to miss pulses.

 

- for example when using the counter input, and reading a single sample, I have extremely poor resolution due to the fact I am not polling the 9421 often enough. My polling rate is defined by the thermocouple input which I can't poll faster than 10 Hz. Which means on very slow rotations of the flywheel I may get 1 pulses between 2 polls. Using counter could actually work well enough if I could significantly increase the number of pulses per revolution which is not something I can easily do with the current setup.

 

- frequency or period would seem like the ideal way forward however, I can't find the right way to set this up. If I am reading the 9421 for a single sample I may not get any data if the flywheel is spinning slow.

 

I think the right way to do this would be run "continuously" but there again I haven't been able to do this.

 

Is there a good strategy to do this? I started thinking maybe I should try to run 2 while loops fully independent?

 

oh and I am running Labview/DAQmx.

 

that's what my last block diagram trying to read single samples of the period looked like:

swiftmoun_0-1702945869024.png

 

 

if you guys know of a good labview example please let me know. Everything that I found are basic examples which are fine if my VI only reads periods/frequencies or counts.

 


Viewing all articles
Browse latest Browse all 2181

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>