LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing a table to a LUT

I am requiring to create a LUT of 2048 values. These values are currently in an Excel file and therefore need to be imported to LabVIEW. My question is whether it is possible to do this without having to sit and transfer each value manually as a simple cut/paste has not worked.
Message 1 of 6
(3,210 Views)
Hi AGN,
you can use ActiveX functions to read the values. If all your values are in one worksheet, then save your xls fils as csv. You can read the values from csv using the "Read from Spreadsheet file" function.
 
Hope it helps.
Mike
Message 2 of 6
(3,206 Views)
Mike gave you good suggestions on how to get the data from the spreadsheet (I'd push for csv to make it easier) but now to how to use it.
 
I needed to implement a bunch of LUTs in my Next Generation Aircraft Fuel Pump ( now flying in the new Joint Strike Fighter Smiley Wink ) that the customer could change to simulate a variety of enginges. I did that using Action Engines with two states "Init" (which loaded the LUT) and "Convert" which did the look-up.
 
Have fun!
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 6
(3,177 Views)

Ben, thanks for that but I'm afraid I don't think it really helps me too much.

I have done the "Read from Spreadsheet file" function and called the output of this "Init Data Out". I have then created a 1D Look-Up Table and from the configure screen gone Define Table, Call Initialization VI... (calling the vi containing the "Read from Spreadsheet file" function). This results in the message:

WARNING: Initialization array not same length as memory. Missing data added.

This appears not to do anything as all the elements in the LUT remain at 0. It is also rather odd as the two things are the same length, just before you ask!

Any further thoughts?

0 Kudos
Message 4 of 6
(3,171 Views)

Now you have me trying to guess what you are talking about.

Please post images of your code so the contrbutors can be of greater assistance.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 6
(3,165 Views)
I'm afraid I can't get any screenshots off the system we use in the lab but one of my colleagues has been able to solve the problem for me. Thanks for all your help, the problem was that I was trying to put a 2-D array into what should be a 1-D array but the problem is now solved. 
0 Kudos
Message 6 of 6
(3,136 Views)