Hello, I am new to the forum so I am not sure where to post my question, I hope someone can help me.
I am trying to measure a PWM duty cycle using the C functions for DAQmx, but I am having trouble creating a Channel for this purpose. I can successfully read the duty cycle using the MAX task interface.
Does anyone have a code example? I'm guessing there is an issue with the parameters I'm using with DAQmxCreateCIDutyCycleChan, I've been testing with the "counter" and "max/minFreq" parameters, trying several combinations like Dev1/ctr0/PFI1, Dev1/ctr0, Dev1/PFI1 or Dev1/portctr0/line2 for Counter and using Hz or Time for min/maxFreq. Usually I'm getting error codes like 22, 17 or 18.
Thanks in advance.