01-13-2009 12:40 PM
Hi,
I have a PCI-6602 card and use it in LabVIEW 8.2 with DAQmx.
I use an external digital signal as trigger to PFI0 channel (choose pause when low option),
and using ctr0 for the source signal channel.
The problem is: the external trigger signal contains three parts: 1 ms high voltage, 3 ms low votage,
1 ms high voltage, I want to get the counts for first 1 ms duration and the second 1 ms duration, how to do it? Thanks.
01-14-2009 10:16 AM
Hi JackN,
It sounds to me that you simply want to make a pulse width measurement using your counter. This is no problem. If you go into the example finder Help>>Find Examples... The browse to the path Hardware Input and Output>>DAQmx>>Counter Measurements>>Period or Pulse Width and find the example Meas Pulse Width-Buffered Finite.vi. You can simply use this VI which will give you a measurement of the that 1ms pulse width in either seconds or ticks of the source signal. You will want to connect your "trigger" signal (1ms-3ms-1ms) to the gate of the counter you're going to use. Then if you have an external sample clock to make this measurement you'll connect it to the source of the counter, other wise do not connect anything else and use implicit timing on the DAQmx Timing.vi. If you are using an external sample clock to make this pulse width measurement you might also want to check out the VI just below the one I mentioned that also includes ...Sample Clock... in the name.
Using this VI will give you the pulse width of both of the 1ms pulses and if you keep it as a finite acquisition you'll only need to take 2 measurements. So in this case you don't really need to think of the signal as a trigger but as the signal that you're actually measuring. If you're curious about the capabilities of the counters in your 6602 take a look at the M Series User Manual in the Counters section starting on page 107.
http://digital.ni.com/manuals.nsf/websearch/2025C99AB0614F9E8625748000577B9A
Chris W