Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered Buffered Period Measurement using NI-DAQmx, LabVIEW, & 6602 card

How do you trigger the 6602 card to capture buffered period measurements using LabVIEW 8.2 & NI-DAQmx 8.3? The start trigger in the trigger property node returns errors.  The arm start trigger property doesn't produce an error; however, the read function times out as if there was never a trigger.  The signal to be measured is applied to the gate of counter 0 (pin 3 on the 6602 board). The source of counter 0 is the internal time base.  The trigger signal is attached to PFI 31 (pin 34 on the 6602 board).  The frequency range of the unknow signal on the gate runs from 1,000 to 10,000 Hz.  This setup worked perfectly using LabVIEW 6i and traditional NI-DAQ 6.9.
0 Kudos
Message 1 of 6
(4,890 Views)

What you describe sounds like it ought to work -- the "Arm Start" trigger IS the correct one to use for counter input measurements.

The only other thought I've got is to note that PFI 31 is a pin that may be used by either DIO or counter I/O -- could it somehow be set up for output by some other task?   

I see also that PFI 31 is the default source input for CTR 2.  Have you tried setting up an edge counting task on CTR 2 to see whether the trigger edge is seen that way?  Are you sure that you aren't missing the trigger due to some timing discrepancy between your program and the external signals?  I usually prototype my triggered operations by wiring up a digital output that I can control manually with a shipping example.

Just a few thoughts...

-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.
Message 2 of 6
(4,886 Views)

Kevin,

You nailed the problem.  The PFI 31 line was set for output, and hence, could not see the trigger.  Thanks so much for the clue to solving my problem, and your quick response to the original posting.

Dan H

0 Kudos
Message 3 of 6
(4,881 Views)
Hi Dan,
i have a similar problem then you had. I want to trigger a period measurement (Counter 0) with a digital TTL signal.
I am using an arm trigger. But it works as if there wouldn't be any trigger.
I connected the triger signal to PFI11. (M-series card 6221)
Do you know what the problem is?
 
Jens
0 Kudos
Message 4 of 6
(4,716 Views)
Hi,
 
As per the previous post, have you tried reading a signal in on PFI-11 without using it as a trigger?
 
Ed W.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(4,693 Views)
Same problem out here. I use three counters: one for trigger; one for gating; and one for main counting. I tried to use trigger counter to excite both gate and main counter. The gate counter provides gate clock for main counter and main counter counts external events.However there seems we have some difficulties about using trigger and gate on the same counter(main counter). If the polymorphic virtual channel VI is set to count edge instance you cannot use both the sample clock and start trigger VIs. The code generates errors. If you use Arm start propery it gives no errrors but the counter never starts to count. I believe both gating and triggering the counter is impossible or is it?

Hardware: NI6602
Software: Labview 8.0; daqmx (not sure about the version)
Configuration: Counter 6==Trigger output; counter 3== gate output;  counter0==main counter;PFI1==trigger input for both gate and main conunter
0 Kudos
Message 6 of 6
(4,385 Views)