How can I do a fixed-point table look up for my embedded app?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by Duco Pulle on Thu, 09/12/2013 - 21:17

 

Stupid question perhaps: I need to convert a magnetization curve showing flux as function into a fix point table, with input current, so that the table ready the corresponding flux. What is the easiest way to do this? I know there is a look-up wizard but does that get me into the fixed point environment?

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by pete on Thu, 09/12/2013 - 21:27.

    Duco,
    You always store your table data as columns of floating point text. VisSim will convert the data to optimally scaled-fixed point if you use a fixed-point data type as the table index value. You can use the table wizard, or just insert a map block (we call 'look up tables' map blocks because they perform a linear piece-wise mapping from an input domain to an output domain). You can do 1, 2 or 3 dimensional look-ups.
    You switch between a floating point and fixed-point realization simply by the type of the input index. If you index with a fixed-point value, VisSim will choose output scalings for each output (you can have multi-column tables with more than one output) depending on the largest value in each column. If you index with a floating point value, the table will be floating point as will all outputs.

    Pete