LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mux function in labview?

We are working with a LabVIEW VI, and we were wondering if there are any buttons or sub VI's that have multiplexer functionality.  We want to put 4 buttons in our front panel, and when one is pressed, we want to choose the set of actions associated with only that button press.  Any help is appreciated.  Thanks.

Ray
0 Kudos
Message 1 of 10
(17,965 Views)
One really easy way is in the attached picture.  You could create a subvi with your four inputs and a control line and do it that way as well, but this is probably the most simple.




Message Edited by Will.D on 11-30-2006 03:32 PM

0 Kudos
Message 2 of 10
(17,959 Views)
An event structure can be used also. With a separate event case for each button the mux function is handled directly.

Lynn
0 Kudos
Message 3 of 10
(17,952 Views)

Lets not forget about the radio buttons.

They are nice because they handle the mutual exclusivity and are a enum just waiting to be wired to to a case structure.

Ben

BTW: they can be customized to look like any type of boolean you want.

Message Edited by Ben on 11-30-2006 03:00 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(17,949 Views)
I have tried to implement your functionality for a multiplexer, and it does not seem to be detecting button presses for any other button other than the 'Pressure off' one (default case).  Do these buttons need a particular type of behavior?  Any help is appreciated.  I have attached a screenshot as well as the VI.

Download All
0 Kudos
Message 5 of 10
(17,923 Views)
It failing for a few reasons.  The easiest thing to do is create an indicator or probe after the "Boolean Array to Number" function.  You will see that you get values of 0, 2, 4 for each button.  If multiples are pressed you get 3, 5, 6, 7.  So your best bet may be one of the other solutions.
0 Kudos
Message 6 of 10
(17,911 Views)

i am really really new to labview how can i implement the function you have shown in the pic

0 Kudos
Message 7 of 10
(16,502 Views)

Hi zeeshan,

 

you should just recreate those block diagrams...

 

I suggest to go through basic LabVIEW courses offered by NI (here, there are other sources too). The pictures above use just basic functions...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 10
(16,483 Views)

can we use multiplexer automatically in labview?

0 Kudos
Message 9 of 10
(14,372 Views)

This is a rather old post.  And your question isn't very clear as to what you are looking for.

 

Please post a new message in the forums and clearly state what you are looking for.

0 Kudos
Message 10 of 10
(14,354 Views)