08-14-2026 08:08 AM
I am trying to read in a handful of analog input measurements along with two counter input measurements. I was able to set up, acquire, and log the analog inputs just fine. However, I keep running into errors when I try to set up my counter inputs. I need a frequency input to change pulses to RPM and GPM, the first from an encoder that sends 60 pulses per revolution and the other from a turbine flow meter that sends a calibrated number of pulses per gallon.
I found an example on the forums for using the analog sample clock and trigger to align the counter inputs with the analog inputs but I can't seem to get it to work. Synchronous Analog and Encoder Inputs I tried initially setting the counter tasks up in NI-MAX but I kept getting errors so I switched to just creating the channel in the VI like in the linked example. I've attached a screenshot of my code below along with a screenshot of the error. It makes it pretty clear I can't use the sample clock but I don't understand why. How else can I align the three input tasks?
Error -200300 occurred at DAQmx Start Task.vi:7220003
Possible reason(s):
Invalid timing type for this channel.
Property: SampTimingType
Requested Value: Sample Clock
Possible Values: Implicit, On Demand
Task Name: _unnamedTask<9>
I'm not looking for anything high speed, I acquire at 10Hz and just do one sample at a time. I just want to make sure the counters align with the analog inputs.
08-16-2026 09:12 PM
Sample clock buffered frequency measurement is only supported on X Series DAQ.
ZYOng_0-1786932523487.png
ZYOng_1-1786932542026.png
08-17-2026 09:47 AM - edited 08-17-2026 10:01 AM
Well, maybe you don't need a frequency measurement, just count edges (without resetting them inbetween) , read them with your sample clock and do the calculations in a consumer loop (if needed). If the uncertainties for the frequencies is too high, you can increase the samplerate and/or use more samples..
my old vi for such a task used a subvi called 'Get Terminal Name with device Prefix.vi' to get the AI-Sampleclock-name to tell the counter sample clock which clock to use, but i can't find it in LV25 , so my old vi is broken ... anyhow, try to configure both tasks with the same sample clock ....
maybe the newer DAQmx driver are smarter ... or a smarter DAQmx user can help 😉
08-17-2026 10:08 AM
Thank you both for the input. I didn't realize that was a limitation of the board I am using. I'll switch to counting edges and do the frequency calculation myself. I already have it set up to all use the same sample clock from the analog input, it just kept throwing an error.
08-18-2026 03:30 AM - edited 08-18-2026 03:31 AM
can't really test it, but you can try to read back the source and rate (using the clock property node)
AI & CI test.png