11-22-2017 06:57 AM
Hi all,
I would like to display the number of iterations which have ocurred within an infinetely running loop from the time a button is pressed and held.
In the attached vi, the idicator "Iteration number since bottom pressed" shows almost what I want, except that the count does not start at 0 as I would like to. For that I need to substract the loop number at the moment the button was pressed. How can one get access to this value (loop number at the time the button is pressed) and substract it to the running loop number?
Thank you very much in advance!
Richard
Solved! Go to Solution.
11-22-2017 07:08 AM
Hi richard,
How can one get access to this value (loop number at the time the button is pressed) and substract it to the running loop number?
Two notes:
- to store values in loops and use them in the next iteration you should use shift registers
- when you want to store the iteration count at the time the button was pressed you need to check current button state and compare with previous one ("IF now is TRUE AND was FALSE before THEN…"). Or use thiat BooleanCrossing function…
11-22-2017 07:27 AM
Here's a quick example. (you don't even really need the event structure)
11-22-2017 08:51 AM
Thank you very much, that's exactly what I needed!
Richard
11-22-2017 08:52 AM
Thank you, I appreaciate it!