Hello!
I need an array size of 96. Defining the array shows under variables only a maximum of 24 and the program is not working?
Any idea?
Regards
Jorg
array size seems to be limited
-
Jorg_Guldner
- Posts: 60
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 23, 2020 9:55 am
- Been thanked: 4 times
-
Steve-Matrix
- Matrix Staff
- Posts: 1956
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 289 times
- Been thanked: 457 times
Re: array size seems to be limited
This is normal - only the first 25 array values are shown. If you need to view or alter the value of an array element above index 24, you can add a suitable expression - e.g. sensor_1_array[90] - to the watch window area of the Simulation Debugger when running the project via simulation or ICD.
-
mnfisher
- Valued Contributor
- Posts: 2073
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 162 times
- Been thanked: 958 times
Re: array size seems to be limited
The display only shows some (the first ...) but you should be able to use large arrays (Ive used 50000 elements) - assuming the device has sufficient RAM.
Can you post some code demonstrating the issue?
Martin
Can you post some code demonstrating the issue?
Martin
-
Jorg_Guldner
- Posts: 60
- Joined: Wed Dec 23, 2020 9:55 am
- Been thanked: 4 times
Re: array size seems to be limited
Hi Martin,
I found the program bug. array[24] have the address 0-23 ! I uses 1-24 and the program writes into a other variable.
The other info, that only 24 variables are shown is a point that is new for me.
Thanks to you
Jorg
I found the program bug. array[24] have the address 0-23 ! I uses 1-24 and the program writes into a other variable.
The other info, that only 24 variables are shown is a point that is new for me.
Thanks to you
Jorg
-
mnfisher
- Valued Contributor
- Posts: 2073
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 162 times
- Been thanked: 958 times
Re: array size seems to be limited
Glad you've found the issue.
Some languages do use '1' based but this is much rarer - and loops to process the array would also tend to be '0' based (loop count 24 times using a variable .i - .i will take the value 0..23)
Martin
Some languages do use '1' based but this is much rarer - and loops to process the array would also tend to be '0' based (loop count 24 times using a variable .i - .i will take the value 0..23)
Martin