4KB Variable Limitation & EBPro User Manual

4KB Variable Limitation & EBPro User Manual https://forum.weintekusa.com/uploads/db0776/original/2X/c/cb394e185928b38694b4765c0a34876d82fc0ddf.png
none 0.0 0

EasyBuilder Pro Version: V6.10.01 (User Manual)
Hello Team Weintek

In the spirit of constructive feedback, please see below and screenshots regarding memory limitations for declared variables in an EasyBuilderPro application, as documented in EBPro User Manual V6.10.01

Thank you also for responses to Questions 1-4.

p18-10 Declaring Arrays
p18-10 states that the length of an array could be 1 to 4096, then provides suggestive examples of int, short and float, but does not mention the 4096B limitation.

Issue: The 4096B limitation isn’t mentioned until 103 pages later on p18-113. (see next)
Consequence: The omission of limitation misleads User, who may not also read the interim 103 pages, only to discover this non-standard limitation the hard way after attempting code destined to fail.

p18-113 Macro Ref
States that the total size of data type that can be declared in a function is 4096B.

Q1: Does same limitation exist for global array declarations?

Q2: Is there a 4096B total-sum limitation for all variables in a given EasyBuilderPro application, including all variables declared both inside and outside functions?

Q3: What is the maximum total byte allocation for all variables, both local and global, in a given EasyBuilderPro application?

Q4: Is there a way to observe and/or monitor [percent,KB] consumption of available memory for variable allocations during code development and/or upon compile?

p18-118 Macro Notes
Section 18.10, Article 1 provides an outline of maximum array size according to different variable types per 4KB limitation.

Suggestion: Mention of this maximum array size outline or outline content could be included or linked on or in continuum with p18-10 Declaring Arrays, avoiding the 108 page separation of this valuable guidance regarding non-standard EBPro limitation.

Hi @JimWalls,

Thank you for the feedback and to answer your questions:

  1. Yes, global variables have a similar limitation.
    Note: Global variables are declared outside of macro_command main(). These ‘global’ vars may be used within any sub routine in that macro or within the main() routine.

  2. No, as an example macro id 000 may have a short variable called vars_0 with an array size of 2048 and macro id 001 may have another short variable called vars_1 with an array size of 2048. These macros are separate instances with local variable declarations that do not effect each other.

  3. In a cMT X project this would be the maximum number of macros (500) multiplied by the max byte size (4096B) or 4096B x 500 = 2,048,000B

  4. The maximum byte allocation is 4096B / macro. There is no way to monitor this in the macro workspace, but some tasks can be divided across multiple macros when this limit is exceeded. This can be preferable because macros run line-by-line and synchronously, so a macro with 1000 lines may take longer to execute than two macros with 500 lines each running at the same time.

Thank you Brendon, for helping us clearly establish these capacity boundaries.

We are pursuing large-system applications for which these limits are relevant.