01-09-2025 01:44 PM
I am new to LabVIEW and trying to continuously read two counter input signals from the NI 9401 module with the cDAQ-9174. In my first VI, I'm using the DAQ Assistant to count edges from my hall effect sensor for RPM and total distance measurements. In the second VI, I'm using the DAQ Assistant to read angular position from my quadrature encoder.
I have a couple of questions:
How can I continuously read these counter input signals? When I attempt to do so, I receive an error indicating that a sample clock is needed. I'm unsure how to implement this.
If I combine these two VIs into one, can I use two separate DAQ Assistants to read the signals simultaneously? If not, what would be the best approach?
01-09-2025 08:29 PM
You definitely do not want to use the Dreaded DAQ Assistant (abbreviated DDA) to estimate pulse frequency (or count pulses) in order to get a timed estimate of position and velocity. NI's Counter-Timers are very appropriate hardware to undertake this task, but using this hardware to estimate frequency and/or count edges (estimate position) can get slightly complicated.
NI has a White Paper called "Choosing a Counter Frequency Measurement Method for an NI DAQ Device". Search for it in Google. You should consider what it is you are trying to measure, and how you want to time your measurements (which, in turn, has to do with the frequency content of the signals you are measuring).
My guess (but I'm definitely not an expert on counter-timers and rotation measurements) is you should be able to get timed estimates of position and velocity from a pair of sensors. You should think carefully about the timing you need for your position and velocity signal estimations, based on even-higher samplings from your counter/timers.
Bob Schor