Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Duty Cycle Measuring with a 6211

I seem to be having a bit of an issue reading a duty cycle from a rotational sensor. The sensor that I am attempting to read from is putting out a 3.5% duty cycle, TTL wave of 0-5, at rest. The sensor can travel to almost 100% duty.

 

When I connect a function generator  (set to 3.5% and 0-5 TTL) to my USB 6211, the vi has no issues and will read the generated wave perfectly. When I connect the sensor to the USB 6211 the vi will read it correctly 80% of the time, but then all of a sudden it will throw out values much higher (i.e. 25% or 60%).

 

My first instinct was to assume that the sensor had an issue so I hooked it up to an O-scope, but it reads perfectly on the O-scope 100% of the time.

 

I have tried many of the example vi's online and in the help section of LV. I have included my VI, hopefully someone can see what I am doing incorrectly.

0 Kudos
Message 1 of 2
(5,344 Views)

Hi CETGirl,

 

Looking at your code, it would appear that the issue is coming from the output of the DAQmx Read.vi. Since you said there is never an issue with the function generator, but there is with the sensor, I would like to know how these are different. I would suggest putting an indicator on the output of the DAQmx Read and compare the results of using the function generator and using the sensor. 

 

Also, what sensor you are using?

Robert R. | Applications Engineer | National Instruments
0 Kudos
Message 2 of 2
(5,321 Views)