LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using labview to search for values in a spreadsheet.

I want to create a very large spreadsheet with lots of pressure values, based on material type and valve class. I want to use labview to search and return the pressure value from this spreadsheet based on 2 drop down menus on the front panel where the material type and valve class is selected by the user. Can anyone give me a pointer on how to go about this?
 
Thanks
 
Jamie
0 Kudos
Message 1 of 16
(3,984 Views)
I'd do something like this:
0 Kudos
Message 2 of 16
(3,976 Views)
If I'm understanding what you want correctly, you would want to have your first row of your spreadsheet starting at column 2 contain all the different values for either material or valve type.  Then have the first column starting at row 2 contain all the different values for the other type.  Then enter in all the pressure values that match the corresponding first row and first column.  That way when the user enters in their valve and material type just search the respective row or column for it's index and then index the 2D table at those indices.
 
hope that helps
0 Kudos
Message 3 of 16
(3,972 Views)
Yes Dave, you are correct in what I am trying to do. Trouble is, I am very new to labview. Could you give me an example VI?
0 Kudos
Message 4 of 16
(3,963 Views)

forgive the sloppy documentation.  I tried to make it easy to follow.

 

0 Kudos
Message 5 of 16
(3,957 Views)
Thank you dave. Unfortunately I am operating labview 7.1 so can't open the vi. could you please save it as a 7.1 file and re-send. Many thanks.
 
Jamie
0 Kudos
Message 6 of 16
(3,947 Views)
Sorry for the long reply time.  I was unable to save the file as a 7.1 version, so took a screenshot of the code instead.  If you would like to see the front panel let me know, but you can arrange it anyway you'd like.  I'm not sure if 7.1 has the options for a flat seqeuence or not, but I laid everything out like that so you could see how it all happens step by step.  If 7.1 does not have that then just use a stacked sequence structure.  If you do that you'll also need to create a sequence local for passing the table array around.  To do this just right click on the stacked sequence and select sequence local.

David
0 Kudos
Message 7 of 16
(3,918 Views)
I converted for you.  may save you wire time if I got it to you on time.

Paul
0 Kudos
Message 8 of 16
(3,913 Views)

Thanks Guys,

Can you tell me how I can do this using the combo box control and by calling an external excel spreadsheet as I have already inputted a good few hundred entries in each of these.

I have tried a few ways based on the example you have given but can't get any to work.

 

Regards

Jamie

0 Kudos
Message 9 of 16
(3,866 Views)
Infact, it would be a string control, as the value from the combo box is wired to a cluster which is used in another VI later in the code.
0 Kudos
Message 10 of 16
(3,858 Views)