LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset counter while running VI and continue counting (LabVIEW NXG)

Highlighted

Hi, 

I want my counter to reset when I click the button and continue counting from the initial value (0) right away. Do you have any idea of how this could be done without stopping the task?

0 Kudos
Message 1 of 4
(412 Views)
Highlighted

Hi, can you explain further about what counter are you planning to use?

If what you meant was the Iteration [ i ] Terminal inside a While Loop, then no you can't reset it. You can instead make your own counter. Refer to:

Can I Reset the Iteration Terminal on a While or For Loop?

 

Hope that helps.

0 Kudos
Message 2 of 4
(391 Views)
Highlighted

Thank you for your reply, Gabriel! I meant a detector that works as a counter 🙂 It counts in "counts per second" and sends it to my VI. 

0 Kudos
Message 3 of 4
(355 Views)
Highlighted

The example from that link should still apply for your application then.

Maybe you can make something like this.

 

image.pngReset Counter.png

As how to "read the detector", it should depends on your device.

But if what you mean is how to get data and reset the counter on a "detector with internal counter", then it's an entirely different story.

0 Kudos
Message 4 of 4
(345 Views)