How to refer to same Lookup table from 2 different commands

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

Submitted by Mala Gowda on Fri, 01/11/2013 - 18:13 

Hi:

How to refer to same 2D lookup table from 2 different commands.

Regards, MALA

Tagged:

Answers

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

    Submitted by Anders89 on Fri, 01/11/2013 - 23:46.

    Sharing of look-up table data in the generated code is automatic. So long as the map blocks share the same look-up table file path, only one look-up table will be created in the generated code no matter how many map blocks you have in your diagram.

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

    Submitted by Mala Gowda on Sat, 01/12/2013 - 20:30.

    when i use same lookup tables with different mapping name or i use same lookup tables with same mapping name in two place, i am reading all zero in debug mode. this requirement is because i got to drive two motors referring to same look up tables. so please suggest how could i fix this.

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

    Submitted by Anders89 on Sat, 01/12/2013 - 20:44.

    Of course your table should not return zero. Please send us your diagram so we may see what the problem might be. You can either create a case and attach your diagram, or send it to support@vissol.com

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

    Submitted by Mala Gowda on Mon, 01/14/2013 - 12:08.

    Hi:

    Dropped in visSim diagram to support@vissol.com. hope to hear from you soon.

    Regards, MALA

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

    Submitted by Mala Gowda on Wed, 01/16/2013 - 10:33.

    Tried flashing code with uniflash too, even then look up tables return zero in debug diagram. why is an issue using same lookup table with different mapping files.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2020

    Submitted by Anders89 on Wed, 01/16/2013 - 11:06.

    We have tried a simple diagram that includes 2 of your tables and the results are nonzero, correct and simulated output agrees with codegen. See attached.
    Note that in your 2D table zero is a valid output for large areas of your input domains.

    Unable to find an attachment - read this blog

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

    Submitted by Mala Gowda on Wed, 01/16/2013 - 14:59.

    yeah i noted in simulation lookup tables work. with only current loop i.e., without look up tables both the motors work. with speed loop and look up tables none of the motor is working. look up tables return zero. with speed loop and look up tables connected for any one of motor drive section, it's still working fine. so i wonder what is going on here.

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

    Submitted by Mala Gowda on Wed, 01/23/2013 - 15:38.

    Hi anders:

    This problem is still not solved. i found that it is not an issue with look up tables too. everything is read zero in debug mode. why is it so. is it an issue with memory mapping or something. i had dropped in visSim files. please suggest on this. it is quite urgent.

    Regards, MALA

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

    Submitted by Anders89 on Thu, 01/24/2013 - 19:53.

    Glad to hear you confirmed that 2D lookup tables are working fine. A likely cause for no output from a targetInterface block is that you are clocking too fast. The debug task is preempted by the controller, so if your controller is using 100% of the CPU, the debug information will never get a chance to be sent to the PC. It is simple to change the sample rate to a lower value in the targetInterface block to confirm this. Just switch it from 10 kHz to 1 kHz and see what the CPU utilization is. Then you will know how much you need to increase the speed of your algorithm to run at your desired rate.

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

    Submitted by Mala Gowda on Fri, 01/25/2013 - 16:52.

    yes. matching cpu utilzation, sampling rate and P, I coefficients as required by the system and for PC communication did solve the problem. thanks a lot anders.