03-14-2007 09:17 AM
03-14-2007 10:53 AM
Not at hw to test, but here are some brief thoughts anyway:
1. Error message sounds a little odd to me, almost like it's only looking at 1 input signal rather than 2. Could simply be poor choice of error text though...
2. There's a property called "Duplicate Count Prevention" that is frequently relevant to situations where the signals to be timed are faster than the timebase used to time them. If you search the forums for that term, you'll find more detailed info. The summary is that it can either be enabled or disabled and the behavior when the inputs are too fast are either to produce an error like yours or to return a measurement of 0. (I honestly don't know which setting does which -- it's easy enough to experiment and find out though).
3. The timebase can be chosen explicitly, though DAQmx should indeed have picked the appropriate one for your specified Min / Max. You'd probably want a Min of 0 and a Max that's less than about 50 seconds. My guess: DAQmx *did* pick the appropriate timebase, and the error text suggesting you use a faster one is just generic advice that doesn't actually apply to your case.
4. Two Edge Separation requires you to know which signal will come first. If you don't know which one will come first, you may still be able to accomplish your goal by setting up a "change-detection" DI task and then measuring the period of the change detection pulse signal with a counter. I know this would work on the 5V DIO versions of the M-series, but I'm not so familiar with your particular board.
-Kevin P.