02-11-2015 07:08 AM
Is here sombody who knows how te remove all the same rows out of the table, it will help a lot.
Mvg Kenny
02-11-2015 07:21 AM
What have you tried so far? A word doc isn't code.
02-11-2015 07:24 AM
Do you want to remove the lines that have all of the elements the same or just certain columns? What have you tried?
02-11-2015 07:52 AM
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.
02-11-2015 07:59 AM
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...
02-11-2015 10:51 AM
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?
02-11-2015 11:00 AM - edited 02-11-2015 11:03 AM
@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?
02-12-2015 01:52 AM
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
02-12-2015 02:52 AM
@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.
02-12-2015 03:24 AM
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