Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I stop and restart counting with DAQ assistent (reset value to 0)?

Hello everyone!

I am using a NI USB-6008 card, I am running Labview 7 and I am looking for a solution for the following problem:

I need to count events within a givin time frame, meaning, I want to run a vi that does something in a loop (changes a voltage, then sends out a pulse) and then after that counts events for a given time t (~20s), saves and displays these counts and begins again.
It is all working well, except for the fact, that I do not manage to stop the counting after t and restart it again when  required. I am using the DAQ assistant. When I edit id using the respective GUI, I can test this function, press stop and start and it begins to count from 0 up again. I assume this also should be possible within the vi. But whatever I try, I can not make it stop and restart again so that it starts counting from zero or at least is counting only within the loop it is supposed to do that in (using the "stop if F" input does not work - tried it with different combinations of the sequence structure and i also could not think about a work around).

Is there anybody who had a similar problem and knows how to make it work?

Many thanks,
Björn
0 Kudos
Message 1 of 2
(3,369 Views)
Hi Bjorn,

The only way to reset the counter is to stop and restart the task. This Knowledge Base article has some example code on how to do this. If you can not open the VI, below is the block diagram for what this VI looks like:



Please look at the Getting Started with DAQmx Series linked below for more details on how the NI-DAQmx functions work.

Hope this helps!

Message Edited by Abhinav T on 07-04-2007 12:58 AM

Abhinav T.
Applications Engineering
National Instruments India

LabVIEW Introduction Course - Six Hours
Getting Started with NI-DAQmx
Measurement Fundamentals
0 Kudos
Message 2 of 2
(3,362 Views)