02-07-2012 01:50 PM
Hello,
I'm using a NI cDAQ-9178 with the NI 9411 DI module. I'm looking to read a (not very clean) ~100kHz square wave
signal and sum the low pulse width (1-3us each) over a 5ms period. The falling transition is relatively clean, but
the rising transition is a bit slow (0.5-1us).
Any advice on how to code this? I've looked at the counter examples for measuring pulse width and semi-periods,
but the values I get with those examples do not match what I measure with an oscilloscope.
Thanks,
Anna Liao
02-08-2012 09:07 PM
Hi Anna
It does not sound like you are receiving any errors, but maybe the suggestion provided in the document I Get Error -10920 When Counting Square Waves without an Adequate Rise Time can help in your application. It sounds like it could explain why your values do not appear correct.
02-09-2012 11:17 AM
Hi Milan,
Thanks for the reply. Actually, I just used the measure semi-period finite with fixed number of samples. I adjusted the number of samples so that I get a total duration of approx. 5 ms. I then just sum the respective arrays for low pulse widths and high pulse widths. The values seem to match what I get from the scope, so I think this is a reasonable way to approximate the measurement I am interested in.
Anna
02-10-2012 08:15 PM
Hi Anna,
I am glad that you found a workaround that helps for your application and shared it with us!
Have a Great Weekend,