LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

searching files

I have a text file being generated using labview similar to that shown
below.
Each row is the result of different tests. The first column is the serial
number of the UUT. When the operator writes in the serial number of the UUT
at the start of the test sequence, I am trying to do a check on the first
column to ensure the same serial number has not been previously entered. If
it has, the operator is then asked to type another serial number. The batch
sizes for tests are not consistent. I have had a few goes at trying to do
this and I keep failing. Any assistance would be greatly appreciated.
Denis

Serial Number, Result1, Result2
123FR23, 12345, 2345
123FQ32, 5432, 234
0 Kudos
Message 1 of 2
(2,456 Views)
I can see a couple of ways to do this. Perhaps the easiest would be to
read your text file as a spreadsheet string. You can search the string
with the match pattern function in the vi library. Based on the
results of the search you can prompt for a new serial number, or
process it as normal.

The other way would be to maintain the contents of the data file in
memory as a 2D array of strings (this may not work if your data file is
extremely large). When you want to add a new field, you can index the
2D array to a 1D array that contains the first column (the serial #s),
then use the search 1D array function for the current serial number.

The first solution is probably the easier one to implement. Hopefully
I understood your problem correctly, and this may help, feel
free to
contact me with any other questions.

Spencer Anderson
spencerwa@hotmail.com



In article ,
"Denis Hodgins" wrote:
> I have a text file being generated using labview similar to that shown
> below.
> Each row is the result of different tests. The first column is the
serial
> number of the UUT. When the operator writes in the serial number of
the UUT
> at the start of the test sequence, I am trying to do a check on the
first
> column to ensure the same serial number has not been previously
entered. If
> it has, the operator is then asked to type another serial number.
The batch
> sizes for tests are not consistent. I have had a few goes at trying
to do
> this and I keep failing. Any assistance would be greatly appreciated.
> Denis
>
> Serial Number, Result1, Result2
> 123FR23, 12345, 2345
> 123FQ32, 5432, 234
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 2 of 2
(2,456 Views)