LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daq Assistant Frequency measurement timing settings

Hi all,

 

I'm a new user to LabView and will soon be attempting to setup a system that measures flow rates. My flow meters are of the rotary piston type, where each pulse corresponds to a volume so frequency corresponds to flow rate. I'll be using an NI 9401 digital module in conjunction with a CDAQ 9174 chassis if it's of any relevance. 

I'm looking at using the daq assistant to assist in acquiring the data, but I'm not 100% certain on what "rate" in the timing settings relates to. The help on measuring digital frequency indicates that the daq assistant automatically sets up the internal timebase according to the minimum and maximum frequencies entered, so I assume that rate is the frequency it will check the input signal for a change in level? Or is this interrupt driven? In the case of the latter, I don't really know what rate corresponds to. 

 

I guess this also makes me unsure of what actually constitutes a "sample to read" as well.

 

Unfortunately, I'm still waiting for some bits and pieces to arrive in the new year so can't experiment much until then, so if someone could shed some light on this in the meantime, it would be greatly appreciated.

 

Thanks.

0 Kudos
Message 1 of 2
(3,174 Views)

The rate input is only used if you are using an external sample clock, and even then it is only used to pick a default buffer size.  You would set it to the rate of your external sample clock.

 

 

In "1 Sample (On Demand)" mode, you make the call to the DAQ Assistant and then the next complete period of your input signal will be measured (the card measures the period of the signal using the internal timebase and then inverts to obtain frequency).

 

In modes which use "Implicit" timing, DAQmx will take a sample at every complete period of your input signal--assuming the "1 Counter (Low Frequency)" measurement method is chosen--and store it into a buffer.  Calling the DAQ Assistant the first time will start the task, then subsequent calls will read back data from this buffer.

 

In modes using an external sample clock, DAQmx will take a sample on every edge of an external sample clock and store it into a buffer.  The caveat is that there must be a sample available, so your sample clock must not be faster than the signal you are trying to measure or the hardware will return an error.  Calling the DAQ Assistant the first time will start the task, then subsequent calls will read back data from this buffer.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 2
(3,148 Views)