LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
paul_cardinale

Make "Or Array Elements" work with arrays of clusters.

Status: New

I should be able to to this:     mean 0.png      But that's not allowed:     mean 1.png

 

 

 

Instead I have to do this:     mean 2.png

"If you weren't supposed to push it, it wouldn't be a button."
8 Comments
wiebe@CARYA
Knight of NI

FYI, duplicate of this declined idea:

Allow "Add Array Elements", "Multiply Array Elements", "And Array Elements" and "Or Array Elements" ...

 

Not sure why it was declined, maybe simply lack of attention?

MichaelBalzer
Active Participant

An alternate approach would be to use a shift register in the for loop and OR the cluster with each iteration. Saves on array memory allocation too.

 

MichaelBalzer_0-1623660085805.png

 




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
wiebe@CARYA
Knight of NI

>An alternate approach would be to use a shift register in the for loop and OR the cluster with each iteration. Saves on array memory allocation too.

 

Agreed, but that only applied for the example.

 

If you get an array of clusters from a sub VI, it's a bit annoying you need a for loop, function and shift registers:

Or Array Elements.PNG

And (anticipating the next remark) this could be done in a malleable VI...

 

Any arguments against the idea, though?

 

paul_cardinale
Trusted Enthusiast

Here it is.

oce.png

"If you weren't supposed to push it, it wouldn't be a button."
MichaelBalzer
Active Participant

Any arguments against the idea, though?

 

No objections either way. I'm always in favour of LabVIEW's primitives operating on more array data types, so I'll add a kudo.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
fabric
Active Participant

I'll add my vote. Hopefully we get more than 4 kudos this time

AristosQueue (NI)
NI Employee (retired)

I won't add my personal kudos only because personally I've never needed this functionality. But I can see someone wanting it (and expecting it to work).

 

Speaking as a former member of LV R&D, the idea gives me pause... I'm not saying this is a bad idea. It may be a good idea. But it is an idea that suggests that maybe the proposed solution is too limited for the hole in LV functionality. You see, right now, it's clear what the node does and what it doesn't do. If we implemented this, I can already hear the arguments about whether the output should be a cluster of bools or a single bool... and then that we need a second node for "or cluster elts"... and then those need to be the same node and therefore need a mode... wait, I know, let's just add modes to the Or primitive itself...

 

Rethinking boolean logic handling for LV comes up from time to time. To me, this is one more pebble on those scales.

 

 

_carl
Member

I read this post a week ago and thought "sure, but...I've never actually encountered that situation".  Yesterday I encountered it.  (So this now has my kudos.)