01-16-2012 10:45 AM
01-17-2012 08:29 AM
Greetings,
Please see 8-3 of http://www.ni.com/pdf/manuals/371931f.pdf
This shows that you can use the counter to record the current value stored in the counter that is being driven by a clock. This has the upshot of creating an array that has the times of the event. To do this, you need to set the source and gate properly. These can be set first by configuring the counter to Count Edges (see DAQmx Create Channel) and then updating the CI.CountEdges.Term (in the DAQmx Channel Properties) to the channel that has your signal and SampClk.Src (in the DAQmx Timing Properties) to a known clock, such as the onboard SampleClock.
Keep in mind, the specs for the digital ports (which I assume include the counter ports) have a maximum voltage rating of 5.25 volts, so while it probably won't make a difference, you might want to divide down the voltage to be within spec.
Of course, there are other ways to do this. For instance, you could just sample a digital port along with your analog port and then in post processing look for edges, but I feel like this is the cleanest way to do it.
In any event, it seems very possible.
01-17-2012 09:02 AM
Thanks a lot for your answer, I'm going to investigate this.
Cheers,
JB