Jofre,
I think I can probably help you, but first need to be sure I understand clearly.
1. You mention "advance counter" commands -- this means you are using traditional NI-DAQ rather than DAQmx, right?
2. Offhand, I can't think of any good reasons why you wouldn't be able to use the 80 MHz timebase. Can you post the portion of configuration code that produces an error when you try? Also, aren't the timebase choices 80 MHz, 20 MHz, and
100 kHz? I don't recall a 1 MHz timebase...
Quick thought: when setting up the timebase, are you choosing the "maximum internal timebase" option? I think that's the one you need...
3. When you need to "know" the time elapsed since a rising edge, what exactly do you mean? While it's possible to use software calls to inspect this time while the pulse is being generated, the accuracy will be limited by the software execution speed and priority. You would need a hw signal and a separately programmed counter task to perform true measurements at resolutions below 100 nanosec.
That being said, I also had an app where I generated a pulse train and then queried the internal count to get an
estimate of "time since last pulse." I used the "Counter Get Attribute" vi and requested the "count" attribute.
As I recall, the driver call to read the count value took about 1-3 microseconds to execute (Pentium 3, 1.2 GHz). However, our pulse train was only 1 kHz and we were running under the LabVIEW Real-Time OS. (Our real-time loop was driven by the 1 kHz pulse train, and the "time within the pulse" estimate helped us characterize our software execution time.)
If you're running under Windows, the operating system may cause many more milliseconds of uncertainty, during which time several pulses will occur. It's not clear to me that you can get a useful software-call measure of "elapsed time within a particular pulse" if you can't be sure which particular pulse you're in the midst of.
Can you describe the function of your "time within a pulse" measurement? How often do you need to make this measurement? What is it used for? Is there a hardware signal to associate with the instants you wish to characterize? If not, could you make one?
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.