I'm trying to receive PWM signal with NI 9401.
In NI MAX, I can get pulse width with DAQmx task.
However, I cannot get pulse width in the CVI. Below is the code sequence.
DAQmxCreateTask -> DAQmxCreateCIPulseWidthChan -> DAQmxSetChanAttribute ->DAQmxReadCtrTime
Program stops with error message:
NON-FATAL RUN-TIME ERROR: "", line 48, col 5, thread id 16156:
Function DAQmxReadCtrTime: (return value == -200525 [0xfffcf0b3]).
Read cannot be performed because this version of DAQmx Read does not match the type of channels in the task. Use the version of DAQmx Read that corresponds to the channel type.
Requested Data Format: DAQmx_Val_CounterHighAndLowTimes_F64
Supported Data Formats: DAQmx_Val_Analog_F64, DAQmx_Val_Binary_I16, DAQmx_Val_Binary_U16, DAQmx_Val_Binary_I32, DAQmx_Val_Binary_U32
Task Name: DAQTaskInProject1
Status Code: -200525
I suspect that I skipped some configuration or setting. What should I do?