05-08-2009 06:33 AM
Hi
Hope some one can help. I have some code that a labview guy helped write. I've changed some things in it but can't quite get it to do what i want. I have attached the code so you can see it. It basically does what i want except that i dont want to have to tell it which row to add the addition to. I want it to scan the file, FIND the existing WO and then update it automatically.
I've tried doing this with the search an array function but struggling to get it to work..
Please help....
Note you will have to change the pathname to some thing relavant to your pc obviously.
05-08-2009 09:21 AM
It would also obviously help if you included the file to be read.
It would also help if you explained exactly what the VI is supposed to do. I don't see any search function and what do you want to search for and what are you trying to update. Your code where the index control is being used, does not do an add at all. It replaces.
05-08-2009 09:30 AM
I need the VI to create a default number of one (next to the works order number) when a New WO is created. Then later on in my process i need it to search the colm for the correct WO number and add 1 to the default. This is so that every time i run the program it does not default the serial number to one. It adds one each time. This is actually quite hard to explain. I want the VI to automatically search the file for the correct WO number and not use the select row option manually.
It automatically creats the file required if you use the New WO fuction on the switch.
Thanks
Hope this helps.
05-11-2009 05:27 AM - edited 05-11-2009 05:28 AM
Hi Printerman,
Thanks for the post and I hope your well today.
I am still not sure I fully understand what you need, but this is how I understand it currently.
You have a tab delimited text file (xls or otherwise) and you wish to search for the WO enteries and modify the file somehow.. adding a numeric into the name.. like WO 0?
As previous mentioned you need to use a function like Search & Replace from the string functions. I have attached an example VI in LabVIEW 8.6. I have also attached the tab txt file I am using.
I hope this helps, if not - please could you explain - with maybe an example of what your trying to achieve.