Configuring the Lookup Table 2D block

In this section we demonstrate how to prepare the 2D Lookup Table file and how to configure the 2-dimensional Lookup Table block.

Return to Overview of Lookup Table 2D

To prepare the 2-D Lookup Table file

  1. The file that is imported must be in .CSV format, the entries MUST be of type double

  2. The first line in the file must contain the first independent variable name, the second independent variable name and the dependent variable name all separated by commas.

  3. The next line contains the a minus, followed by all the column indexes (the values for the first independent variable).

  4. Each of the following lines must contain the row index, followed by the output values for the current row index at each of the column indexes (i.e. each of the subsequent lines must contain a value for the second independent variable followed by the values for the dependent variable (output field) at the various values of the first independent variable).

    Note : The row and columns in the lookup table file must be sorted, in other words the values must be arranged in ascending order in both the rows and columns.

  5. The reading of the file will stop as soon as the end of the file is reached, or when one of the rows that was read, could not be interpreted (see the invalid formats below for examples of such cases).

A 2-D table and its .CSV form is shown below:

 

Tip: The lookup table file may be prepared in a program like Excel.  Ensure that the file is saved as a csv.  The first row must contain the two independent variable names followed by the dependent variable name.  The second row must contain a minus sign followed by the various values of the first independent variable.  The third and all subsequent rows must contain, in first place, a value of the second independent variable followed by the values for the dependent variable at the various values of the first independent variable.  

Return to top

To configure the Lookup Table 2-D block

  1. To open the block property page (the page on which the block configuration is specified), either double click on the block or right-click on the block and select Block Properties.

  2. Click on Import File to import the lookup table, browse to the file and click on Open.

  3. The table loaded from the file will be displayed in the Input pane.

  4. Select the row variable (i.e. the entries for this variable are listed in the table rows) from the Independent Variable (Row) drop down list

  5. Select the column variable (i.e. the entries for this variable are listed in the table columns) from the Independent Variable (Column) drop down list

  6. Type the name of the dependent/output variable in the Dependent Variable box

  7. Click Apply to accept changes or OK to accept changes and close the block property page.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025