uldaq icon indicating copy to clipboard operation
uldaq copied to clipboard

CounterMeasurementType Issue

Open thojDufour opened this issue 2 years ago • 1 comments

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.

thojDufour avatar May 19 '22 11:05 thojDufour

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.

thojDufour avatar May 19 '22 11:05 thojDufour