From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-04-2023 01:53 PM
Dear all
I need to count the times I press the true button for saving data. If I still pressing and the loop time is 1 s it continues counting the true times, but I only need to count once each time I press true button.
I share a small example from my code for better understan.
Please take note my LB is 2013
Best
CPalka
Solved! Go to Solution.
02-04-2023 02:05 PM
02-04-2023 03:40 PM - edited 02-04-2023 03:47 PM
Hi GerdW
Thanks for the help, it´s working now.
Best regards
CPalka
02-04-2023 04:17 PM
All you probably need is set the button to latch action. No extra code needed. (right-click...mechanical action ...)
(Also note that counting should be done with integers (blue), not floating point numbers(orange)).
02-06-2023 04:28 AM
Hi altenbach
I need to save data until releasing the saving button.
Best
CPalka
02-07-2023 10:04 AM
@cpalka wrote:
I need to save data until releasing the saving button.
Well, you never said that. 😄 I assumes that pressing the button would just add one log entry, for example.
You still don't need all these subVIs and complicated code. Here's how I would count how many times the "switch until released" button went from false to true.