LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to use a 3 way switch in labview

Solved!
Go to solution
Highlighted

So basically a 3 position switch with the needed properties is not possible if I don't want to use slider or dials because in pictRing it will only work in a sequence which is not the output I need.

0 Kudos
Message 31 of 41
(375 Views)
Highlighted

Hi Neha,

 


@Neha987 wrote:

So basically a 3 position switch with the needed properties is not possible if I don't want to use slider or dials because in pictRing it will only work in a sequence which is not the output I need.


You can also use a PictRing, but you need to place the needed pictures in the needed order. Or you need to switch to the correct picture (using a local variable of the PictRing) as intended…

Like:

IF up THEN
 show image 2
 wait 500ms
 show image 3
ENDIF
IF down THEN
 show image 2
 wait 500ms
 show image 1
ENDIF
Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 32 of 41
(369 Views)
Highlighted

Thanks.

 

Actually I am not able to understand how to do what you have told to do. I am uploading the file could you make the changes or atleast the if else part?

0 Kudos
Message 33 of 41
(346 Views)
Highlighted
0 Kudos
Message 34 of 41
(366 Views)
Highlighted

Please do not post a new topic asking us to reply to your "solved" question six hours after your previous post -- be more patient.

 

Bob Schor

0 Kudos
Message 35 of 41
(309 Views)
Highlighted
Solution
Accepted by topic author Neha987

Something like this?

 

image.png

 

image.png

Three are many other ways to implement that logic too.

Good luck.

0 Kudos
Message 36 of 41
(267 Views)
Highlighted
Solution
Accepted by topic author Neha987

you could exploit the Frontpanels multi-layers to create something like an HTML image map

using several Boolean indicators in a Radio Button Control set to transparent.

 

nasty_3-way-switch.png

0 Kudos
Message 37 of 41
(255 Views)
Highlighted

Could you please upload that file??

0 Kudos
Message 38 of 41
(221 Views)
Highlighted

@Neha987 wrote:

Could you please upload that file??


don't write me private messages, calm down and reproduce it yourself.

you will have to maintenance this piece of code

 

if it is so urgent, get rid of your original idea and do one of the better, possibly more user-friendly alternatives other have suggest to you in this thread.

 

 

here's the snippet for Message 37

nasty_3wayswitch.png

 

as you can see, this  3 way switch will only "work" if the .vi is executed - because I cheated and turned the 3waycontrol in an indicator, which is triggered by a modified radio button control.

 

if you want to use, this snippet, it will "break" the order of frontpanel layers

so I attach the .vi

 

I suppose, you will have to put some more effort into this, before you can use this in a practical application.

0 Kudos
Message 39 of 41
(202 Views)
Highlighted

If you cannot make the code for yourself from the two images that I posted, then perhaps you need to hire someone to do the work for you. I assume since it is so urgent, you would not have time to learn LabVIEW yourself. There are some free tutorials on the home page of the forums that you should investigate.

0 Kudos
Message 40 of 41
(168 Views)