Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Start 4 counters simultaneously and stop them when a specific one of them reaches a number X

Hi! I'm using a 6602 card with Labview and I'd like to:
1) Start 4 counters simultaneously. The pulses to count are randomly timed.
2) Once counter 1 reaches a certain value that I determined in advance, 2,3 and 4, should stop counting ---and just for checking, 1 as well I guess, though not necessary---.
3) Retrieve the counts.
---I included the last item for completeness and in case you have a comment on reading the data as a 'blocking VI', etc.
I tried solutions with the software, but there seems to be an overhead when I implement a loop to read counter 1 and then a delay in disarming the other counters.
For what I've read in the forum, it seems the best solution woul
d be hardware based, does anyone have a comment on this? I was thinking on counting down in counter 1 from the number I want --- brief comment on implementing this would also be appreciated!--- and using the terminal count pulse from this counter to disable the gate in the other counters... Is this possible???
Thanks in advance!
0 Kudos
Message 1 of 2
(3,031 Views)
Your idea is a good way to go about the problem. I'd use event counting, counting down from the desired number of pulses to zero. Use the "set attribute" vi to configured the output mode of the counter to be pulse. Then use the output of counter 1 as gate for counters 2-4. Use the start trigger (an example of how to use it is viewable in "Generate Pulse Train - Start Trig (NI-TIO).vi") to start all four counters simultaneously. Either read the output state of counter 1 or read the counter value, when it passes zero read the other three counters and stop them. The values you read should be the last value counted before the gate changed states. Hope this helps.
0 Kudos
Message 2 of 2
(3,031 Views)