array size seems to be limited

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Jorg_Guldner
Posts: 60
http://meble-kuchenne.info.pl
Joined: Wed Dec 23, 2020 9:55 am
Been thanked: 4 times

Flowcode v10 array size seems to be limited

Post by Jorg_Guldner »

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?
array96-24.png
array96-24.png (13.2 KiB) Viewed 282 times
Regards
Jorg

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

Post by Steve-Matrix »

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: 2074
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 162 times
Been thanked: 958 times

Re: array size seems to be limited

Post by mnfisher »

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

Jorg_Guldner
Posts: 60
Joined: Wed Dec 23, 2020 9:55 am
Been thanked: 4 times

Re: array size seems to be limited

Post by Jorg_Guldner »

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

mnfisher
Valued Contributor
Posts: 2074
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 162 times
Been thanked: 958 times

Re: array size seems to be limited

Post by mnfisher »

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

medelec35
Valued Contributor
Posts: 2319
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 723 times
Been thanked: 780 times

Re: array size seems to be limited

Post by medelec35 »

I have move this topic to a more appropriate section, as it is not a Flowcode bug.
Martin

Post Reply