10-07-2019 12:36 AM
I need to use a 3 way switch. How can I do that?
Solved! Go to Solution.
10-07-2019 12:44 AM - edited 10-07-2019 12:47 AM
Hi Neha,
have you tried to search this forum for a solution? There are several threads about "3-way switches"…
Simple, quick solution: use a pointer slide control set to exactly 3 possible input values!
When you want the appearance of a real "3-way switch" you are into control cusotmization, which is described in the LabVIEW help (or in those threads I recommended to search for)…
10-07-2019 07:25 AM
To be lexically nit-picky: What your talking about here is a '3-position switch'. A "3-way switch" is a switch that's XORed with another (such as when you have 2 light switches controlling the same light fixture (and you can add a device called a '4-way switch' so that 3 light switches control one fixture)).
10-11-2019 12:45 AM
I am attaching a 3 position switch through a slider. But I want the slider to be on middle position always and not down which should be 0 position and 1 I need to be the up position and 2 should be the down position. How can that be done?
10-11-2019 12:54 AM
Hi Neha,
several options:
On your VI:
You can create a 2D boolean array constant, containing all the bits for your 3 indicators. Use the value from your slider to index a row from your array. This way you don't need a big case structure and all settings/code are always visible…
10-11-2019 01:40 AM
Thankyou.
Actually i am a little new to LABVIEW. Could you please make the changes and upload it. I am not quite getting what to do?
10-11-2019 01:51 AM - edited 10-11-2019 01:52 AM
Hi Neha,
@Neha987 wrote:
Actually i am a little new to LABVIEW.
Did you notice this "Training resources" section in the header of the LabVIEW board?
Could you please make the changes and upload it. I am not quite getting what to do?
What exactly don't you get?
Don't you know how to set the value range of your control? (Open it's property dialog!)
Don't you know how to set a default value? (See the context (aka: right-click) menu of the control.)
Don't you know how to use a local variable to set a value of the control? (Notice those training resources!)
Don't you know how to use an array constant and IndexArray? (Notice those training resources!)
10-11-2019 02:04 AM
Actually I know how to set the range but how to make the slider stay by default at middle position which should be 0 and above and down position should be 1 and 2 respectively?
10-11-2019 02:27 AM - edited 10-11-2019 02:28 AM
In the file I am attaching, the switch goes only up when it is clicked. And then it comes to middle position after clicking then it goes down on clicking. How to change it so that it goes down when it is dragged down or clicked down and goes up when dragged up or clicked up??
10-11-2019 03:39 AM - edited 10-11-2019 03:40 AM
I am attaching a 3 position switch here. I need the sitch to go up when dragged up or clicked up and go down when dragged down or clicked down. But it only goes up when the button is clicked. How to do that?