LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter repeated values of 1D of cluster

Hello,

 

I have the following problem:

I have a cluster that comes from another system and it returns to me this way in some cases, with repeated values.

I need to filter this cluster so that only one item of each Value appears, from the oldest to the most recent.

 

Could you help me?

leandrofeder_0-1747221123311.png

 

0 Kudos
Message 1 of 5
(134 Views)

Hello Leandro,

 

If I understand your need correctly, you had a good start with your VI.

Here is one solution not far from yours :

PinguX_0-1747223654165.png

 

0 Kudos
Message 2 of 5
(113 Views)

You made some mistakes with the build array.

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 3 of 5
(109 Views)

Oi Leandro

 

Vc ta indo na direcao certa. No Case true vc so precisa modificar o build array pra aceitar a array do shift-register como concatenate array. 

Desta forma, a cada novo elemento, o codigo vai incluir o novo finding no array da iteracao anterior.

LVNinja_0-1747233334445.png 

LVNinja_1-1747233364638.png

 

 

 

 

0 Kudos
Message 4 of 5
(71 Views)

Searching through an ever-growing array can get expensive. Since you have LabVIEW 2019, you can use a SET to keep track of unique elements. For large input arrays this will be orders of magnitude faster.

 

altenbach_0-1747235125485.png

 

altenbach_0-1747235417287.png

 

 

Message 5 of 5
(64 Views)