LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding elements in array without overwriting

Hi, i need to know how to add elements in array without overwriting data in that array. I have tried buid array and inser into array options to create an array of 4600 elemnts. But only one data is stored that is a data of 4600th element. I don't know how to add elements in array without overwriting. Suggest me some solutions. 

    Thanks in advance!elements add.png

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 3
(3,580 Views)

Hi Hans,

 

"adding" elements to an array is done using BuildArray. Point.

 In your image there is no BuildArray or InsertIntoArray function, so it seems it's not the latest attempt of yours…

 

Your image shows your great lacking of very basic LabVIEW stuff. Please learn about DATAFLOW and how to use shift registers! Learn to avoid local variables and sequence structures!

 

What's the point in setting your "numeric" to zero, then reading the value of "numeric" by using a local variable to increment it, followed by setting "numeric" to one?

Why not just set "numeric" to one?`Why even use a control "numeric" then, when you always set it to "one"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(3,576 Views)

Hi Hans,

 

using a simple loop with an autoindexing output tunnel will do the job too:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 3
(3,536 Views)