Discussion:
Importing a table to a LUT
(too old to reply)
AGN
2008-08-11 10:40:04 UTC
Permalink
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.
MikeS81
2008-08-11 11:10:07 UTC
Permalink
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
Ben
2008-08-11 13:10:08 UTC
Permalink
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 <a href="http://sine.ni.com/cs/app/doc/p/id/cs-381" target="_blank">Next Generation Aircraft Fuel Pump </a>( now flying in the new Joint Strike Fighter&nbsp;:smileywink: ) that the customer could change to simulate a variety of enginges. I did that using <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=240328&amp;view=by_date_ascending&amp;page=1" target="_blank">Action Engines </a>with two states "Init" (which loaded the LUT) and "Convert" which did the look-up.
&nbsp;
Have fun!
&nbsp;
Ben
AGN
2008-08-11 13:40:06 UTC
Permalink
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?
Ben
2008-08-11 14:10:11 UTC
Permalink
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
AGN
2008-08-12 09:40:07 UTC
Permalink
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.&nbsp;
Loading...