LabVIEW Idea Exchange

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

Add Menu Item that will Configure Concatenate Array Node to Ignore any Wired Empty Array(s)

Status: New

When concatenating arrays, a wired empty 1D array, concatenated to an Empty 2D array will result in array index (1,0) and when this is concatenated to a populated 2D array, a top row is added with empty elements. This is in many cases unwanted behavior.

 

The suggest that LabVIEW includes a menu to configure the concatenate array node to ignore acting on any empty array(s) wired to that node.

 

Suggested New Menu Item for Concatenate Array.png

 

Because in some cases the resulting array will end up with an added top row with empty elements.

 

2D and 1D Empty Arrays yields Extra dimension.png

 

Anthony Lukindo

4 Comments
AristosQueue (NI)
NI Employee (retired)

Interesting request. Not one I've heard before nor ever had a need for myself, but I can see the utility.

 

As a workaround... this accomplishes your goal with existing tools. The rightmost Build Array node is set to "Concatenate Inputs". You could make the empty array test and the case structure into a VIM so you don't have to recreate all that every time you need this. It is not as good as NI adding the option, but it may be the best option for now.

AristosQueue_0-1613153126281.png

 

Anthony_L
Member

Hello Aristos:

 

Thanks you for your reply. It took me more than 20 yrs, and after qualifying as a LabVIEW architect since 2005, to recently discover that strange LabVIEW behavior where an empty array gets to append a row of its native default values.

 

The idea here is that, I think, the DEFAULT behavior of that array-build-node should be to just ignore empty arrays. Because the programmers intent would be always to treat the array as EMPTY with NOTHING to ADD. Or just: nil, zilch, naught, nada (no active elements) not even zeros. I am, sure this behavior of LabVIEW will shock many, however sensible it may sound to some others at NI or even mathematically.

 

I my case, I have always used some other logic upstream to Add or Not-to-add data to the array. And for those ~20 years, I always assumed that adding an empty array with NOTHING in it (i.e. no active elements) would just add, well: NOTHING.

 

So I am already doing the work-a-around but this came along after a very painful journey trying to troubleshoot a commercial app with a customer. I could never understand where the ghost row came from, until I investigated what I thought the culprit could ULTIMATELY be.  It was nothing short of a tough, high stakes, Sherlock Holmes murder-mystery forensics investigation. Themed with a scary witch-hunt of sorts!

 

And the commercial application in question was a mission critical one that needed just about 100% up-time.

 

I explained all of the above so that NI is aware of the real world impact of such strange non-practical behavior. --With a huge toll to even experienced programmers.

 

YES, the default should be to IGNORE empty arrays.

 

SUGGESTION: NI can put that LabVIEW scenario as a question on the CLD and CLA exams and then count how many would get it right. The goal will be to see how many will add that row with default zeros.

 

Anthony Lukindo

Anthony_L
Member

... sorry. Should read . . . Thank You.

AristosQueue (NI)
NI Employee (retired)

First, let me say: I'm sorry LabVIEW gave you fits. I'm never happy to hear about our users stressed out by our language. We try to surface edge and corner functionality so that people aren't surprised by things like this, but that doesn't always happen... as in this case.

 

> I think, the DEFAULT behavior of that array-build-node

> should be to just ignore empty arrays

 

I doubt we can justify changing the default behavior. This has been the behavior at least back to LabVIEW 2.0. That's 30 years of existing code that would change behavior or need mutation. In the 20 years that I've been part of the team, this is the first time I've heard this request. Now, that's not the same as saying no one else has hit the problem, but given how many customers know how to get ahold of me and how vocal many of them are about even small issues, I believe it does mean that this behavior is either intuitive to most as it stands or rarely encountered.

 

So I acknowledge the problem (and, honestly, I think if I'd implemented that node, I would've handled empty array as you suggest). But given the existing history, I think solving it as an option on the node is a better idea. People already commonly right click on the Build Array node to select between concatenate/build, thus a new right click menu I think would be discoverable and therefore learnable to let people know about this edge case behavior. Any other users want to comment on this point?

 

The behavior is long standing, so it will require a fair number of kudos to get it changed, whether as a default or as an option. We will leave the idea open and see how it develops.