LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array to slow

in the attached file there is a screenshot.

the problem is that the while loop is very slow.
in this loop there is a global array which is decremented every while loop cycle.
this array can be hugher than 40000 rows.

is there any faster way to delete the first row and write the not deleted back?
0 Kudos
Message 1 of 3
(2,192 Views)
Hello Markus,

seems similar to your last question 🙂 Here you delete from array which means to split a big array into two smaller parts (allocate two new memory block, copy data, delete old array).

1) Do you really need to "decrease" the global array? If not it's much easier: Then you don't need to "delete from array", just use "index array". You always take the first element from the global...
Btw. "Index array" can have more than one input/output, in your example pic you can use one index array to get all values from the deleted portion...

2) If the global array isn't used outside of the while loop (at the same time), you can use a shift register instead of reading/writing to global.

Best regards,
GerdW
Best regards,
GerdW


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

It is hard to say just by looking at such small piece of your VI, and even harder when we don't know how is your overall application.

That been said, first check to see if in the while loop another VI is doing something with the "AblaufsequenzStation1" global variable. If nothing else interacts with that variable, you can use shift registers rather than to call the global variable each time.

Also, probably you don't need to keep deleting the first row just get the information. If instead you wire the array directly into the while loop and turn indexing on (you may need to transpose your array first), then at each loop you will get the next row.

Unfortunatelly, I don't have LabVIEW in front of me right now. Later on I will post images of what I am saying. Hopefully this information will give you a head start.

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 3 of 3
(2,184 Views)