System Failure during StartLoad

Hello,

In my application, I have a mainmodule that calls several sub modules. I want to load the second sub module (Prg_2.mod) in background while first sub module (Prg_1.mod) is executing, so that when the first module is done executing, I want the second sub module to start immediately. For this, I tried using Load \Dynamic and StartLoad methods. 
TPWrite "Step-3: Loading subprogram 1";
modulepath_1 := "/hd0a/05-102441/HOME/R3DP/Prg_1.mod";
Load \Dynamic, modulepath_1;

modulepath_2 := "/hd0a/05-102441/HOME/R3DP/Prg_2.mod";
StartLoad modulepath_2, load_2;

However, as soon as controller starts executing StartLoad command, it goes into system failure with error saying not enough memory. All my sub modules are limited to 30000 lines and have similiar number of target points. The file size of the sub modules are about 5.8 MB each.

I checked the available RAPID memory and it is about 28 MB. Is there a way to overcome the system failure and achieve background loading of sub modules?   

Comments

  • rakshithb174rakshithb174 United States
    1. Is there a way to increase RAPID memory without any modifications to the hardware?
    2. Is there a way to preload the targets?
  • From the Operating Manual:

    "Because of power fail in executed Load or StartLoad...WaitLoad instruction, the RAPID program memory is inconsistent.

    **TO REPAIR DO P-START**

    Recommended Actions
    Important to do P-start, because the RAPID program memory is destroyed:
    -Faulty init value of PERS variables
    -Reduction of the available program memory size"

    Keep in mind that a P-START deletes all RAPID program modules, so make sure you make a backup before proceeding. 



  • rakshithb174rakshithb174 United States
    Isn't P-start same same RESET RAPID? Yes, I had to do that to recover from the failure.

    Now everything is back and running, is there a solution for increasing RAPID memory without any hardware changes? or preload targets? 
  • lemster68lemster68 United States ✭✭✭
    Do you have those instructions one right after another in your program?  Maybe it is not possible to start loading before the first one has finished.  Try WaitLoad to find out.
    Lee Justice
  • graemepaulingraemepaulin New Zealand ✭✭✭
    The RAPID Kernel manual states that when the program/module is loaded into program memory (compiled) it requires approximately 4 times more memory space than when on the hard drive (in ASCII text format). The exact compiled file size depends on the commands used.
  • rakshithb174rakshithb174 United States
    lemster68 said:
    Do you have those instructions one right after another in your program?  Maybe it is not possible to start loading before the first one has finished.  Try WaitLoad to find out.
    But the first one is just a regular "Load" instruction.

    The first instruction is Load so that the program execution waits for first sub module Prg_1.mod to be loaded into the controller memory. After this I have StartLoad to begin loading of second sub module Prg_2.mod. I have a corresponding WaitLoad later in the program when execution of first module is completed. 

    Isn't WaitLoad have to be used with StartLoad only and can't be used with regular Load? 
  • rakshithb174rakshithb174 United States
    The RAPID Kernel manual states that when the program/module is loaded into program memory (compiled) it requires approximately 4 times more memory space than when on the hard drive (in ASCII text format). The exact compiled file size depends on the commands used.
    Oh! ok. This would surely exceed my available RAPID memory if the second module starts loading after first module has completed loading (and compiled). 

    Is there a way to increase overall RAPID memory in the IRC5 controller?
  • graemepaulingraemepaulin New Zealand ✭✭✭
    I have checked and the answer is no the amount of memory for RAPID can not be increased.

    You will have to break the program into smaller modules.
Sign In or Register to comment.