LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically reading an array for a number

 

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.

0 Kudos
Message 1 of 4
(2,858 Views)

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.

Message 2 of 4
(2,835 Views)

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.
0 Kudos
Message 3 of 4
(2,827 Views)

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. 

Message Edited by Hillman on 05-11-2009 11:28 AM
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 4 of 4
(2,789 Views)