取消
顯示結果 
搜尋替代 
您的意思是: 

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

已解決!
前往解決方案

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

 

image.png

0 積分
11 條訊息(共 18 條)
2,025 檢視

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 積分
12 條訊息(共 18 條)
2,024 檢視

LabView 2015.  Thank you.

0 積分
13 條訊息(共 18 條)
2,020 檢視

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 積分
14 條訊息(共 18 條)
2,015 檢視

@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 積分
15 條訊息(共 18 條)
2,012 檢視
解決方案
由主題作者所接受 lucasphee

@altenbach wrote:

It probably can be simplified further....


Yup, it can 😄

 

CorrectCurrentSimpler.png

 

 

16 條訊息(共 18 條)
2,009 檢視

Thank You!

0 積分
17 條訊息(共 18 條)
1,996 檢視

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 積分
18 條訊息(共 18 條)
1,960 檢視