We Value Your Feedback!
Could you please spare a few minutes to share your thoughts on
Cloud Connected vs On-Premise Services. Your feedback can
help us shape the future of services.
Learn more about the survey
or
Click here to Launch the survey
Schneider Electric Services Innovation Team!
HVAC and Pumping Forum
Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-20 10:01 PM
Hi Guys,
I'm stuck while trying to create an Array with its size (Upper bound) being a EEPROM variable instead of a set constant value.
Here, Num_Units is an EEPROM variable which is also UINT. When I compile it, I got the following error.
If I replace the Num_Units with its value (eg: 10), it complies successfully and creates an array of size 11 (0-10). I tried declaring inside the ST program like the following, but the program does not allow me to do so:
How can I achieve this please? Any advice would be greatly appreciated. Thanks.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-22 05:59 AM
Hi,
this is not supported, the size of an array has to be based on a constant value or a constant variable, because the space is allocated at compilation time.
You have to define the array with a size equal to the maximum value that can be assumed by your EEprom parameter and use just part of it when the EEprom value is lower than maximum.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-11-22 05:59 AM
Hi,
this is not supported, the size of an array has to be based on a constant value or a constant variable, because the space is allocated at compilation time.
You have to define the array with a size equal to the maximum value that can be assumed by your EEprom parameter and use just part of it when the EEprom value is lower than maximum.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.
With achievable small steps, users progress and continually feel satisfaction in task accomplishment.
Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.
of