Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reset counter with each iteration and how to introduce a delay

Solved!
Go to solution

Hi everyone,

 

First I apologize for the basic level of my questions, I am very new with Labview...

 

 

I am reading counts off of a USB-6008 labview chip using the DAQ assistant and I write the output to a file. The problem is that instead of giving me the number of counts for each iteration it gives me the sum of it all. How do I make the DAQ assistant reset to 0 counts on every iteration? I tried using a shift register but it just adds a counter to my file and nothing else...

 

Thanks a lot

 

 

0 Kudos
Message 1 of 6
(6,978 Views)

Hi Peluche,

 

You can programatically reset to zero by saving what the count was at the last read and subtracting that amount off each time you read. I wrote an example VI that does this. The top shift register is just being used to model the counter. 

 

I hope this helps.

TimC
National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(6,957 Views)

Hi Tim,

 

Thanks so much for your answer. Unfortunately the vi you sent me isnt compatible with my version of labview (2010). Could you make it compatible please?

 

Thanks again!

0 Kudos
Message 3 of 6
(6,952 Views)
Solution
Accepted by Peluche

Sure thing. Sorry about that.

TimC
National Instruments
Applications Engineer
Message 4 of 6
(6,933 Views)

Hi Tim,

 

I would like to thank you again for your code. I tested it then adapted it to my needs and it solved my problem.

 

Thanks again!!

0 Kudos
Message 5 of 6
(6,910 Views)

No problem Peluche.

 

I'm really glad I could help.

 

TimC
National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(6,891 Views)