LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

discard same value in write spreadsheet

hi...I need some help here please..

I want to discard the same value before write to the .csv file. I have attched my simple program. i used the while loop (used shift register) to compare between two values. But unfortunately, I want to used this program as a subvi and run it in the main vi. If i not mistaken, I have try to run the subvi that have while loop in the main vi that also have while loop. I noticed that, the subvi could not run if there is a while loop in the subvi. So can anyone help me to solve this problem. Mayb there is a way to buffer the value but not using while loop..

please help..thanks..
0 Kudos
Message 1 of 5
(2,849 Views)
Hi gdah,
you can use the while loop to buffer your data, but connect a true to the loop condition. If you do it, your loop stops after one iteration.
 
Hope it helps.
Mike
0 Kudos
Message 2 of 5
(2,847 Views)

Definitely wire a True constant instead of False if you want to stop the loop after 1 iteration.  You should also the next case to a shift register instead of a Property Node for enum. 

Can you describe what you are doing?  I just want to verify the logic in your program.  Are you trying to search a 2D array for matching values and then remove them from the data?  I'm basing that from the title of your post.

R



Message Edited by JoeLabView on 07-14-2008 07:05 AM
0 Kudos
Message 3 of 5
(2,842 Views)
hi..I have a set of data (2D array-2 columns and 1 rows) that will always change..and there is a possibility that the data will become duplicate data.so in my case i dont want a duplicate data in my spreedsheet..i have try using for loop. and it works...but unfortunately i only can discard a countinuos duplicate data..for example..if set data1 and set 2 are same,i can discard it..but if  there is another duplicate data in set 4..i have now idea how to discard it...i attached a simple program that i done. i loop the same data to generate a duplicate data.suppose in the file there are only two datas which is not the same data. .please help..

Thanks...
0 Kudos
Message 4 of 5
(2,817 Views)
Hi gdah,
 
You can use anothe loop nested within your for loop to run through the srray and compare the current value to all other values and discard the current value if it is found.
Sappster
0 Kudos
Message 5 of 5
(2,798 Views)