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

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
(1,439 Views)

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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 32 of 41
(1,433 Views)

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
(1,410 Views)
0 Kudos
Message 34 of 41
(1,430 Views)

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
(1,373 Views)
Solution
Accepted by Neha987

Something like this?

 

image.png

 

image.png

Three are many other ways to implement that logic too.

Good luck.

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 36 of 41
(1,331 Views)
Solution
Accepted by 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
(1,319 Views)

Could you please upload that file??

0 Kudos
Message 38 of 41
(1,285 Views)

@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
(1,266 Views)

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.

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 40 of 41
(1,232 Views)