Page 1 of 1

Table in supplimentary code

Posted: Tue Oct 14, 2014 9:55 am
by Chris_MIRA
Hi,
Im trying to learn how to place a table in supplementary code then use it in a programme. The attached programme (taken from "30 PIC projects in FC6 by Bert Van Dam" does this BUT the programme doesn't seem to work, it just retrurns 0.0 regardless of input, Im guessing that the table is set up wrong or the instruction to read a point in the table is wrong? Please help, or is there another example (from youtube perhaps) that I could follow?
Regards,
Chris

Re: Table in supplimentary code

Posted: Tue Oct 14, 2014 10:06 am
by Benj
Hi Chris,

Code in the supplementary code window will not simulate and can be a bit tricky to work with. In v6 we have added a component called a Look up table. If you go to the component search and type in LUT then it should appear. This will generate the same C code but should also simulate and provide macros to access the values.

Here is some help on the LUT component.
http://www.matrixtsl.com/wiki/index.php ... e3c95d86ab

Re: Table in supplimentary code

Posted: Tue Oct 14, 2014 10:38 am
by Chris_MIRA
That is very cool!
Thanks very much for both your help and speed of reply!
Regards,
Chris