Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Onboard Program Size

Hi,
 
The following is part of the "Begin Program Storage" VI help:
 
" Attempting to store more than 32 programs generates an error. Similarly, an error is generated if you run out of memory during program storage. Both of these cases are extremely unlikely "

Well, I think for me it wasn't so unlikely. I am writting an onboard program that makes three DC motors to perform a routine of certain number of target positions. Two of these three motors have a fixed number of positions (2 and 11, respectively), but one of them has a variable number of positions (from 1 to 450), depending on user's specifications.
 
When the number of positions for the third motor is less or equal to 29, the program reaches a maximum size of 64,286 bytes. Since the maximum RAM memory for my PCI motion controller (7340) is 64K, then when the number of positions goes beyond 29 I obviously get the error "No RAM available for object (program or buffer) storage".
 
 
Now, I would really appreciate if someone can take a look at my program or can tell me how to debug it, i.e. how to know in which part I am using a lot of memory. I think my program isn't "that" complicated to need so much memory.
 
I am attaching the screenshot of my MAX and my LabVIEW program.
 
Thanks in advance!
 
 
Download All
0 Kudos
Message 1 of 2
(3,104 Views)
Ok, I just realize that the problem is the amount of memory used for every position in the arrays. According to my calculations, correct me if I am wrong, every position in the array (when it is stored in an onboard program) uses around 5 kB of memory! That's why I cannot store all of them in my program (max target positions = 10 + 2 + 450 = 462 for the 3 motors).
 
Now, I would like to give a turn in my question. I think that I should use buffers in order to store these 452 maximum target positions, but buffers are just intended to be used in Contouring Operation Mode? Or they can also be a "position" type buffer, but with an Absolute Position Operation Mode?
 
 
Thanks for your time!
 
 
0 Kudos
Message 2 of 2
(3,092 Views)