08-16-2017 02:02 PM
I'm trying to create a simple counter when a boolean value is true. If I was writing line code, I would simply say that once SAVE is TRUE, then COUNT = COUNT + 1, else, COUNT = COUNT, and then drop out of the loop.
Attached is the scrren shot of what I have. The problem is the counter keeps counting until the SAVING variable goes off. I just want it to increment by one. I've tried multiple ways of doing this, however, 2 hours later and still no avail.
Solved! Go to Solution.
08-16-2017 02:13 PM - edited 08-16-2017 02:14 PM
I used a while loop to wait for a user response. Otherwise, the loop is not necessary.
08-16-2017 02:14 PM
This gives you the option to reset the counter on the fly and it will reset on the first call.
08-16-2017 02:15 PM - edited 08-16-2017 02:34 PM
@Superdude_123 wrote:
I'm trying to create a simple counter when a boolean value is true. If I was writing line code, I would simply say that once SAVE is TRUE, then COUNT = COUNT + 1, else, COUNT = COUNT, and then drop out of the loop.
Attached is the scrren shot of what I have. The problem is the counter keeps counting until the SAVING variable goes off. I just want it to increment by one. I've tried multiple ways of doing this, however, 2 hours later and still no avail.
I hope this isn't homework.
EDIT: OOPS
08-16-2017 02:28 PM
08-16-2017 02:37 PM - edited 08-16-2017 02:45 PM
@GerdW wrote:
Hi,
LabVIEW Full or Pro (not in Base or Home) comes with a ready-to-use PtByPt-BooleanCrossing function, which makes it easy to count (rising) edges of boolean signals...
![]()
Very Sad Implies