LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping arrays by category

Hi,

In the attached VI (Array Manipulation - VI), I built a cluster of arrays, sorted by priority level in the numeric order  so that the most important ones, 1 to 5 are displayed on the top of the list, found which alarms are true based on their boolean state, and unbundled the cluster so that I can show the alarm short name on the listbox and the alarm long name on the indicator of only the alarms that are active. This VI does what I just described, but I am stuck with one other function that the list should show:

The listbox should again filter by alarm category meaning, out of all the reservoir alarms, only show the most severe. So if the reservoir temp is greater than 130, only show that alarm and skip the ones that are greater than 100, 110, and 120.

 

Any help would be greatly appreciated.

 

Thanks!

TeamHalli

 

0 Kudos
Message 1 of 4
(3,131 Views)

Why do you think you need so many FOR loops? Two are plenty for the same result as you currenty have (even without conditional indexing, only a little bit more code is needed).

 

 

 

I don't quite understand your question. Do you want to sort the resuts by temperature, for example and only keep the top 5?

Message 2 of 4
(3,107 Views)

You see how the alarm long description reads reservoir temp high for 130, 120, etc. If the 130 deg alarm is high, I only want to display that alarm and no other alarms below it because they are redundant. That was for reservoir, and I need to do the same for ambient, etc. So all alarms should be grouped and filtered by category before displayed.

Thanks,

 

 

0 Kudos
Message 3 of 4
(3,079 Views)
I haven't looked at your code, I'm commenting based solely on your text. Do you have the option of changing your alarms so that instead of being booleans, they're numbers that represent levels? Then you would assign limits to each level, and you'd only have one level per alarm, so you wouldn't have the problem you're describing.
0 Kudos
Message 4 of 4
(3,056 Views)