From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove same numbers from table

Is here sombody who knows how te remove all the same rows out of the table, it will help a lot.

 

Mvg Kenny

0 Kudos
Message 1 of 11
(2,900 Views)

What have you tried so far?  A word doc isn't code.

0 Kudos
Message 2 of 11
(2,888 Views)

Do you want to remove the lines that have all of the elements the same or just certain columns?  What have you tried?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 11
(2,886 Views)

The vi that I'm making is for reading can signals of the car, in the table are all the data messages sorted, but they keep running and there are only 4 different rows in the table, so I want to see only those four rows.

0 Kudos
Message 4 of 11
(2,872 Views)

And there are other data that have way more than four combinations, so I thought to compare the data with the previous data and when it's different, save it into a array. And then compare the results so far in the array with new data, and when there are no differences anymore write it into the table...

0 Kudos
Message 5 of 11
(2,865 Views)

A table is just a 2D array of strings fed to a table indicator.

 

You need to get rid of this express VI and build a 2D array of strings in a shift register yourself. Now you have full control over each element and can replace rows or columns using "replace array subset" or even insert or delete rows, etc.

 

(note that your explress VI is configured to not clear data on each call, making the table greow without limits.)

 

Your description of what you wnt is not very clear. Do you want to keep the last four records, for example?

 

Sorry, I don't have your drivers. Can you create a simple VI that simulates typical data? How should the table look like as a function of the number of loop iterations?

0 Kudos
Message 6 of 11
(2,833 Views)

@kennyb94 wrote:

The vi that I'm making is for reading can signals of the car, in the table are all the data messages sorted, but they keep running and there are only 4 different rows in the table, so I want to see only those four rows.

 

And there are other data that have way more than four combinations, so I thought to compare the data with the previous data and when it's different, save it into a array. And then compare the results so far in the array with new data, and when there are no differences anymore write it into the table...


 

Whatever you are writing is pure gibberish and is very difficult to understand. Let me try anyway.

 

OK, let's look at your table. Apparently, you have four different possible values in column 1 (D1, first column is 0), so that's what you need to identify. Whenever new data arrives, you can just check if that value already exists and then skip adding the new row it to the table. Of course it could also be that some of the other fields are changing too, in this case you could replace the old entry containing the same key in column 1 with the new data.

 

 

 

Should the program stop once you have all unique rows? Do you know the possible D1 values before the program starts?

0 Kudos
Message 7 of 11
(2,827 Views)

The table that I showed is the simplest one, but what I want to do in Labview is like in excel (button "remove duplicates" under the tab data).

I don't know what data is going to come in before I'm going to meassure.

 

Sorry for my english, I'm dutch

 

Grt

0 Kudos
Message 8 of 11
(2,790 Views)

@kennyb94 wrote:

The table that I showed is the simplest one, but what I want to do in Labview is like in excel (button "remove duplicates" under the tab data).

I don't know what data is going to come in before I'm going to meassure.


But you can always check the incoming data to see if it is a duplicate of an existing entry, and then don't add it to the table.

0 Kudos
Message 9 of 11
(2,783 Views)

Yes, you know what I mean, the problem is that I don't know how I have to compare data that came in with data that is new, I thought to add the new data in a array and then compare it with the next data that came in, but than it has to compare with a whole array to see or it's a new or that it is a duplicate, and I don't know how to realize.

 

Grt

0 Kudos
Message 10 of 11
(2,778 Views)