uldaq
uldaq copied to clipboard
CounterMeasurementType Issue
When measuring with a USB-1808 DAQ using a CMT_PERIOD
, the daq is not measuring the number of tick between two active edges of the counter, but between one active edge of the counter and one of the gate.
When using CMT_PULSE_WIDTH
, it does what is expected of CMT_PERIOD
.
When using CMT_PERIOD
, and any non default CounterMeasurementMode
option, the function ulCConfigScan()
returns an error.
I was able to solve the issue by changing the uldaq.h.
Apparently the bit shift of 1 for CMT_PERIOD
should be changed to 2, and the bit shift of 2 for CMT_PULSE_WIDTH
should be change to 1.