LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel search

Solved!
Go to solution

Good Morning All

 

I'm in need of some guidance (again), and would appreciate any assistance.

 

Attached is the file "2010-06-01. The file is downloaded from a webbox which is used to collect data from a solar plant. The webbox can grab the data from any number of attached inverters and meterological data detectors.

 

Each channel of the inverters and met. data collectors has it's own meta name e.g. WindVel m/s...this is pretty self explanatory and is simply the wind speed.

 

Now, the problem is this.....the data file contains the data values under the column heading relating to the meta name (of course). Depending on the number of inverters online, the position of the meta name in the table can shift at random, and is not predictable.....this means that a search at a particular column will not always return the correct channel data, so using fixed index values for a row/column search isn't bulletproof.

 

My intent is to use the meta name then as the search criteria....yes....there will be a number of entries (again depending on the number of inverters online) for each meta name, but this is not my concern (yet).

 

I have done some work on a vi (attached) which is successfully searching out and finding a single meta name, but I'm having some difficulty in doing a search for an array of different meta names.

 

The vi will eventually find the column(s), and then pluck the data value from the last row in the table (already working for a single meta value)

 

Could somebody give me a clue as to go forward?

 

Thanks and best regards

Ray

 

Download All
0 Kudos
Message 1 of 22
(3,495 Views)

When you want to do array search of Different meta names...............are u expecting that the order in which the meta names in array are, in the same order it will be in excel file.Then you can do subset search by importing row which contains META names into an array & then perform subset search.

 

If order is not the same, then you search one entry(one meta name) of array at a time & repeat the same for rest of the elements of array using FOR loop.

 

If this is not the case, then please be more specific in explaining your requirement.

0 Kudos
Message 2 of 22
(3,475 Views)

Hello Kekin

Thank you for your interest in my work and your reply.

 

I'll start with more information about the file.

 

The information that I want to extract from the file is contained in the last row at various column locations. The problem lies in that the data comes from various sources as stated in the OP. The data from these various sources is concatenated in no particular order EXCEPT to say that the data belonging to one of these sources is grouped together, BUT in no obvious position in the table.

 

Lets look at the attached example...the first few columns (apart from the timestamp) contain columns of data from a sensor box. The sensor box logger has different channels with each channel a unique meta name...such as....TmpAmb, TmpMdul, WindVel...and so on. Moving acroos the table, as if reading a book, the next set of channels belongs to a meterbox, and has it's own set of columns with data.

 

Any channels and their corresponding meta names (and data) that follow are from inverters. The number of inverters that are logged can vary anywhere from 1upwards to as many as 20.

 

The multiple inverters ALL use the same meta names for the collected data, and the most distinguishing feature is they have their own serial number.

 

Lets take a meta name at random...say....."E-Total". Now if there is six inverters being logged, this means that the meta name "E-Total" will appear in the file as many times. This goes for ANY of the meta names associated with the inverter data.

 

What does this imply?.....well it's not sufficient to searhc for this meat name once only, because data will be missewd for the other five inverters.

 

My plan was to use the meta names used in the file....search for these names and note the corrersponding column index for them. I can group the individual sources in their subsets by doing a compare of the serial number (which you will notice appears in every coloumn of the data associated with that particular source).

 

The ultimate goal therefore is to extract the data value from the last row and the associated column.

 

As stated in the OP, I can do the file string search, but only the once, and my limited LV experience leaves me shortsighted as to how to go about doing an iterative search.

 

Any assistance will be greatly appreciated.......

 

Thanks again

 

Ray

0 Kudos
Message 3 of 22
(3,466 Views)

One thing I did not mention is that the row containing the meta names is always the same......

0 Kudos
Message 4 of 22
(3,463 Views)

Please upload GET EXCEL VALUES.vi

 

Also best thing would be to do is use shift register in FOR loop & pass the index value of search (i.e. out put index of SEARCH 1D ARRAY.vi) to start index input of this vi.

 

Now you can search multiple enteries of string in an 1D array.

 

If you can upload all the VIs then I can help in a better way.Sice I don't know what are u extracting from EXCEL. I think it's simple task to do multiple search in 2D array.

0 Kudos
Message 5 of 22
(3,451 Views)

Do you have data with multipule inverters logged? I think this sounds like an interesting project so I would be happy to try and help you figure it out. You said that you only want the last row for each inverter is that correct?

Tim
GHSP
0 Kudos
Message 6 of 22
(3,444 Views)

The attached xlsx file contains data that comes from a sensor box for met data, schoolmeterbox for power measurements and two inverters for the DC data. Apart from extra inverters, this would be a typical file content, and is the sample that I am using to code around.

 

At this point in time, the inverters are not yet online, so it's difficult to get their contribution to the file contents.

 

Ray

0 Kudos
Message 7 of 22
(3,418 Views)

aeastet

 

I am fetching the data from the last row, yes...but not just the inverters but also from the other sources.....sensorbox (serial 6607) and schoolmeterbox (serial 154000420)

 

Ray

0 Kudos
Message 8 of 22
(3,417 Views)

Attached is the meta names in an array that would be used to search for the location(s) (column index only required, as I can find the last row)

0 Kudos
Message 9 of 22
(3,407 Views)

sorry...that was an empty array. Here it is again

0 Kudos
Message 10 of 22
(3,404 Views)