From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
In a do while loop is it possible to monitor the number of times a switch is toggle off then on ?? switch when pressed is the mechanical action I need this so the used can turn a switch on and leave it on.
From a property node you can disable the switch (property: Disabled), so that the user cannot press it once more. When you want it to be enabled again for user interaction, enable it again using that property node.
Yes, by checking the value for flanks (using XOR or similar, ive also seen a flank VI somewhere, but dont remember right now) you can count it. That would require a shift register holding the (K-1) value of the switch. A simpler method is using a event structure where the switch has an event that is triggered when the user presses the switch. Hope this is of any help