LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure help

Im kind of new to labview but im struggling to make a case structure work. 

 

I need 8 different states which are controlled by the selection of a button.  The button selection dictates which port from the DAQ is selected and the case values. Later on i would be looking to hopefully combine all the data from the DAQ together to get a total but this now im happy with just individual. The output value will be then displayed on a display giving the total for the selected port from the DAQ.

 

I was hoping someone would be able to help in advicing me of how to create a case structure as i finding it fairly rough to get around and a bit of help could go a long way. 

 

If any further information is required ill be sure to help with the additional information.

 

 

 

0 Kudos
Message 1 of 5
(2,993 Views)

A "button" only has two states, so it is not clear how you are selecting one of eight cases. Can you explain? Do you have an enum or radiobutton control, for example?

 

You don't "create" a case structure, they are pre-made. You just pick it from the palette and place it on the diagram.

You can add more cases by right-clicking it.

 

Please show us what you have in terms of code so we have a better picture of the problem.

 

If you have problems with the LabVIEW environment in general, I would suggest you first start with a few tutorials and also look at the example finder.

0 Kudos
Message 2 of 5
(2,979 Views)

Sorry that was my fault not being clear, I was hoping to have the button as the "selector" for which case but i was going to have 7 buttons and label them differently for each case. However at one time there can only be 1 button pressed if two or more are pressed then it shouldnt select any case.

 

Ive watched quite a few videos, however the way that it was created in the video wasnt using how i wanted to do it so i was a bit lost on how to create it doing the way that i intend to.

 

The only part i dont understand how to do is put it into the case structure of having different cases. After thats been achieved i believe that it would be straight forward

 

Many thanks

Proposed layout

 

0 Kudos
Message 3 of 5
(2,954 Views)

That clarifies things a bit and explains our confusion.  8 booleans that are mutually exclusive is a bit akward.  Try a radio button (ayyay of mutually exclusive binary states) or an enum control.  Either of these can directly feed the case selector.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(2,950 Views)

Thank you for your help, i shall try it next time im working on it which should be monday and i shall let you know the results.

 

Many thanks

0 Kudos
Message 5 of 5
(2,943 Views)