LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3 way vertical toggle switch

Avon,

I have suggested a good solution over a month ago.

I made now a simple example that shows the idea, I think it works quite well and incorporates your desired functionality:
  • up: on while pressed
  • center: off
  • bottom: on

    The switch is actually two vertically stacked boolean buttons containing custom graphics for the true and false states to give the desired appearance. The upper button is set to switch until released and the lower button is set to switch when pressed. They are grouped for easy handling.

    The diagram contains some logic to achieve the desired result:
  • The output is the logical OR of the two butons.
  • If the upper button is pressed while the lower is on, the lower is turned off via a local variable.
  • The rest just falls in place.

    See for yourself in the attached example (LabVIEW 6.1). Of course the graphics could be improved, I only spent a few minutes on this. 🙂
    Modify as needed.
  • Message 11 of 40
    (8,050 Views)
    It might be useful to combine the two switches into a cluster. Now it is also easy to even make an array of threeway switches as in the attached example (LabVIEW 7.1).

    (Also not that in the previous example above, you can avoid a few unecessary writes to the local variable if the input to the case structure is the logical AND of the two booleans. See attached modification, also LabVIEW 7.1)

    Message Edited by altenbach on 05-21-2005 11:10 AM

    Message 12 of 40
    (8,045 Views)
    Thank you very much Ed. I had a boolean for a two ways control with a case structure (true / false) to execute one or the other position of the control. Now I want to use your "default flat vert slide control" switch. What should I use instead of case structure (true / false) since there is now 3 values for each position of the switch?
    Also what is the difference between the default 3 ways switch and the 25% bigger 3 was switch? Thank you
    0 Kudos
    Message 13 of 40
    (8,006 Views)

    @aurelia wrote:
    since there is now 3 values for each position of the switch?

    Well, there is one value for each of the three positions, for a total of three possible output values. 😉

    The output is an integer that you can wire directly to the selector terminal of a case structure. Now you can create as many cases as you want, e.g. one for each state (don't forget to define one of them as the default case).
    0 Kudos
    Message 14 of 40
    (8,000 Views)
    Thank you. Unfortunatly I do not have Labview 7.1. I have the version 7. What should I do? Thanks.
    0 Kudos
    Message 15 of 40
    (7,999 Views)
    Thabks.
    0 Kudos
    Message 16 of 40
    (7,995 Views)
    Hi unclebump,
    Can i have a pictorial view of the 3 way switch (front panel and the block diaram). Your version is 7.1.1 while mine is 7.0.
    thanks,
    Wale 
    0 Kudos
    Message 17 of 40
    (7,661 Views)
    Sorry, but I only have 7.0 myself.
    0 Kudos
    Message 18 of 40
    (7,649 Views)
    One of my versions posted in this thread is 6.1. Have you tried it?
     
    Message 19 of 40
    (7,646 Views)

    Here's another one based on a slider.

    Florian

    0 Kudos
    Message 20 of 40
    (6,761 Views)