01-09-2014 01:52 PM
I'm trying to use counters to measure the duty cycle of a digital input so I looked at the ReadCtrFreqScalar function but I'm have having trouble finding which type of channel needs to be created for that type of read to work. I started with making a CIFreqChan and used ReadCounterScalarF64 to measure that but using the same channel to measure duty cycle is giving an error saying the read function doesn't match the channel type. Can anyone help? I just need to know which channel creation function I should replace the frequency with.
Note: Specifically I'm using NI cDAQ-9178 with the NI-9421 (DSub) module if that helps.
Solved! Go to Solution.
01-09-2014 04:48 PM
DAQmxCreateCIPulseChanFreq
Don't use both reads, only DAQmxReadCtrFreqScalar.
Best Regards,