From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-01-2017 12:08 PM
I have two arrays - sizes 1 X 5 and the other 1x6
I wanna make it 1X11 - with out a while loop
Both the 1X5 and 1X6 arrays are subset arrays - taken from two larger arrays of size (1X8 each)
As of now, I am using insert into array vi ( with insert index at the end) and it is giving weird outputs.I am unable to append two arrays and get a 1X11.
Solved! Go to Solution.
08-01-2017 12:30 PM - edited 08-01-2017 12:32 PM
....build array with the right click concatenate?
If you are new to LabVIEW there's lots of free training to checkout, this should be covered in the basic training.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-01-2017 12:42 PM - edited 08-01-2017 01:02 PM
A few comments:
08-01-2017 01:03 PM
Altenback,
Since you are asking my code, I am attaching my code - good luck wasting your time with it.
Now you would probably ask to just give me a simple version, so I am attaching that too ( see my second VI) - Now I would be skeptic about your solution, because you were unable to quickly produce this small code, based on my description.
Everyone knows it is simpler with 1D, one does not need to state the obvious. Usually, one would know what he/she is talking about and it is good practice to assume he/ she does before judging.
Lastly, since you asked for default values in the code, I believe it is more time consuming to add that in DAQ and serial communication vi's, so if you think it is easy - please go ahead. I believe my second VI should be very useful for you to play with.
If you still have questions, ..............
08-01-2017 01:06 PM
Hooovahh
It won't work, because it is a 2D array.
"If you are new to LabVIEW there's lots of free training to checkout, this should be covered in the basic training" - Now you know who it applies to
08-01-2017 01:12 PM
Try transposing both arrays first.
08-01-2017 01:14 PM - edited 08-01-2017 01:16 PM
Oh my, you must be new around here. You see we are volunteers helping people in our free time. Most people on the forums (yourself included) don't provide enough information, which leads to assumptions. Lots of them. As Altenbach put it very clearly you could interpret what you said many different ways, as I did because I made an assumption based on the lack of information you provided.
If you ask a question poorly, expect a poor answer. Here is a fun little page that might help you ask questions better in the future. Also feel free to read up on this post where it asks you post code, give as much details as possible, and give example data on what you want.
Had I known you were talking about a 2D array of doubles I would have told you to use the Build Matrix function which has a right click option to append by row or column but that information was missing.
@looser_engineer wrote:
It won't work, because it is a 2D array.
Great, mention that in your first post, or in your title and I wouldn't have had to make any assumption. You just helped prove my point.
@looser_engineer wrote:
"If you are new to LabVIEW there's lots of free training to checkout, this should be covered in the basic training" - Now you know who it applies to
If you have something to teach me I'm always willing to learn. I've been doing LabVIEW daily for many years now and would be glad to hear what you have to say. But honestly your posts are coming across as very abrasive, and negative. We all have bad days, and we try to not take things personal, but again we do this in our free time instead of doing other hobbies, so when someone posts in a negative way we tend to have a knee jerk reaction to start name calling.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-01-2017 01:16 PM
Also, your initial question was slightly unclear that you were referring to 2D arrays - I at first thought by 1x6 you meant a 1D array. After seeing your code and reading over it again, I understood what you meant, but in general that is one reason we ask to attach code. Communicating over the internet is hard and sometimes saying things twice (in writing and in code) might feel repetitive, but it actually helps us help you better and makes things easier.
08-01-2017 01:22 PM - edited 08-01-2017 01:22 PM
I noticed you marked mine as solution, but I would actually recommend Hoovah's suggestion of using the Build Matrix function. He is more of an expert than I am 🙂 and I think that solution is actually simpler.
08-01-2017 01:23 PM
Not just yours, I marked both as solutions