LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Case Structure

Solved!
Go to solution

Hello.

I have a labview project i am working on but i cant figure this pary out. Its not that i dont know how to do it, its just i dont know in which way i should do it.

 

I have 1 input and 5 outputs. Each output can be turned off and on. what i want to say simply is:

If output1b = true

     input = output1I

 

but at the same time i need it to check output 2,3,4 and 5 and see if they are true or false.

 

If output1b and 0utput3b and output5b = true

    output1I = ouput1b/3

 

but as well as that i need it to also say

 if output1 = false, but output5 = true

    (send all data to next checkpoint)

 

I am attatching an image of some pipes and valves for better reference. 

basically if 3 valves are open it needs the split the input into 3 and send 1/3 down each pipe while skipping the closed valves.

 

I know this is really complicated and normally i can figure it out pretty easy, but in this case there just seems too may ifs and ors for my brain to process correctly.

Can someone please show me an example on how to do this, i just need the first part to get me going.

Thanks

 

0 Kudos
Message 1 of 4
(2,844 Views)

k i got a little of it working. 

Now i just need it so it devides the number passing through Valve1 by the number of other pumps active. 

0 Kudos
Message 2 of 4
(2,812 Views)
Solution
Accepted by topic author AceScottie

Ok with a lot of testing i finally got this working with a lot of true/false cases. Solution attatched. (you may need to create some controls for it because i have a seperate VI for a control panel)

0 Kudos
Message 3 of 4
(2,801 Views)
It sound like you are over thinking this. You have 5 valves and each valve can only be on or off. That means you only have 2^5 or 16 possible unique valve states to sort out. In addition you may already know that certain combinations of valves can't happen, so the count could be even less.

Take the 5 valve states and turn it into a boolean array and from there into a number between 0 (no valves closed) to 16 (all the valves closed).Now simply create a case structure with 16 cases and fill in each case with what happens when that particular combination of valves are open.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(2,796 Views)