View Full Version : Limits
BeerFizz
05-02-04, 01:57 PM
Is there a limit to the number of variables / constants in IsoMax?
Are there any limits other than space?
How can I determine when I am out of dictionary space and when I am out of program space?
Thanks
phil
RMDumse
05-02-04, 02:06 PM
There's no (practical) limit to variables and constants other than the address space of the processor itself, and the amount of memory each dictionary entry takes.
BeerFizz
05-02-04, 02:23 PM
Randy,
I am having some strange things occur when loading in some code.
I am geting aborts two thirds of the way through. If I remove some of the words it appears to go further.
Some of my words are book marks, with just the : name ;
would that effect the compilation?
RMDumse
05-02-04, 02:34 PM
Every definition takes up space in memory. So more definitions, less available memory. Eventually you do hit the limits. But personally I've never hit the end of Flash with any of the programming I've ever done on this part.
I have hit the end of RAM, and needed to change and transfer definitions from RAM to Flash, using EEWORD.
I have asked Brad for a clarification on how to know if you're out of memory. The way I do it is to look at the dictionary pointers and see if they are approaching an obvious boundary. i.e. HERE . and PHERE . but then I have a general idea of the available RAM boundaries from the Mot manuals for the core processors
So, tell me, are you already using EEWORD at the ends of definitions and IN-EE at the end of transitions to use the Flash for program? or are you still trying to work stricktly in RAM? It is easy to run out of RAM. It is hard to run out of Flash (i.e. make a program big enough to use all of Flash).
BeerFizz
05-02-04, 02:44 PM
Hmmmmm,
at the moment I am using RAM only, ie. I have not put EEWORD after any of my words, variables or constants.
I guess I didn't realize that as the words were compiled, if they had an EEWORD, they were placed into FLASH right away. For some reason I thought EEWORD was associated with SAVE-RAM and denoted those items which were to be placed in FLASH at the execution od SAVE-RAM. But this makes more sense.
I will put in a bunch of EEWORDS and get right back with the results.
Thanks
Phil
BeerFizz
05-02-04, 03:07 PM
Well, it works much better, however, it's now giving me an abort when it reaches my state machine, right on the definition.
I tried
MACHINE NAME EEWORD
I then removed the EEWORD with same result. Should I be using IN-EE?
Phil
RMDumse
05-02-04, 03:38 PM
How can I determine when I am out of dictionary space and when I am out of program space?
There are four words for this.
AVAIL returns the amount of data RAM left available.
PAVAIL returns the amount of program RAM left available.
PFAVAIL returns the amount of program Flash ROM left available.
EEAVAIL returns the amount of data Flash ROM left available.
So typing
AVAIL .
will print the number of locations (cells) of data RAM left.
When you use EEWORD, the word is moved from Program RAM to Program Flash ROM. So this will cause PAVAIL to increase and PFAVAIL to decrease.
RMDumse
05-02-04, 03:40 PM
Well, it works much better, however, it's now giving me an abort when it reaches my state machine, right on the definition.
I tried
MACHINE NAME EEWORD
I then removed the EEWORD with same result. Should I be using IN-EE?
No, the machine definition and any appended states should all have EEAWORDS after them. Only transitions need the IN-EE useage.
WHen you say "giving me an abort when it reaches my state machine" could you be more specific? Is there an error? a warning? a reset? what?
BeerFizz
05-02-04, 04:16 PM
Sorry.
NMI term appears to stop. I press return and I get a dailog titled "transmitting data" requesting "abort" or "continue".
Pressing continue gets into a cycle of abort continues.
Pressing abort freezes NMI term. If I kill NMI term and then restart it, I get the 'pod welcome message "IsoMax V0.6".
By the way, at the beginning of the file I have a "SCRUB" followed by a "ISOMAX-START". Would that be having any affect?
Phil
RMDumse
05-02-04, 06:09 PM
The problem is right before this machine is defined in the loop counter definition:
DECIMAL
LOOPINDEX CNT EEWORD
4 CNT END EEWORD
1 CNT START EEWORD
MACHINE SERVO \ main servo update cycle
ON-MACHINE SERVO
APPEND-STATE SERVO-START EEWORD
APPEND-STATE SERVO-LOOP EEWORD
END and START are not additional definitions but modifications of CNT which must be done before the EEWORD moves it. So, modify your code like this and try further.
DECIMAL
LOOPINDEX CNT
4 CNT END
1 CNT START EEWORD
MACHINE SERVO EEWORD \ main servo update cycle
ON-MACHINE SERVO
APPEND-STATE SERVO-START EEWORD
APPEND-STATE SERVO-LOOP EEWORD
BeerFizz
05-03-04, 01:22 AM
Worked great, thank you for the fix.
Now, how do I use EEWORD on a structure like the following:
HERE CONSTANT *JOINTS
1500 , 1500 , 1500 , 1500 ,
1500 , 1500 , 1500 , 1500 ,
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.