Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp for frequency measurement of DAQ chasis NI9871 and unit NI9421

Hi
I'm using chassis NI 9178 and unit NI 9421 and signalexpress.  And I have a RPM sensor which output digital signal (pulse train), I would like to know the frequency of the signal. I used acquire signals ->DAQmx acquire->Counter Input Frequency measurement to measure the frequency. The problem here is that in the log file, it shows only iterations in X.axis, not absolute timestamp. Is there any way to set it correctly to get the right timestamp ? The reason I want the right timestamp is that I have some analog signals which have right timestamp (the X axis is time), and I would like to compare the analog signals with the frequency in the same time field. If the frequency measurement is not the one which I need, is there any other measurement I can use to get the frequency and log with the X axis of time?
 
Any answer or response is appreciate. Thank you for you time!
Mingyuexin

0 Kudos
Message 1 of 5
(3,045 Views)

I would normally calculate my own timestamps from the variable-timed frequency samples.  You just need a t0 and a set of relative times that you can calculate with a cumulative sum of the periods (a.k.a. 1/freq).  From there, you can do things like interpolation or resampling to *estimate* the frequency at the times of the AI samples you have.

 

Some devices support a special frequency measurement mode that samples at a constant rate.  I *think* your 9178 chassis supports it, but don't know the cDAQ family well enough to say for sure.  The special mode goes by the name "dynamic averaging".

 

I just deleted a bunch of stuff I wrote to describe implementation details for LabVIEW after noticing that you're using Signal Express.  I don't know that product and it's options or constraints.  I suspect there are limitations in what you can do to configure things.

 

Basically you end up with 2 alternatives:

- read frequency as you do now.  In order to align freq and AI data, you'll need to find a way to establish a common t=0 point for your Ctr and AI tasks.  Do the cumulative summation of period to establish timestamps for your frequency measurements.  Interpolate or resample if desired.  (Advanced note: there's a subtle issue awaiting you for this kind of frequency measurement on your device, making it more difficult to establish a common t=0.)

- use "dynamic averaging" to measure your frequencies *IF* your device supports it.  Aligning your data might be straightforward if Signal Express allows you to configure the freq measurement to use the AI sample clock.  

 

 

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 5
(3,033 Views)

Thank you very much Kevin P.

I read the manual of DAQ 9178, it says the device support sample clocked buffered frequency measurement. This is exactly what I want.

In the manual, it also says that it's possible to use AI sample clock as the sample clock for frequency measurement. But I did not find where I can apply AI sample clock in SignalExpress.

When I set SignalExpress step, the advance timing tab is gray (where people can choose internal or external clocks). So the question here is: is this the limitation of SignalExpress, or the Digital module NI9421 does not support the sample clocked frequency measurement?

 

With best wishes

Mingyuexin

 

0 Kudos
Message 3 of 5
(3,013 Views)

I do not expect this would be a limitation of the module.  The chassis is more responsible for how timing signals get routed and shared.

 

As to SignalExpress, I simply don't know because I don't use it.   Anyone else out there?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 5
(3,010 Views)

Thank you again, Kevin!

I think I need to go for Labview.

Here, I have one question about the start of acquiring both the analog signal and frequency measurement. To make them start to acquiring simultaneously, I believe I can use the same HW trigger to trigger all the channels. I checked the device routing of NI9421 in MAX, the HW trigger signal for the counters are not routed to any terminal of NI9421 at all, and I could not change any routing in MAX. I'm wondering if it's possible to set HW trigger for frequency measurement then. Do you know this?

 

Anybody else can answer this? Thank you in advance!

 

Mingyuexin

0 Kudos
Message 5 of 5
(3,000 Views)