LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete elements from a cluster?

Solved!
Go to solution

Hello. I would like to know how to delete elements from a cluster. I got stuck with this problem. There is its own order of each element in a cluster. I tried to initiate an array but it seems like too complicated. In the attached file, I want to obtain only the data from "flow" not "pressure". I try to use array programming but it doesn't work. Would be nice if you help me to fix the file. Thanks

0 Kudos
Message 1 of 9
(7,103 Views)

You cannot delete elements from a cluster, they are fixed size at runtime. It seems you want to create an array of all  values where save=true. This can be done with one simple loop.

0 Kudos
Message 2 of 9
(7,100 Views)

I'm pretty new with the software. Do you have any suggestions in this case? I would appreciate if you fix my programming in the file. 🙂

0 Kudos
Message 3 of 9
(7,098 Views)

Try something like this.

0 Kudos
Message 4 of 9
(7,095 Views)

Hi Bombboo,

 

you consequently don't use autoindexing for loop inputs, do you? I tried to clean up your VI (see attachment), but kept the single steps in separate loops. Christian probably shrinked the BD even more...

 

Btw. why did you replace an array element by itself (highly Rube-Goldberg)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(7,091 Views)
Solution
Accepted by Bombbooo

Thank you so much. Your solution is the way better than my confusing file. 🙂

0 Kudos
Message 6 of 9
(7,085 Views)

What about if I want to store data into the pressure array too? Do I have to create another loop or it can be done in the same loop as the flow loop?

0 Kudos
Message 7 of 9
(7,076 Views)

All in the same loop...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(7,074 Views)

@Bombbooo wrote:

What about if I want to store data into the pressure array too? Do I have to create another loop or it can be done in the same loop as the flow loop?


Try this, for example. Modify as needed.

 

 

Download All
0 Kudos
Message 9 of 9
(7,062 Views)