Hi, I discover how to declare an array as constant:
rom char* ARRAYCONST = {0x01,0x02,0x03,0x04,0x05,0x06};
into a "c icon", but how to recall the value into flowcode diagram?
Constant array
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
- Contact:
Re: Constant array
You will need a C icon to get the value as well when using C code to declare the constants. C icons do not work in simulation, so you will not be able to use simulation.
You can use lookup table to create an ROM array that will simulate using the component macros. It translates to a ROM array when generating the code for you controller. Set the values you want to initialize the array with in the properties.
You can use lookup table to create an ROM array that will simulate using the component macros. It translates to a ROM array when generating the code for you controller. Set the values you want to initialize the array with in the properties.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
- psf
- Posts: 45
- Joined: Mon Jun 25, 2007 9:44 pm
- Location: Italia
- Has thanked: 6 times
- Been thanked: 2 times
- Contact:
Re: Constant array
Thanks I'll look for this.kersing wrote:You will need a C icon to get the value as well when using C code to declare the constants. C icons do not work in simulation, so you will not be able to use simulation.
You can use lookup table to create an ROM array that will simulate using the component macros. It translates to a ROM array when generating the code for you controller. Set the values you want to initialize the array with in the properties.