|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Switch Latching
I want to use a physical switch to act how a boolean control does. Specifically I need the ability to use "latch when released", activating a case structure when the switch goes from True to False. I have no idea where to begin with doing this, but I've opened the digital input, set the channel it runs on, set it under a variable name, and gotten its true-false value. Where do I work from there?
Also, if the answer would be in LabView help, I'm sorry but for some stupid reason the help doesn't load on this computer. I waited 15 minutes for the "Boolean Controls" page to load hoping that might have an answer and it never did. |
|
#2
|
|||
|
|||
|
Re: Switch Latching
I Use a case structure that is asking for the boolean and every time it turns true the value of the boolean is inverted. Now in the picture I have it in teleoperated which causes some problems because you can't instantly press and release the button. So it cycles through true and false very quickly and I recommend some way of knowing the value. Follow the Button Toggle Action example HERE Last edited by j.cole : 04-02-2012 at 13:07. |
|
#3
|
|||
|
|||
|
Re: Switch Latching
I don't think a toggle button will solve my issue. That would save the state until I pressed it again, which is most certainly not what I want.
Pretty much, in waveform description, I want the case structure to activate when the digital wave goes from 1 to 0. I also can't use what that picture shows, since the variable will keep changing every moment the switch is pressed. Last edited by codalafin : 04-02-2012 at 13:32. |
|
#4
|
|||
|
|||
|
Re: Switch Latching
Okay I see what you want now. You want the action to only change when it goes from 1 to 0 and not when it goes from 0 to 1.
|
|
#5
|
|||
|
|||
|
Re: Switch Latching
I've tried multiple possible options, including storing a variable, but I can't figure out a way that works.
|
|
#6
|
|||
|
|||
|
Re: Switch Latching
Okay so I may have found what I need, can't test it at the moment but http://team358.org/files/programming...tonRelease.jpg that node + less than system should work fine. genius design
|
|
#7
|
|||||
|
|||||
|
Re: Switch Latching
Maybe this is solved, but what if you stop checking the condition of the switch after it has activated the first time?
Pseudocode: If SwitchedOn is ON, jump to move_along .Check switch .If switch is 1, set SwitchedOn to ON move_along ...the rest of the code... |
|
#8
|
|||||
|
|||||
|
Re: Switch Latching
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|