05-25-2009 09:26 PM
Hi,
Whoever can help, I have a 2D array from txt file which have many rows and 5 column and I want to do a search and display the other column results.
Eg.
Column 0 1 2 3 4
12345 qwer asdf 12qwe tjhrtyert
23568 werr wef fgertge fsefff
If I manage to search 12345 and I want to display 12qwe, what should I do in labview? Please help!
Solved! Go to Solution.
05-25-2009 10:05 PM
Use the Index Array to get column 0, use the Search 1D Array to find the index element, use the index element to get the value in column 3.
05-27-2009 04:51 AM
Hi Dennis,
Thanks for your solution. I managed to display what I want. Do you know how to I write back to txt file just by replace the particular column (String).
Example: Column 0 and row 4: abc and Column 4 and row 4:location1 and I want to change to location4 and write it back to the text file. How am I going to do? I attached my VI (Inventory tracking)for your reference.
05-27-2009 04:57 AM - edited 05-27-2009 05:06 AM
Example: Column 0 and row 4: abc and Column 4 and row 4:location1 and I want to change to location4 and write it back to the text file. How am I going to do? I attached my VI (Inventory tracking)for your reference.
I am not clear with the above sentences.also attach the file that read from the vi.Use array>>Replace array subset function to replace the elements in the array.
05-27-2009 09:53 PM
Hi Baji, the solution you provided is able to replace the array but not on the text file. I have attached the VI and txt file. Example: If i search under asset no. 0023330 and the location is ME-lab and I want to change the location to 123 and replace it on the txt file. What function should I use?
05-27-2009 10:17 PM
05-28-2009 01:26 AM
Hi Raven,
Can u show me an example, I don't quite understand what u mean by updating in a shift register.
05-28-2009 01:32 AM
05-28-2009 03:15 AM
Baji, thanks for arranging the block diagram, do u know how I can add a push button to activate the updated to the txt file?
05-28-2009 03:24 AM