LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

monitor a switch

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.

Thanks

0 Kudos
Message 1 of 3
(2,348 Views)

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.

0 Kudos
Message 2 of 3
(2,346 Views)

didnt read your question correct.

 

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

0 Kudos
Message 3 of 3
(2,342 Views)