06-23-2011 07:59 AM
Hi
I have a lookup table that uses the interpolate method to get additional results. It is possible to put in some way the values in the front panel to feed this lookup table. I would be for the user to enter the values at the front panel, and not at the lookup properties in the block diagram.
thanks
Solved! Go to Solution.
06-23-2011 10:05 AM
A control on the front panel?
06-24-2011 05:40 AM
Sorry, what kind of control are you suggesting?
thanks
06-24-2011 08:47 AM
A table control or a multicolumn listbox.
06-25-2011 12:19 PM
Thanks. But I am not sure how can I wire up the table control or the multicolumn to the lookup table. If wired, how do you set up the table so that the lool up table gets feed by the data of the table control . Thanks
06-25-2011 12:43 PM
@fiatm wrote:
It is possible to put in some way the values in the front panel to feed this lookup table. I would be for the user to enter the values at the front panel, and not at the lookup properties in the block diagram.
It would be so much easier for us if you show us some code!
Presumably, you currently have some "lookup properties" (and I honestly have absolutely no idea what that is! 🐵 so whatever datatype that is, it can be converted to a front control. Sometimes, a simple 2 column 2D numeric array might be sufficient.
So please show us a simplified version of your program so we see what you are talking about. Thanks! 😄
06-27-2011 05:46 AM
Hi. I have a look-up table in a control and simulation loop. when I right-click on the lookup table properties, in which I have attached a picture of it. I have to type data for x and y values. The lookup table returns the y value. What I want is is to see if it is possible to use some kind of function or array , in which the user would not have to enter the set of x and values directly into the lookup table properties in the block diagram, but he oould type them in the front panel.
Thank you
06-27-2011 06:49 AM
That's an ordinary 2D-table to me, first column being X, 2nd Y. You can just add number into the program as it runs, but in order to remember them until next time it's easiest to save them to a spreadsheet file which you'll read at the start of the program.
If you're using an event structure it's perfect to include a save file in LookupTable Value change event.
/Y
06-27-2011 09:38 AM
From that dialog, change the parameter source to terminal. Then create a control from the terminal on the block diagram. Enter the values and make them the control's default value.
06-29-2011 06:06 AM
Thanks. I did that. When I change it to terminal, an input called method appears. But when I create the control inside it appears the method used "interpolate", picture attached. I am not sure where to enter the values or mabue I am doing something wrong. Thank you