First, a happy and prosperous new year to you all
Hopefully a quick question...
Having declared a 16 x 16-bit ROM look-up table using the usual LUT component, I'm trying to establish the appropriate way to reference values in a C block? e.g... FCV_THISUINT = FCV_THISTABLE[indexval] is clearly incorrect.
Many thanks,
Brendan
Referencing a ROM table in a C block
Moderator: Benj
-
- Valued Contributor
- Posts: 1188
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: Referencing a ROM table in a C block
Hi Brendan,
The easiest way to check this is to define some code that does it and then look at the C generated..
For example in a calculation I do :
This 'expands to' (using customize C code or view C)
Martin
The easiest way to check this is to define some code that does it and then look at the C generated..
For example in a calculation I do :
Code: Select all
.x = lut1::GetInt(2)
Code: Select all
FCL_X = FCD_00fb1_lut1__INTLIST(2);
-
- Posts: 243
- Joined: Tue Nov 27, 2012 12:53 pm
- Location: Cambridge, UK
- Has thanked: 140 times
- Been thanked: 118 times
- Contact:
Re: Referencing a ROM table in a C block
Hi Martin.
Many thanks for your time to reply - Greatly appreciated
Best regards,
Brendan
Many thanks for your time to reply - Greatly appreciated
Best regards,
Brendan
LinkedIn Profile...
http://www.linkedin.com/in/brendantownsend
http://www.linkedin.com/in/brendantownsend