LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenating Terminal Control Reference

Any particular reason this won't work?

 

 

 

0 Kudos
Message 1 of 16
(4,733 Views)

I was under the impression that in order to concatenate an array it had to be an array to start with.

Message 2 of 16
(4,721 Views)

works for me...

 

to_more_specific.png

Never mind....After seeing BowenM's response, I looked closer and see you changed the tunnel type to concatenating.  Bowen is correct, you would normally use this to add a 1D (or more? I haven't tried) array to the end of the auto indexing instead of adding a dimension (make it a 2D array).  It makes no sense to do this with a non array data type.

Message 3 of 16
(4,721 Views)

If you change your tunnel mode to "Concatenating" it breaks just as his did.  It gives the error "You have connected two arrays that mismatch."

 

Although, the real question I think is why would you want to concatenate the arrays instead of auto-index?

Message 4 of 16
(4,705 Views)

Am I missing something here?  He isn't trying to concatenate an array - he is trying to concatenate a scaler.  What is the difference between what he posted and this?  

 

kitty.png

 

They don't work for the same reason.

 

 

Message 5 of 16
(4,686 Views)

Everybody's saying the same thing (after I looked closer at the original post).  Concatenating a scalar is not logical. 

Message 6 of 16
(4,666 Views)

Kudos for everyone! Total brainfart. I have nested for loops. I need indexing on the inner, then concatenating on the outter...

 

I swear I've programmed in LabVIEW before.

Message 7 of 16
(4,662 Views)

See, even the best of us need help...



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 16
(4,647 Views)

@crossrulz wrote:

See, even the best of us need help...


Greg,  I stand by my comment it the Congrats thead-  I Love reading your threads  "What did Greg get himself into now?"  Is often amazing!

 

BUT, you bring up a good point!  Why shouldn't Concatanate Tunnels operate on scalars? the implementation of course being "Auto-indexing:D"    Or why can't "To more generic" operate on arrays?  You've got some work to do on the IE my friend!

 

Of COURSE, ITOH, You could just stick a Build Array in the loop and concate your heart out Smiley LOLSmiley LOL

 

Spoiler
Hmmm.. I wonder if anyone has ever benchmarked the two methods????????? on a smart compiler-  The output array length is known and the whole darned loop could be folded with a constant in

"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 16
(4,637 Views)

Treating scalar concatenation like indexing is probably the most intuitive, but I would argue that the most consistent treatment would be to treat it as 'last value'.  Indexing raises the dimensionality, concatenation keeps it the same so I would say scalar in gives scalar out.

 

There is one exception, and that is this one which baffles me:

 

BadConcatTunnel.png

 

I am tired of tossing U8 conversions or a concatenate strings function in there.  Strings are definitely the one scalar data type where there is no confusion about what 'concatenate' means....

0 Kudos
Message 10 of 16
(4,626 Views)