LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting 1D array of Boolean True/False to Case Structure

Solved!
Go to solution

What version of LabVIEW do you have? I can save for previous version.

 

image.png

0 Kudos
Message 11 of 18
(1,532 Views)

This is the VI I have so far.  Sorry if the description is too complicated but I don't know how to simplify it.  It's a complicated thing I am trying to do.

0 Kudos
Message 12 of 18
(1,531 Views)

LabView 2015.  Thank you.

0 Kudos
Message 13 of 18
(1,527 Views)

See the attached. This vi could still use a LOT of cleaning up. For instance, instead of the big while loop use a little one so that your not running code unnecessarily. I put the array code in a single FOR loop.

0 Kudos
Message 14 of 18
(1,522 Views)

@lucasphee wrote:

Basically I start with two arrays.  One is angles and one is current.  When than angle value is 0-180 degrees, and the current corresponding with that angle is negative, I want to multiply it by -1.  If it is positive I want to leave it as it is.  For 180-360 degrees if it is positive I want to multiply it by -1, and if it is negative I want to leave it as it is.


See if this solves your problem:

 

CorrectCurrent.png

It probably can be simplified further.... (Yes, see below!)

0 Kudos
Message 15 of 18
(1,519 Views)
Solution
Accepted by topic author lucasphee

@altenbach wrote:

It probably can be simplified further....


Yup, it can 😄

 

CorrectCurrentSimpler.png

 

 

Message 16 of 18
(1,516 Views)

Thank You!

0 Kudos
Message 17 of 18
(1,503 Views)

Also note the solution does not involve any case structure or Boolean array. A proper question should only state what you want to do, now how you want to do it. Leave the "how" to us. 🙂

0 Kudos
Message 18 of 18
(1,467 Views)