LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Elements of Array

Solved!
Go to solution

Let me extend the previous file I posted to another one bigger where you can see what I meant 

0 Kudos
Message 11 of 15
(710 Views)

Hi Lorquino,

 

again a suggestion:

check.png

Comments:

- Instead of creating a string containing a timestamp to search a string array for the same string you really should convert your string input array to an array of DBL values containing the number seconds for your desired "step" - as I do in the snippet.

- You should rethink your data handling/storage: instead of two arrays, one for timestamps, one for other data/parameter, I would use one array of cluster, with each cluster containing all needed information for each "step" (like timestamp and all those other parameters)

- in the snippet the "segundos transcurridos" is rounded to integer to be able to find the corresponding value in the input array

- in your input array there are a lot of empty and wrong elements (containing "u"), which will disturb any algorithm you want to apply!

- it also was a bad idea to use a different formatting for the first two entries (you used "00:01" instead of "00:00:01"…)

 

When you really want to remove entries/rows from your arrays: use shift registers to store the changed array(s) for next iterations!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 15
(705 Views)

Dear GerdW,

Thanks for your message. Im in debt with you. I really appreciate your help. I am not sure if your programme will fix the original problem of the watch jumping since rounding that number to the nearest one Im not sure if it will enough. I will try, In addition, I have designed another way where I removed the first row, I would really appreciate it, if you could have a look because its not working , I stop the loop inside by clicking stop2 and the outside loop by ciclicking stop. I remove in each iteration the first row of each array ( at least I try) but its not working and Im not sure if this is happening due to a misuse of the wrong block( Im using a delete array function) or maybe because Im not connecting the right values to those blocks, thanks for your time I give you my work I will make your solution as the right solution and i will give you a kudo.

 

0 Kudos
Message 13 of 15
(688 Views)

As you can see the removal of the first row from the array of 1D is working, but not the removal from the 2D array , why not 😞 ?

0 Kudos
Message 14 of 15
(680 Views)
Solution
Accepted by topic author Lorquino

Hi Lorquino,

 

for me it's working…

 

Why don't you take my suggestions onusing FormatIntoString instead of that crappy "seconds to string" conversion of yours? It's quite annoying to change your VI again and again:

check.png

Is there a reason to delete the first 4 rows from your numeric array, independently from the found index in your timestamp array?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 15
(676 Views)