03-02-2018 03:48 PM
@thoraz wrote:
In every input cluster I have a density spectrum, two number which define a band and a number which defines a threshold. In output I want a boolean signal which tell me if the threshold for every spectrum in his defined band is passed.
That seems trivial to implement using a single 1D array (variable size) of such input clusters as input and a 1D array of booleans as output (it will automatically have a matching size). Can you show us some code with typical data?
03-02-2018 04:00 PM
The output isn't a 1D boolean array, but only ONE boolean signal which indicates that every threshold has passed at the same time.
03-02-2018 04:01 PM
Then perform an AND operation on the above described array, and output the result of that. Your input to the vi should be an array of your clusters.
03-02-2018 04:14 PM
@thoraz wrote:
The output isn't a 1D boolean array, but only ONE boolean signal which indicates that every threshold has passed at the same time.
Yes, do an "AND array elements" to get that. (Either before or after the subVI boundary). I would prefer after, so you have the option to troubleshoot which ones failed by having the entire array available for inspection.
03-02-2018 07:05 PM
@thoraz wrote:
Maybe this could be the quik solution. Can I do it with clusters as input?
I think you're not aware that arrays in LV are variable size. Clusters will have defined elements.
The only way to do what you want with a cluster is to either include the array in your cluster or to have an array of clusters.
After that, why would it matter if you want a boolean for each element or all elements together? The logic wouldn't really change. You'd AND all of the original elements or you'd use AND Array Elements to do it all at once. That caveat didn't complicate anything.